Basic Cluster

This chapter details the Basic cluster which is a mandatory cluster for all ZigBee devices.

The Basic cluster has a Cluster ID of 0x0000.

Overview

All devices implement the Basic cluster as a Server-side (input) cluster, so the cluster is able to store attributes and respond to commands relating to these attributes. The cluster’s attributes hold basic information about the node (and apply to devices associated with all active endpoints on the host node). The information that can potentially be stored in this cluster comprises: ZCL version, application version, stack version, hardware version, manufacturer name, model identifier, date, power source.

Note: The Basic cluster can also be implemented as a Client-side (output) cluster to allow the host device to act as a commissioning tool.

The Basic cluster contains only two mandatory attributes, the remaining attributes being optional - see Section 8.2.

Note: Since the Basic cluster contains information about the entire node, only one set of Basic cluster attributes must be stored on the node, even if there are multiple instances of the Basic cluster server across multiple devices/endpoints. All cluster instances must refer to the same structure containing the attribute values.

The Basic cluster is enabled by defining CLD_BASIC in the zcl_options.h file.

A Basic cluster instance can act as a client and/or a server. The inclusion of the client or server software must be pre-defined in the application’s compile-time options (in addition, if the cluster is to reside on a custom endpoint then the role of client or server must also be specified when creating the cluster instance).

The compile-time options for the Basic cluster are fully detailed in Section 8.6.

Parent topic:Basic Cluster

Basic Cluster structure and attributes

The Basic cluster is contained in the following tsCLD_Basic structure:

typedef struct
{
#ifdef BASIC_SERVER
    zuint8                 u8ZCLVersion;
#ifdef CLD_BAS_ATTR_APPLICATION_VERSION
    zuint8                 u8ApplicationVersion;
#endif
#ifdef CLD_BAS_ATTR_STACK_VERSION
    zuint8                u8StackVersion;
#endif
#ifdef CLD_BAS_ATTR_HARDWARE_VERSION
    zuint8                u8HardwareVersion;
#endif
#ifdef CLD_BAS_ATTR_MANUFACTURER_NAME
    tsZCL_CharacterString sManufacturerName;
uint8                     au8ManufacturerName[32];
#endif
#ifdef CLD_BAS_ATTR_MODEL_IDENTIFIER
    tsZCL_CharacterString sModelIdentifier;
    uint8                 au8ModelIdentifier[32];
#endif
#ifdef CLD_BAS_ATTR_DATE_CODE
    tsZCL_CharacterString sDateCode;
    uint8                 au8DateCode[16];
#endif
    zenum8                ePowerSource;
#ifdef CLD_BAS_ATTR_GENERIC_DEVICE_CLASS
    zenum8                eGenericDeviceClass;
#endif
#ifdef CLD_BAS_ATTR_GENERIC_DEVICE_TYPE
    zenum8                eGenericDeviceType;
#endif
#ifdef CLD_BAS_ATTR_PRODUCT_CODE
    tsZCL_OctetString    sProductCode;
uint8
au8ProductCode[CLD_BASIC_MAX_NUMBER_OF_BYTES_PRODUCT_CODE];
#endif
#ifdef CLD_BAS_ATTR_PRODUCT_URL
    tsZCL_CharacterString  sProductURL;
    uint8
    au8ProductURL[CLD_BASIC_MAX_NUMBER_OF_BYTES_PRODUCT_URL];
#endif
#ifdef CLD_BAS_ATTR_LOCATION_DESCRIPTION
    tsZCL_CharacterString  sLocationDescription;
    uint8                  au8LocationDescription[16];
#endif
#ifdef CLD_BAS_ATTR_PHYSICAL_ENVIRONMENT
    zenum8                 u8PhysicalEnvironment;
#endif
#ifdef CLD_BAS_ATTR_DEVICE_ENABLED
    zbool                 bDeviceEnabled;
#endif
#ifdef CLD_BAS_ATTR_ALARM_MASK
    zbmap8                u8AlarmMask;
#endif
#ifdef CLD_BAS_ATTR_DISABLE_LOCAL_CONFIG
    zbmap8                u8DisableLocalConfig;
#endif
#ifdef CLD_BAS_ATTR_SW_BUILD_ID
    tsZCL_CharacterString sSWBuildID;
    uint8                 au8SWBuildID[16];
#endif
#endif
    zuint16              u16ClusterRevision;
} tsCLD_Basic;

