Z-Stack API Reference  4.20.00.11
ZCL Porting Layer
typedef uint8_t(* zclport_pFnZclHandleExternal) (zclIncoming_t *pInMsg)
 Function pointer definition to callback ZCL handler external function. More...
 
bool zclport_registerEndpoint (uint8_t entity, endPointDesc_t *pEpDesc)
 Register an AF Endpoint. This is needed by the ZCL code to find an AF endpoint descriptor. More...
 
void zclport_registerNV (NVINTF_nvFuncts_t *pfnNV, uint16_t sceneNVID)
 Call to register the function pointers for the NV driver. More...
 
void zclport_registerZclHandleExternal (zclport_pFnZclHandleExternal pfn)
 Call to register a function pointer to handle zcl_HandleExternal() messages. More...
 
zstack_sysNwkInfoReadRsp_tzclport_getDeviceInfo (uint8_t entity)
 Call to get Device Information. More...
 
bool zclport_isAlreadyPartOfNetwork (uint8_t entity)
 Determines if the device is already part of a network by asking the stack thread.
"Part of the Network" means that the device's network state is that of an end device or router/coordinator in a network, and not initialized or in an intermediate state (like scannning, joining or rejoining). A good use of this function would be to call this function before starting the device, to "pre"-determine if the device needs to join a network or just start from the parameters already in NV. More...
 
uint8_t zclport_initializeNVItem (uint16_t id, uint16_t subId, uint16_t len, void *buf)
 If the NV item does not already exist, it is created and initialized with the data passed to the function, if any. More...
 
uint8_t zclport_writeNV (uint16_t id, uint16_t subId, uint16_t len, void *buf)
 Write a data item to NV. Function can write an entire item to NV or an element of an item by indexing into the item with an offset. More...
 
uint8_t zclport_readNV (uint16_t id, uint16_t subId, uint16_t ndx, uint16_t len, void *buf)
 Read data from NV. This function can be used to read an entire item from NV or an element of an item by indexing into the item with an offset. Read data is copied into buf. More...
 
uint8_t zclport_deleteNV (uint16_t id, uint16_t subId, uint16_t len)
 
afStatus_t zcl_AF_DataRequest (afAddrType_t *dstAddr, endPointDesc_t *srcEP, uint16_t cID, uint16_t bufLen, uint8_t *buf, uint8_t *transID, uint8_t options, uint8_t radius)
 
ZStatus_t zclport_aps_AddGroup (uint8_t endpoint, aps_Group_t *group)
 Add a group for an endpoint. More...
 

Detailed Description


This module is a collection of functions used to make the ZStack ZCL module portable between OSAL, Linux and TI-RTOS.
The ZCL parsing/building functions, along with profile code, will call these functions and this module is responsible for performing the translation or function requested.
The following APIs are functions that the Application needs to call to pass information that this porting layer needs. The other functions in this module are called by ZCL, not by the application.

Typedef Documentation

§ zclport_pFnZclHandleExternal

typedef uint8_t(* zclport_pFnZclHandleExternal) (zclIncoming_t *pInMsg)

Function pointer definition to callback ZCL handler external function.

Parameters
pInMsg- incoming message to process
Returns
TRUE if you've handle it, FALSE if not

Function Documentation

§ zclport_aps_AddGroup()

ZStatus_t zclport_aps_AddGroup ( uint8_t  endpoint,
aps_Group_t *  group 
)

Add a group for an endpoint.

Parameters
endpoint-
group- new group
Returns
ZStatus_t

§ zclport_getDeviceInfo()

zstack_sysNwkInfoReadRsp_t* zclport_getDeviceInfo ( uint8_t  entity)

Call to get Device Information.

Parameters
entity- The task entity ID.
Returns
pointer to structure containing info

Call to get Device Information.

Public function defined in zcl_port.h

§ zclport_initializeNVItem()

uint8_t zclport_initializeNVItem ( uint16_t  id,
uint16_t  subId,
uint16_t  len,
void *  buf 
)

If the NV item does not already exist, it is created and initialized with the data passed to the function, if any.

Parameters
id- NV ID
subId- NV ID
len- length of NV item
buf- pointer to NV item
Returns
status

If the NV item does not already exist, it is created and initialized with the data passed to the function, if any.

Public function defined in zcl_port.h

§ zclport_isAlreadyPartOfNetwork()

bool zclport_isAlreadyPartOfNetwork ( uint8_t  entity)

Determines if the device is already part of a network by asking the stack thread.
"Part of the Network" means that the device's network state is that of an end device or router/coordinator in a network, and not initialized or in an intermediate state (like scannning, joining or rejoining). A good use of this function would be to call this function before starting the device, to "pre"-determine if the device needs to join a network or just start from the parameters already in NV.

Parameters
entity- The task entity ID.
Returns
true if already part of a network, false if not

Determines if the device is already part of a network by asking the stack thread.

Public function defined in zcl_port.h

§ zclport_readNV()

uint8_t zclport_readNV ( uint16_t  id,
uint16_t  subId,
uint16_t  ndx,
uint16_t  len,
void *  buf 
)

Read data from NV. This function can be used to read an entire item from NV or an element of an item by indexing into the item with an offset. Read data is copied into buf.

Parameters
id- NV ID
subId- NV ID
ndx- offset into NV item
len- length of NV item to read
buf- pointer to NV item
Returns
status

Read data from NV. This function can be used to read an entire item from NV or an element of an item by indexing into the item with an offset. Read data is copied into buf.

Public function defined in zcl_port.h

§ zclport_registerEndpoint()

bool zclport_registerEndpoint ( uint8_t  entity,
endPointDesc_t *  pEpDesc 
)

Register an AF Endpoint. This is needed by the ZCL code to find an AF endpoint descriptor.

Parameters
entity- The task entity ID.
*pEpDesc- Pointer to an endpoint Descriptor.
Returns
true if added to table, false if table full

Register an AF Endpoint. This is needed by the ZCL code to find an AF endpoint descriptor.

Public function defined in zcl_port.h

§ zclport_registerNV()

void zclport_registerNV ( NVINTF_nvFuncts_t *  pfnNV,
uint16_t  sceneNVID 
)

Call to register the function pointers for the NV driver.

Parameters
pfnNV- pointer to the NV driver functions
sceneNVID- Scene Table NV ID

Call to register the functions pointers for the NV driver.

Public function defined in zcl_port.h

§ zclport_registerZclHandleExternal()

void zclport_registerZclHandleExternal ( zclport_pFnZclHandleExternal  pfn)

Call to register a function pointer to handle zcl_HandleExternal() messages.

Parameters
pfn- pointer to the function that handles ZCL External messages.

Call to register a function pointer to handle zcl_HandleExternal() messages.

Public function defined in zcl_port.h

§ zclport_writeNV()

uint8_t zclport_writeNV ( uint16_t  id,
uint16_t  subId,
uint16_t  len,
void *  buf 
)

Write a data item to NV. Function can write an entire item to NV or an element of an item by indexing into the item with an offset.

Parameters
id- NV ID
subId- NV ID
len- length of NV item to write
buf- pointer to NV item
Returns
status

Write a data item to NV. Function can write an entire item to NV or an element of an item by indexing into the item with an offset.

Public function defined in zcl_port.h