Touchlink functions
The following Touchlink functions are provided:
eZLL_RegisterCommissionEndPoint
teZCL_Status eZLL_RegisterCommissionEndPoint(
uint8 u8EndPointIdentifier,
tfpZCL_ZCLCallBackFunction cbCallBack,
tsZLL_CommissionEndpoint *psDeviceInfo);
Description
This function registers a ‘commissioning’ endpoint for Touchlink and creates a Touchlink Commissioning cluster instance on the endpoint.
Touchlink must have its own application (separate from the main application) on its own endpoint.
This function uses eCLD_ZllCommissionCreateCommission() to create the cluster instance. The type of cluster instance to be created (server or client, or both) is determined using the compile-time options in the header file zcl_options.h (refer to Section 44.10).
Parameters
u8EndPointIdentifier Identifier of endpoint to be registered - this is an endpoint number in the range 1 to 240
cbCallBack Pointer to a callback function to handle events associated with the registered endpoint
psDeviceInfo Pointer to structure to be used to hold Touchlink endpoint information (see Section 44.8.1)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
eCLD_ZllCommissionCreateCommission
teZCL_Status eCLD_ZllCommissionCreateCommission(
tsZCL_ClusterInstance *psClusterInstance,
bool_t bIsServer,
tsZCL_ClusterDefinition *psClusterDefinition,
void *pvSharedStructPtr,
tsZCL_AttributeStatus *psAttributeStatus,
tsCLD_ZllCommissionCustomDataStructure
*psCustomDataStructure);
Description
This function creates a Touchlink Commissioning cluster instance for Touchlink on the endpoint of the calling application. The type of cluster instance (server or client) to be created must be specified.
In practice, this function does not need to be called explicitly by the application, as the function eZLL_RegisterCommissionEndPoint() calls this function to create the cluster instance.
Parameters
psClusterInstance Pointer to cluster instance structure on local endpoint
bIsServer Type of cluster instance (server or client) to be created:
TRUE - server
FALSE - client
psClusterDefinition Pointer to cluster definition structure containing information about the cluster
pvSharedStructPtr Pointer to structure containing the shared storage for the cluster
psAttributeStatus Pointer to a structure containing the storage for each attribute’s status
psCustomDataStructure Pointer to custom data to be provided to the cluster (see Section 44.8.3)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
eCLD_ZllCommissionCommandScanReqCommandSend
eCLD_ZllCommissionCommandScanReqCommandSend(
ZPS_tsInterPanAddress *psDestinationAddress,
*pu8TransactionSequenceNumber,
tsCLD_ZllCommission_ScanReqCommandPayload
*psPayload);
Description
This function is used to send a Scan Request command to initiate a scan for other nodes in the local neighbourhood. The command is sent as an inter-PAN message.
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
psDestinationAddress Pointer to stucture containing PAN ID and address information for target node(s)
pu8TransactionSequenceNumber Pointer to a location to store the Transaction Sequence Number (TSN) of the request
psPayload Pointer to structure containing payload data for the Scan Request command (see Section44.8.5)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
eCLD_ZllCommissionCommandScanRspCommandSend
PUBLIC teZCL_Status eCLD_ZllCommissionCommandScanRspCommandSend(
ZPS_tsInterPanAddress *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_ZllCommission_ScanRspCommandPayload
*psPayload);
Description
This function is used to send a Scan Response command containing information about the local node in reply to a received Scan Request from a remote node. The command is sent as an inter-PAN message.
A pointer must be provided to a structure containing the data to be returned.
The specified Transaction Sequence Number (TSN) of the response must match the TSN of the corresponding request, as this will allow the response to be paired with the request at the destination.
Parameters
psDestinationAddress Pointer to stucture containing PAN ID and address information for target node
pu8TransactionSequenceNumber Pointer to location containing the Transaction Sequence Number (TSN) of the response
psPayload Pointer to structure containing payload data for the Scan Response command (see Section 44.8.6)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
eCLD_ZllCommissionCommandDeviceInfoReqCommandSend
teZCL_Status eCLD_ZllCommissionCommandDeviceInfoReqCommandSend(
ZPS_tsInterPanAddress *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber, tsCLD_ZllCommission_DeviceInfoReqCommandPayload *psPayload);
Description
This function is used to send a Device Information Request command to obtain information about the devices on a remote node. The command is sent as an inter-PAN message.
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
psDestinationAddress Pointer to stucture containing PAN ID and address information for target node
pu8TransactionSequenceNumber Pointer to a location to store the Transaction Sequence Number (TSN) of the request
psPayload Pointer to structure containing payload data for the Device Information Request command (see Section 44.8.7)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
eCLD_ZllCommissionCommandDeviceInfoRspCommandSend
PUBLIC teZCL_Status eCLD_ZllCommissionCommandDeviceInfoRspCommandSend(
ZPS_tsInterPanAddress *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_ZllCommission_DeviceInfoRspCommandPayload
*psPayload);
Description
This function is used to send a Device Information Response command containing information about the devices on the local node in reply to a received Device Information Request from a remote node. The command is sent as an inter-PAN message.
A pointer must be provided to a structure containing the data to be returned.
The specified Transaction Sequence Number (TSN) of the response must match the TSN of the corresponding request, as this will allow the response to be paired with the request at the destination.
Parameters
psDestinationAddress Pointer to stucture containing PAN ID and address information for target node
pu8TransactionSequenceNumber Pointer to location containing the Transaction Sequence Number (TSN) of the response
psPayload Pointer to structure containing payload data for the Device Information Response command (see Section 44.8.8)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
eCLD_ZllCommissionCommandDeviceIdentifyReqCommandSend
teZCL_Status eCLD_ZllCommissionCommandDeviceIdentifyReqCommandSend(
ZPS_tsInterPanAddress *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_ZllCommission_IdentifyReqCommandPayload
*psPayload);
Description
This function is used to send an Identify Request command to ask a remote node to identify itself by entering ‘identify mode’ (this is a visual indication, such as flashing a LED). The command is sent as an inter-PAN message.
The command payload contains a value indicating the length of time, in seconds, that the target device should remain in identify mode. It is also possible to use this command to instruct the target node to immediately exit identify mode (if it is already in this mode).
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
psDestinationAddress Pointer to stucture containing PAN ID and address information for target node
pu8TransactionSequenceNumber Pointer to a location to store the Transaction Sequence Number (TSN) of the request
psPayload Pointer to structure containing payload data for the Identify Request command (see Section 44.8.9)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
eCLD_ZllCommissionCommandFactoryResetReqCommandSend
teZCL_Status eCLD_ZllCommissionCommandFactoryResetReqCommandSend(
ZPS_tsInterPanAddress *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_ZllCommission_FactoryResetReqCommandPayload
*psPayload);
Description
This function is used to send a Reset to Factory New Request command to ask a remote node to return to its ‘factory new’ state. The command is sent as an inter-PAN message.
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
psDestinationAddress Pointer to stucture containing PAN ID and address information for target node
pu8TransactionSequenceNumber Pointer to a location to store the Transaction Sequence Number (TSN) of the request
psPayload Pointer to structure containing payload data for the Reset to Factory New Request command (see Section 44.8.10)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
eCLD_ZllCommissionCommandNetworkStartReqCommandSend
teZCL_Status eCLD_ZllCommissionCommandNetworkStartReqCommandSend(
ZPS_tsInterPanAddress *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_ZllCommission_NetworkStartReqCommandPayload
*psPayload);
Description
This function is used to send a Network Start Request command to create a new network with a detected Router. The command is sent as an inter-PAN message.
The function is called once the results of a Scan Request command have been received and a detected Router has been selected.
The command payload contains information about the network and the local node, as well as certain data for the target node. This payload information is detailed in Section 44.8.11.
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
psDestinationAddress Pointer to stucture containing PAN ID and address information for target node
pu8TransactionSequenceNumber Pointer to a location to store the Transaction Sequence Number (TSN) of the request
psPayload Pointer to structure containing payload data for the Network Start Request command (see Section 44.8.11)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
eCLD_ZllCommissionCommandNetworkStartRspCommandSend
PUBLIC teZCL_Status eCLD_ZllCommissionCommandNetworkStartRspCommandSend(
ZPS_tsInterPanAddress *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_ZllCommission_NetworkStartRspCommandPayload
*psPayload);
Description
This function is used to send a Network Start Response command to confirm that the local (Router) node is ready to be the first node to join a newly created network in reply to a received Network Start Request from a remote node. The command is sent as an inter-PAN message.
A pointer must be provided to a structure containing the data to be returned.
The specified Transaction Sequence Number (TSN) of the response must match the TSN of the corresponding request, as this will allow the response to be paired with the request at the destination.
Parameters
psDestinationAddress Pointer to stucture containing PAN ID and address information for target node
pu8TransactionSequenceNumber Pointer to location containing the Transaction Sequence Number (TSN) of the response
psPayload Pointer to structure containing payload data for the Network Start Response command (see Section 44.8.12)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
eCLD_ZllCommissionCommandNetworkJoinRouterReqCommandSend
teZCL_Status eCLD_ZllCommissionCommandNetworkJoinRouterReqCommandSend(
ZPS_tsInterPanAddress *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_ZllCommission_NetworkJoinRouterReqCommandPayload
*psPayload);
Description
This function is used to send a Network Join Router Request command to allow a detected Router to join the created network. The command is sent as an inter-PAN message.
The function can be called once a network has been created. The target Router is distinct from the Router that was included when network was created.
The command payload contains information about the network and the local node, as well as certain data for the target node. This payload information is detailed in Section 44.8.13.
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
psDestinationAddress Pointer to stucture containing PAN ID and address information for target node
pu8TransactionSequenceNumber Pointer to a location to store the Transaction Sequence Number (TSN) of the request
psPayload Pointer to structure containing payload data for the Network Join Router Request command (see Section 44.8.13)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
eCLD_ZllCommissionCommandNetworkJoinRouterRspCommandSend
PUBLIC teZCL_Status eCLD_ZllCommissionCommandNetworkJoinRouterRspCommandSend(
ZPS_tsInterPanAddress psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_ZllCommission_NetworkJoinRouterRspCommandPayload
*psPayload);
Description
This function is used to send a Network Join Router Response command to confirm that the local (Router) node is ready to join a network in reply to a received Network Join Router Request from a remote node. The command is sent as an inter-PAN message.
A pointer must be provided to a structure containing the data to be returned.
The specified Transaction Sequence Number (TSN) of the response must match the TSN of the corresponding request, as this will allow the response to be paired with the request at the destination.
Parameters
psDestinationAddress Pointer to stucture containing PAN ID and address information for target node
psDestinationAddress Pointer to location containing the Transaction Sequence Number (TSN) of the response
*psPayload Pointer to structure containing payload data for the Network Join Router Response command (see Section 44.8.14)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
eCLD_ZllCommissionCommandNetworkJoinEndDeviceReqCommandSend
teZCL_Status eCLD_ZllCommissionCommandNetworkJoinEndDeviceReqCommandSend(
ZPS_tsInterPanAddress *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_ZllCommission_NetworkJoinEndDeviceReqCommandPayload
*psPayload);
Description
This function is used to send a Network Join End Device Request command to allow a detected End Device to join the created network. The command is sent as an inter-PAN message.
The function can be called once a network has been created.
The command payload contains information about the network and the local node, as well as certain data for the target node. This data includes a range of network addresses and a range of group IDs from which the target End Device can assign values to the other nodes - in this case, the End Device would typically be a remote control unit. This payload information is detailed in Section 44.8.15.
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
psDestinationAddress: Pointer to stucture containing PAN ID and address information for target node
pu8TransactionSequenceNumber: Pointer to a location to store the Transaction Sequence Number (TSN) of the request
psPayload: Pointer to structure containing payload data for the Network Join End Device Request command (see Section 44.8.15)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
eCLD_ZllCommissionCommandNetworkJoinEndDeviceRspCommandSend
PUBLIC teZCL_Status eCLD_ZllCommissionCommandNetworkJoinEndDeviceRspCommandSend(
ZPS_tsInterPanAddress *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_ZllCommission_NetworkJoinEndDeviceRspCommandPayload
*psPayload);
Description
This function is used to send a Network Join End Device Response command to confirm that the local (End Device) node is ready to join a network in reply to a received Network Join End Device Request from a remote node. The command is sent as an inter-PAN message.
A pointer must be provided to a structure containing the data to be returned.
The specified Transaction Sequence Number (TSN) of the response must match the TSN of the corresponding request, as this will allow the response to be paired with the request at the destination.
Parameters
psDestinationAddress Pointer to stucture containing PAN ID and address information for target node
pu8TransactionSequenceNumber Pointer to location containing the Transaction Sequence Number (TSN) of the response
psPayload Pointer to structure containing payload data for the Network Join End Device Response command (see Section 44.8.16)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
eCLD_ZllCommissionCommandNetworkUpdateReqCommandSend
teZCL_Status eCLD_ZllCommissionCommandNetworkUpdateReqCommandSend(
ZPS_tsInterPanAddress *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_ZllCommission_NetworkUpdateReqCommandPayload
*psPayload);
Description
This function is used to send a Network Update Request command to bring a node that has missed a network update back into the network. The command is sent as an inter-PAN message.
The command payload contains information about the network, including the current value of the Network Update Identifier. This identifier takes a value in the range 0x00 to 0xFF and is incremented when a network update has occurred (the value wraps around at 0xFF). Thus, if this value in the payload is more recent than the value of this identifier held by the target node, the node should update its network settings using the values in the rest of the payload. The payload information is detailed in Section 44.8.17.
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
psDestinationAddress Pointer to stucture containing PAN ID and address information for target node
pu8TransactionSequenceNumber Pointer to a location to store the Transaction Sequence Number (TSN) of the request
psPayload Pointer to structure containing payload data for the Network Update Request command (see Section 44.8.17)
Returns
E_ZCL_SUCCESS
Parent topic:Touchlink functions
Parent topic:Functions