where:

  • u8ZCLVersion is an 8-bit version number which represents a published set of foundation items, such as global commands and functional descriptions. Currently this should be set to 2.

  • u8ApplicationVersion is an optional 8-bit attribute which represents the version of the application (and is manufacturer-specific)

  • u8StackVersion is an optional 8-bit attribute which represents the version of the ZigBee stack used (and is manufacturer-specific)

  • u8HardwareVersion is an optional 8-bit attribute which represents the version of the hardware used for the device (and is manufacturer-specific)

  • The following optional pair of attributes are used to store the name of the manufacturer of the device:

    • sManufacturerName is a tsZCL_CharacterString structure (see Section 6.1.14) for a string of up to 32 characters representing the manufacturer’s name

    • au8ManufacturerName[32] is a byte-array which contains the character data bytes representing the manufacturer’s name

  • The following optional pair of attributes are used to store the identifier for the model of the device:

    • sModelIdentifier is a tsZCL_CharacterString structure (see Section 6.1.14) for a string of up to 32 characters representing the model identifier

    • au8ModelIdentifier[32] is a byte-array which contains the character data bytes representing the model identifier

  • The following optional pair of attributes are used to store manufacturing information about the device:

    • sDateCode is a tsZCL_CharacterString structure (see Section6.1.14) for a string of up to 16 characters in which the 8 most significant characters contain the date of manufacture in the format YYYYMMDD and the 8 least significant characters contain manufacturer-defined information such as country of manufacture, factory identifier, production line identifier

    • au8DateCode[16] is a byte-array which contains the character data bytes representing the manufacturing information

Note: The application device code automatically sets two of the fields of sDataCode. The field sDataCode.pu8Data is set to point at au8DateCodeand the field sDataCode.u8MaxLengthis set to 16 (see Section 6.1.14 for details of these fields).

  • ePowerSource is an 8-bit value in which seven bits indicate the primary power source for the device (e.g. battery) and one bit indicates whether there is a secondary power source for the device. Enumerations are provided to cover all possibilities - see Section 8.5.2

Note: The power source in the Basic cluster is completely unrelated to the Node Power descriptor in the ZigBee PRO stack. The power source in the ZigBee PRO stack is set using the ZPS Configuration Editor.

  • eGenericDeviceClass is an optional attribute that identifies the field of application in which the local device type operates (see eGenericDeviceType below). Enumerations are provided - see Section 8.5.3. Currently, the attribute is used only in lighting applications, for which the value is 0x00 (all other values are reserved).

  • eGenericDeviceType is an optional attribute that identifies the local device type. Enumerations are provided to cover the different possibilities - see Section 8.5.4. Currently, the attribute is used only in lighting applications.

  • The following optional pair of attributes are used to store a code for the product (this attribute may be used in lighting applications only):

    • sProductCode is a tsZCL_OctetString structure (see Section 6.1.14) for a string representing the product code - the maximum number of characters is defined at compile-time (see Section 8.6) using the macro CLD_BASIC_MAX_NUMBER_OF_BYTES_PRODUCT_CODE.

    • au8ProductCode[``] is a byte-array which contains the character data bytes representing the product code - the number of array elements, and therefore characters, is determined at compile-time, as indicated above.

  • The following optional pair of attributes are used to store a URL for the product (this attribute may be used in lighting application only):

    • sProductURL is a tsZCL_CharacterString structure (see Section 6.1.14) for a character string representing the product URL - the maximum number of characters is defined at compile-time (see Section 8.6) using the macro CLD_BASIC_MAX_NUMBER_OF_BYTES_PRODUCT_URL.

    • au8ProductURL[``] is a byte-array which contains the character data bytes representing the product URL - the number of array elements, and therefore characters, is determined at compile-time, as indicated above.

  • The following optional pair of attributes relates to the location of the device:

    • sLocationDescription is a tsZCL_CharacterString structure (see Section 6.1.14) for a string of up to 16 characters representing the location of the device

    • au8LocationDescription[16] is a byte-array which contains the character data bytes representing the location of the device

  • u8PhysicalEnvironment is an optional 8-bit attribute which indicates the physical environment of the device. Enumerations are provided to cover the different possibilities - see Section 8.5.5.

  • bDeviceEnabled is an optional Boolean attribute which indicates whether the device is enabled (TRUE) or disabled (FALSE). A disabled device cannot send or respond to application level commands other than commands to read or write attributes

  • u8AlarmMask is an optional bitmap indicating the general alarms that can be generated (Bit 0 - general software alarm, Bit 1 - general hardware alarm)

  • u8DisableLocalConfig is an optional bitmap allowing the local user interface of the device to be disabled (Bit 0 - ‘Reset to factory defaults’ buttons, Bit 1 - ‘Device configuration’ buttons)

  • The following optional pair of attributes are used to store a manufacturer-specific software build identifier:

    • sSWBuildID is a tsZCL_CharacterString structure (see Section 6.1.14) for a string of up to 16 characters representing the software build identifier

    • au8SWBuildID[16] is a byte-array which contains the character data bytes representing the software build identifier.

    • u16ClusterRevision is a mandatory attribute that specifies the revision of the cluster specification on which this cluster instance is based. The cluster specification in the ZCL r6 corresponds to a cluster revision of 1. The value is incremented by one for each subsequent revision of the cluster specification. This attribute is also described in Section 2.4

The Basic cluster structure contains three mandatory elements: u``8ZCLVersion, e``PowerSource and u16ClusterRevision. The remaining elements are optional, each being enabled/disabled through a corresponding macro defined in the zcl_options.h file - for example, the attribute u8ApplicationVersion is enabled/disabled using the enumeration CLD_BAS_ATTR_APPLICATION_VERSION (see Section 8.3).

The mandatory attribute settings are described further in Section 8.3.

Parent topic:Basic Cluster

Mandatory Attribute Settings

The application must set the values of the mandatory u8ZCLVersion, ePowerSource and u16ClusterRevision fields of the Basic cluster structure so that other devices can read them. This should be done immediately after calling the endpoint registration function for the device - for example, eZLO_RegisterDimmableLightEndPoint().

These values can be set by calling the eZCL_WriteLocalAttributeValue() function with the appropriate input values. Alternatively, they can be set by writing to the relevant members of the shared structure of the device, as illustrated below, where sLight or sSwitch is the device that is registered using the registration function.

On a Dimmable Light:

sLight.sBasicCluster.u8ZCLVersion = 0x01;
sLight.sBasicCluster.ePowerSource = E_CLD_BAS_PS_SINGLE_PHASE_MAINS;
sLight.sBasicClusteru.16ClusterRevision = CLD_BAS_CLUSTER_REVISION;

On a battery-powered Dimmer Switch:

sSwitch.sLocalBasicCluster.u8ZCLVersion = 0x01;
sSwitch.sLocalBasicCluster.ePowerSource = E_CLD_BAS_PS_BATTERY;
sLight.sBasicClusteru.16ClusterRevision = CLD_BAS_CLUSTER_REVISION;

Parent topic:Basic Cluster

Functions

The following two Basic cluster functions are provided in the NXP implementation of the ZCL:

  • eCLD_BasicCreateBasic

  • eCLD_BasicCommandResetToFactoryDefaultsSend

eCLD_BasicCreateBasic

teZCL_Status eCLD_BasicCreateBasic(
    tsZCL_ClusterInstance *psClusterInstance,
    bool_t bIsServer,
    tsZCL_ClusterDefinition *psClusterDefinition,
    void *pvEndPointSharedStructPtr,
    uint8 *pu8AttributeControlBits);

Description

This function creates an instance of the Basic cluster on an endpoint. The cluster instance is created on the endpoint which is associated with the supplied tsZCL_ClusterInstance structure and can act as a server or a client, as specified.

The function should only be called when setting up a custom endpoint containing one or more selected clusters (rather than the whole set of clusters supported by a standard ZigBee device). This function will create a Basic cluster instance on the endpoint, but instances of other clusters may also be created on the same endpoint by calling their corresponding creation functions.

Note: This function must not be called for an endpoint on which a standard ZigBee device (for example, a Simple Sensor) is used. In this case, the device and its supported clusters must be registered on the endpoint using the relevant device registration function.

When used, this function must be the first Basic cluster function called in the application, and must be called after the stack has been started and after the ZCL has been initialized.

The function requires an array to be declared for internal use, which contains one element (of type uint8) for each attribute of the cluster. The array length should therefore equate to the total number of attributes supported by the Basic cluster. The function initializes the array elements to zero.

Parameters

  • psClusterInstance: Pointer to structure containing information about the cluster instance to be created (see Section 6.1.16). This structure is updated by the function by initializing individual structure fields.

  • bIsServer : Type of cluster instance (server or client) to be created:

    • TRUE - server

    • FALSE - client

  • psClusterDefinition: Pointer to structure indicating the type of cluster to be created (see Section 6.1.2). In this case, this structure must contain the details of the Basic cluster. This parameter can refer to a pre-filled structure called sCLD_Basic which is provided in the Basic.h file.

  • pvEndPointSharedStructPtr: Pointer to the shared structure used for attribute storage. This parameter should be the address of the structure of type tsCLD_Basic which defines the attributes of Basic cluster. The function initializes the attributes with default values.

  • pu8AttributeControlBits: Pointer to an array of uint8 values, with one element for each attribute in the cluster (see above).

Returns

  • E_ZCL_SUCCESS

  • E_ZCL_ERR_PARAMETER_NULL

Parent topic:Functions

eCLD_BasicCommandResetToFactoryDefaultsSend

teZCL_Status eCLD_BasicCommandResetToFactoryDefaultsSend(
    uint8 u8SourceEndPointId,
    uint8 u8DestinationEndPointId,
    tsZCL_Address *psDestinationAddress,
    uint8 *pu8TransactionSequenceNumber);

Description

This function can be called on a client device to send a ‘Reset To Factory Defaults’ command, requesting the recipient server device to reset to its factory defaults. The recipient device generates a callback event on the endpoint on which the Basic cluster was registered.

If used, the ‘Reset To Factory Defaults’ command must be enabled in the compile-time options on both the client and server, as described in Section 8.6.

You are required to provide a pointer to a location to receive a Transaction Sequence Number (TSN) for the request. The TSN in the response is set to match the TSN in the request, allowing an incoming response to be paired with a request. This is useful when sending more than one request to the same destination endpoint.

Parameters

  • u8SourceEndPointId: Number of the local endpoint through which to send the request. This parameter is used both to send the command and to identify the instance of the shared structure holding the required attribute values.

  • u8DestinationEndPointId: Number of the endpoint on the remote node to which the request is sent. This parameter is ignored when sending to address types eZCL_AMBOUND and eZCL_AMGROUP

  • psDestinationAddress: Pointer to a structure holding the address of the node to which the request is sent

  • psDestinationAddress: Pointer to a location to receive the Transaction Sequence Number (TSN) of the request

Returns

  • E_ZCL_SUCCESS

  • E_ZCL_ERR_PARAMETER_NULL

  • E_ZCL_ERR_EP_RANGE

  • E_ZCL_ERR_EP_UNKNOWN

  • E_ZCL_ERR_CLUSTER_NOT_FOUND

  • E_ZCL_ERR_ZBUFFER_FAIL

  • E_ZCL_ERR_ZTRANSMIT_FAIL

If an error is returned by the ZigBee PRO stack function which is invoked by this function to transmit the data, this error may be obtained by calling eZCL_GetLastZpsError().

Parent topic:Functions

Parent topic:Basic Cluster

Enumerations

teCLD_BAS_ClusterID

The following structure contains the enumerations used to identify the attributes of the Basic cluster.

typedef enum 
{
    E_CLD_BAS_ATTR_ID_ZCL_VERSION = 0x0000, /* Mandatory */
    E_CLD_BAS_ATTR_ID_APPLICATION_VERSION,
    E_CLD_BAS_ATTR_ID_STACK_VERSION,
    E_CLD_BAS_ATTR_ID_HARDWARE_VERSION,
    E_CLD_BAS_ATTR_ID_MANUFACTURER_NAME,
    E_CLD_BAS_ATTR_ID_MODEL_IDENTIFIER,
    E_CLD_BAS_ATTR_ID_DATE_CODE,
    E_CLD_BAS_ATTR_ID_POWER_SOURCE, /* Mandatory */
    E_CLD_BAS_ATTR_ID_LOCATION_DESCRIPTION = 0x0010,
    E_CLD_BAS_ATTR_ID_PHYSICAL_ENVIRONMENT,
    E_CLD_BAS_ATTR_ID_DEVICE_ENABLED,
    E_CLD_BAS_ATTR_ID_ALARM_MASK,
    E_CLD_BAS_ATTR_ID_DISABLE_LOCAL_CONFIG,
    E_CLD_BAS_ATTR_ID_SW_BUILD_ID = 0x4000
} teCLD_BAS_ClusterID;

Parent topic:Enumerations

teCLD_BAS_PowerSource

The following enumerations are used in the Basic cluster to specify the power source for a device (see above):

typedef enum 
{
    E_CLD_BAS_PS_UNKNOWN = 0x00,
    E_CLD_BAS_PS_SINGLE_PHASE_MAINS,
    E_CLD_BAS_PS_THREE_PHASE_MAINS,
    E_CLD_BAS_PS_BATTERY,
    E_CLD_BAS_PS_DC_SOURCE,
    E_CLD_BAS_PS_EMERGENCY_MAINS_CONSTANTLY_POWERED,
    E_CLD_BAS_PS_EMERGENCY_MAINS_AND_TRANSFER_SWITCH,
    E_CLD_BAS_PS_UNKNOWN_BATTERY_BACKED = 0x80,
    E_CLD_BAS_PS_SINGLE_PHASE_MAINS_BATTERY_BACKED,
    E_CLD_BAS_PS_THREE_PHASE_MAINS_BATTERY_BACKED,
    E_CLD_BAS_PS_BATTERY_BATTERY_BACKED,
    E_CLD_BAS_PS_DC_SOURCE_BATTERY_BACKED,
    E_CLD_BAS_PS_EMERGENCY_MAINS_CONSTANTLY_POWERED_BATTERY_BACKED,
    E_CLD_BAS_PS_EMERGENCY_MAINS_AND_TRANSFER_SWITCH_BATTERY_BACKED,
} teCLD_BAS_PowerSource;

The power source enumerations are described in the table below.

Enumeration

Description

E_CLD_BAS_PS_UNKNOWN

Unknown power source

E_CLD_BAS_PS_SINGLE_PHASE_MAINS

Single-phase mains powered

E_CLD_BAS_PS_THREE_PHASE_MAINS

Three-phase mains powered

E_CLD_BAS_PS_BATTERY

Battery powered

E_CLD_BAS_PS_DC_SOURCE

DC source

E_CLD_BAS_PS_EMERGENCY_MAINS_CONSTANTLY_POWERED

Constantly powered from emergency mains supply

E_CLD_BAS_PS_EMERGENCY_MAINS_AND_TRANSFER_SWITCH

Powered from emergency mains supply via transfer switch

E_CLD_BAS_PS_UNKNOWN_BATTERY_BACKED

Unknown power source but battery back-up

E_CLD_BAS_PS_SINGLE_PHASE_MAINS_BATTERY_BACKED

Single-phase mains powered with battery back-up

E_CLD_BAS_PS_THREE_PHASE_MAINS_BATTERY_BACKED

Three-phase mains powered with battery back-up

E_CLD_BAS_PS_BATTERY_BATTERY_BACKED

Battery powered with battery back-up

E_CLD_BAS_PS_DC_SOURCE_BATTERY_BACKED

DC source with battery back-up

E_CLD_BAS_PS_EMERGENCY_MAINS_CONSTANTLY_POWERED_BATTERY_BACKED

Constantly powered from emergency mains supply with battery back-up

E_CLD_BAS_PS_EMERGENCY_MAINS_AND_TRANSFER_SWITCH_BATTERY_BACKED

Powered from emergency mains supply via transfer switch with battery back-up

Parent topic:Enumerations

teCLD_BAS_GenericDeviceClass

The following enumerations are used in the Basic cluster to specify the Device Classes:

typedef enum 
{
    E_CLD_BAS_GENERIC_DEVICE_CLASS_LIGHTING         = 0x00,
} teCLD_BAS_GenericDeviceClass;

Parent topic:Enumerations

eCLD_BAS_GenericDeviceType

The following enumerations are used in the Basic cluster to specify the Device Types:

typedef enum 
{
    E_CLD_BAS_GENERIC_DEVICE_TYPE_INCANDESCENT       = 0x00,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_SPOTLIGHT_HALOGEN,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_HALOGEN_BULB,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_CFL,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_LINEAR_FLUORESCENT,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_LED_BULB,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_SPOTLIGHT_LED,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_LED_STRIP,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_LED_TUBE,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_INDOOR_LUMINAIRE,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_OUTDOOR_LUMINAIRE,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_PENDANT_LUMINAIRE,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_FLOOR_STANDING_LUMINAIRE,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_CONTROLLER        = 0xE0,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_WALL_SWITCH,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_PORTABLE_REMOTE_CONTROLLER,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_MOTION_OR_LIGHT_SENSOR,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_ACTUATOR         = 0xF0,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_WALL_SOCKET,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_GATEWAY_OR_BRIDGE,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_PLUG_IN_UNIT,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_RETROFIT_ACTUATOR,
    E_CLD_BAS_GENERIC_DEVICE_TYPE_UNSPECIFIED     = 0xFF
} teCLD_BAS_GenericDeviceType;

Parent topic:Enumerations

teCLD_BAS_PhysicalEnvironment

The following enumerations are used in the Basic cluster to specify the Physical Environment:

typedef enum 
{
    E_CLD_BAS_PE_UNSPECIFIED            = 0x00,
    E_CLD_BAS_PE_MIRROR,
    E_CLD_BAS_PE_ATRIUM,
    E_CLD_BAS_PE_BAR,
    E_CLD_BAS_PE_COURTYARD,
    E_CLD_BAS_PE_BATHROOM,
    E_CLD_BAS_PE_BEDROOM,
    E_CLD_BAS_PE_BILLIARD_ROOM,
    E_CLD_BAS_PE_UTILITY_ROOM,
    E_CLD_BAS_PE_CELLAR,
    E_CLD_BAS_PE_STORAGE_CLOSET,
    E_CLD_BAS_PE_THREATER,
    E_CLD_BAS_PE_OFFICE_0x0B,
    E_CLD_BAS_PE_DECK,
    E_CLD_BAS_PE_DEN,
    E_CLD_BAS_PE_DINNING_ROOM,
    E_CLD_BAS_PE_ELECTRICAL_ROOM,
    E_CLD_BAS_PE_ELEVATOR,
    E_CLD_BAS_PE_ENTRY,
    E_CLD_BAS_PE_FAMILY_ROOM,
    E_CLD_BAS_PE_MAIN_FLOOR,
    E_CLD_BAS_PE_UPSTAIRS,
    E_CLD_BAS_PE_DOWNSTAIRS,
    E_CLD_BAS_PE_BASEMENT_LOWER_LEVEL,
    E_CLD_BAS_PE_GALLERY,
    E_CLD_BAS_PE_GAME_ROOM,
    E_CLD_BAS_PE_GARAGE,
    E_CLD_BAS_PE_GYM,
    E_CLD_BAS_PE_HALLWAY,
    E_CLD_BAS_PE_HOUSE,
    E_CLD_BAS_PE_KITCHEN,
    E_CLD_BAS_PE_LAUNDRY_ROOM,
    E_CLD_BAS_PE_LIBRARY,
    E_CLD_BAS_PE_MASTER_BEDROOM,
    E_CLD_BAS_PE_MUD_ROOM,
    E_CLD_BAS_PE_NURSERY,
    E_CLD_BAS_PE_PANTRY,
    E_CLD_BAS_PE_OFFICE_0X24,
    E_CLD_BAS_PE_OUTSIDE,
    E_CLD_BAS_PE_POOL,
    E_CLD_BAS_PE_PORCH,
    E_CLD_BAS_PE_SEWING_ROOM,
    E_CLD_BAS_PE_SITTING_ROOM,
    E_CLD_BAS_PE_STAIRWAY,
    E_CLD_BAS_PE_YARD,
    E_CLD_BAS_PE_ATTIC,
    E_CLD_BAS_PE_HOT_TUB,
    E_CLD_BAS_PE_LIVING_ROOM_0X2E,
    E_CLD_BAS_PE_SAUNA,
    E_CLD_BAS_PE_SHOP_WORKSHOP,
    E_CLD_BAS_PE_GUEST_BEDROOM,
    E_CLD_BAS_PE_GUEST_BATH,
    E_CLD_BAS_PE_POWDER_ROOM,
    E_CLD_BAS_PE_BACK_YARD,
    E_CLD_BAS_PE_FRONT_YARD,
    E_CLD_BAS_PE_PATIO,
    E_CLD_BAS_PE_DRIVEWAY,
    E_CLD_BAS_PE_SUN_ROOM,
    E_CLD_BAS_PE_LIVING_ROOM_0X39,
    E_CLD_BAS_PE_SPA,
    E_CLD_BAS_PE_WHIRLPOOL,
    E_CLD_BAS_PE_SHED,
    E_CLD_BAS_PE_EQUIPMENT_STORAGE,
    E_CLD_BAS_PE_HOBBY_CRAFT_ROOM,
    E_CLD_BAS_PE_FOUNTAIN,
    E_CLD_BAS_PE_POND,
    E_CLD_BAS_PE_RECEPTION_ROOM,
    E_CLD_BAS_PE_BREAKFAST_ROOM,
    E_CLD_BAS_PE_NOOK,
    E_CLD_BAS_PE_GARDEN,
    E_CLD_BAS_PE_PANIC_ROOM,
    E_CLD_BAS_PE_TERRACE,
    E_CLD_BAS_PE_ROOF,
    E_CLD_BAS_PE_TOILET,
    E_CLD_BAS_PE_TOILET_MAIN,
    E_CLD_BAS_PE_OUTSIDE_TOILET,
    E_CLD_BAS_PE_SHOWER_ROOM,
    E_CLD_BAS_PE_STUDY,
    E_CLD_BAS_PE_FRONT_GARDEN,
    E_CLD_BAS_PE_BACK_GARDEN,
    E_CLD_BAS_PE_KETTLE,
    E_CLD_BAS_PE_TELEVISION,
    E_CLD_BAS_PE_STOVE,
    E_CLD_BAS_PE_MICROWAVE,
    E_CLD_BAS_PE_TOASTER,
    E_CLD_BAS_PE_VACUMM,
    E_CLD_BAS_PE_APPLIANCE,
    E_CLD_BAS_PE_FRONT_DOOR,
    E_CLD_BAS_PE_BACK_DOOR,
    E_CLD_BAS_PE_FRIDGE_DOOR,
    E_CLD_BAS_PE_MEDICATION_CABINET_DOOR,
    E_CLD_BAS_PE_WARDROBE_DOOR,
    E_CLD_BAS_PE_FRONT_CUPBOARD_DOOR,
    E_CLD_BAS_PE_OTHER_DOOR,
    E_CLD_BAS_PE_WAITING_ROOM,
    E_CLD_BAS_PE_TRIAGE_ROOM,
    E_CLD_BAS_PE_DOCTOR_OFFICE,
    E_CLD_BAS_PE_PATIENT_PRIVATE_ROOM,
    E_CLD_BAS_PE_CONSULTATION_ROOM,
    E_CLD_BAS_PE_NURSE_STATION,
    E_CLD_BAS_PE_WARD,
    E_CLD_BAS_PE_COORIDOR,
    E_CLD_BAS_PE_OPERATING_THREATER,
    E_CLD_BAS_PE_DENTAL_SURGERY_ROOM,
    E_CLD_BAS_PE_MEDICAL_IMAGING_ROOM,
    E_CLD_BAS_PE_DECONTAMINATION_ROOM,
    E_CLD_BAS_PE_UNKNOWN_ENVIRONMENT
} teCLD_BAS_PhysicalEnvironment;

Parent topic:Enumerations

Parent topic:Basic Cluster

Compile-time options

To enable the Basic cluster in the code to be built, it is necessary to add the following to the zcl_options.h file:

#define CLD_BASIC

In addition, to include the software for a cluster client or server or both, it is necessary to add one or both of the following to the same file:

#define BASIC_CLIENT
#define BASIC_SERVER

The Basic cluster contains macros that may be optionally specified at compile-time by adding some or all of the following lines to the zcl_options.h file.

Optional Attributes

Add this line to enable the optional Application Version attribute:

#define   CLD_BAS_ATTR_APPLICATION_VERSION

Add this line to enable the optional Stack Version attribute:

#define   CLD_BAS_ATTR_STACK_VERSION

Add this line to enable the optional Hardware Version attribute:

#define   CLD_BAS_ATTR_HARDWARE_VERSION

Add this line to enable the optional Manufacturer Name attribute:

#define   CLD_BAS_ATTR_MANUFACTURER_NAME

Add this line to enable the optional Model Identifier attribute:

#define   CLD_BAS_ATTR_MODEL_IDENTIFIER

Add this line to enable the optional Date Code attribute:

#define   CLD_BAS_ATTR_DATE_CODE

Add this line to enable the optional Generic Class Device attribute:

#define CLD_BAS_ATTR_GENERIC_DEVICE_CLASS

Add this line to enable the optional Generic Device Type attribute:

#define CLD_BAS_ATTR_GENERIC_DEVICE_TYPE

Add this line to enable the optional Product Code attribute:

#define CLD_BAS_ATTR_PRODUCT_CODE

Add this line to enable the optional Product URL attribute:

#define CLD_BAS_ATTR_PRODUCT_URL

Add this line to enable the optional Location Description attribute:

#define   CLD_BAS_ATTR_LOCATION_DESCRIPTION

Add this line to enable the optional Physical Environment attribute:

#define   CLD_BAS_ATTR_PHYSICAL_ENVIRONMENT

Add this line to enable the optional Device Enabled attribute:

#define   CLD_BAS_ATTR_DEVICE_ENABLED

Add this line to enable the optional Alarm Mask attribute:

#define   CLD_BAS_ATTR_ALARM_MASK

Add this line to enable the optional Disable Local Config attribute:

#define   CLD_BAS_ATTR_DISABLE_LOCAL_CONFIG

Add this line to enable the optional Software Build ID attribute:

#define   CLD_BAS_ATTR_SW_BUILD_ID

Global Attributes

Add this line to define the value (n) of the Cluster Revision attribute:

#define CLD_BAS_CLUSTER_REVISION <n>

The default value is 1, which corresponds to the revision of the cluster in the ZCL r6 specification (see Section 2.4).

Optional Commands

Add this line to enable the optional Reset To Factory Defaults command on the client and server:

#define CLD_BAS_CMD_RESET_TO_FACTORY_DEFAULTS

Product Code Length

The default length of the product code contained in the attributes sProductCode and au8ProductCode[] can be defined by adding the following line:

#define CLD_BAS_PCODE_SIZE <n>

where <n> is the default number characters in the product code.

The maximum length of the product code contained in the attributes sProductCode and au8ProductCode[] can be defined by adding the following line:

#define CLD_BASIC_MAX_NUMBER_OF_BYTES_PRODUCT_CODE <n>

where <n> is the maximum number characters in the product code.

Product URL Length

The default length of the product URL contained in the attributes sProductURL and au8ProductURL[] can be defined by adding the following line:

#define CLD_BAS_URL_SIZE <n>

where <n> is the default number characters in the product URL.

The maximum length of the product URL contained in the attributes sProductURL and au8ProductURL[] can be defined by adding the following line:

#define CLD_BASIC_MAX_NUMBER_OF_BYTES_PRODUCT_URL <n>

where <n> is the maximum number characters in the product URL.

Parent topic:Basic Cluster