Zigbee Protocol Controller 1.6.0
ZigPC Command Mapper Internal API

The ZigPC Command Mapper internal API contains interfaces to translate MQTT messages into ZCL frames. More...

Functions

sl_status_t zigpc_command_mapper_register_dotdot_mqtt_handlers (void)
 Setup DotDot MQTT Command Translator handlers autogenerated in Command Mapper. More...
 
sl_status_t zigpc_command_mapper_mqtt_bygroup_handlers_init (void)
 Setup MQTT handlers for processing group-based commands. More...
 
sl_status_t zigpc_command_mapper_populate_eui64 (const char *unid, zigbee_eui64_t eui64)
 Convert the UNID into EUI64. More...
 
sl_status_t zigpc_command_mapper_cluster_support_check (const dotdot_unid_t unid, zigbee_endpoint_id_t endpoint_id, zcl_cluster_id_t cluster_id)
 Determine if a cluster is serviced by the UNID/Endpoint combination. More...
 
sl_status_t zigpc_command_mapper_send_unicast (const dotdot_unid_t unid, const dotdot_endpoint_id_t endpoint, const zigpc_zcl_frame_type_t frame_type, const zcl_cluster_id_t cluster_id, const zcl_command_id_t command_id, const size_t command_arg_count, const zigpc_zcl_frame_data_t *const command_arg_list)
 Send a ZCL unicast command based on the information provided. More...
 
sl_status_t zigpc_command_mapper_handle_groups (zigbee_eui64_t eui64, const dotdot_endpoint_id_t endpoint, const zcl_cluster_id_t cluster_id, const zcl_command_id_t command_id, const size_t command_arg_count, const zigpc_zcl_frame_data_t *const command_arg_list)
 Process unicast Groups cluster messages. More...
 
sl_status_t zigpc_cmdmapper_redirect_to_unicast (zigbee_group_id_t group_id, zigpc_zcl_frame_type_t frame_type, zcl_cluster_id_t cluster_id, zcl_command_id_t command_id, size_t command_arg_count, const zigpc_zcl_frame_data_t *const command_arg_list)
 Redirect cluster messages to unicast based on the group members (EUI64/endpoint identifiers) associated with a GroupID. For each group member, this function will call zigpc_command_mapper_send_unicast with the EUI64-based UNID and endpoint information. More...
 
sl_status_t zigpc_command_mapper_send_multicast (const zigbee_group_id_t multicast_id, const zigpc_zcl_frame_type_t frame_type, const zcl_cluster_id_t cluster_id, const zcl_command_id_t command_id, const size_t command_arg_count, const zigpc_zcl_frame_data_t *const command_arg_list)
 Send a ZCL multicast command based on the information provided. More...
 
sl_status_t zigpc_command_mapper_setup_gen_cmd_publish_listeners (void)
 Setup listeners for ZCL cluster specific commands sent from PAN nodes to the gateway. More...
 
void zigpc_command_mapper_cleanup_gen_cmd_publish_listeners (void)
 Cleanup listeners for ZCL cluster specific commands sent from PAN nodes to the gateway. More...
 

Detailed Description

The ZigPC Command Mapper internal API contains interfaces to translate MQTT messages into ZCL frames.

Function Documentation

◆ zigpc_cmdmapper_redirect_to_unicast()

sl_status_t zigpc_cmdmapper_redirect_to_unicast ( zigbee_group_id_t  group_id,
zigpc_zcl_frame_type_t  frame_type,
zcl_cluster_id_t  cluster_id,
zcl_command_id_t  command_id,
size_t  command_arg_count,
const zigpc_zcl_frame_data_t *const  command_arg_list 
)

Redirect cluster messages to unicast based on the group members (EUI64/endpoint identifiers) associated with a GroupID. For each group member, this function will call zigpc_command_mapper_send_unicast with the EUI64-based UNID and endpoint information.

Parameters
group_idGroupId to lookup members.
frame_typeZCL frame control data to send.
cluster_idCluster ID to send.
command_idCommand ID to send.
command_arg_countCommand argument count.
command_arg_listCommand argument list.
Returns
sl_status_t

◆ zigpc_command_mapper_cleanup_gen_cmd_publish_listeners()

void zigpc_command_mapper_cleanup_gen_cmd_publish_listeners ( void  )

Cleanup listeners for ZCL cluster specific commands sent from PAN nodes to the gateway.

◆ zigpc_command_mapper_cluster_support_check()

sl_status_t zigpc_command_mapper_cluster_support_check ( const dotdot_unid_t  unid,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_id_t  cluster_id 
)

Determine if a cluster is serviced by the UNID/Endpoint combination.

Parameters
unidUNID to check
endpoint_idEndpoint ID to check
cluster_idCluster ID to check
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER on invalid unid, SL_STATUS_NOT_FOUND if the UNID/endpoint/cluster combination is not found.

◆ zigpc_command_mapper_handle_groups()

sl_status_t zigpc_command_mapper_handle_groups ( zigbee_eui64_t  eui64,
const dotdot_endpoint_id_t  endpoint,
const zcl_cluster_id_t  cluster_id,
const zcl_command_id_t  command_id,
const size_t  command_arg_count,
const zigpc_zcl_frame_data_t *const  command_arg_list 
)

Process unicast Groups cluster messages.

Parameters
eui64Destination device identifer.
endpointDestination device endpoint.
cluster_idCommand cluster ID.
command_idCommand ID.
command_arg_countCommand argument count.
command_arg_listCommand argument list.
Returns
sl_status_t

◆ zigpc_command_mapper_mqtt_bygroup_handlers_init()

sl_status_t zigpc_command_mapper_mqtt_bygroup_handlers_init ( void  )

Setup MQTT handlers for processing group-based commands.

Returns
sl_status_t Always returns SL_STATUS_OK.

◆ zigpc_command_mapper_populate_eui64()

sl_status_t zigpc_command_mapper_populate_eui64 ( const char *  unid,
zigbee_eui64_t  eui64 
)

Convert the UNID into EUI64.

Parameters
unidUnify UNID character array
eui64Destination Zigbee EUI64 to populate
Returns
sl_status_t SL_STATUS_OK on success, or error on failure to convert UNID to EUI64.

◆ zigpc_command_mapper_register_dotdot_mqtt_handlers()

sl_status_t zigpc_command_mapper_register_dotdot_mqtt_handlers ( void  )

Setup DotDot MQTT Command Translator handlers autogenerated in Command Mapper.

Returns
sl_status_t Always returns SL_STATUS_OK.

◆ zigpc_command_mapper_send_multicast()

sl_status_t zigpc_command_mapper_send_multicast ( const zigbee_group_id_t  multicast_id,
const zigpc_zcl_frame_type_t  frame_type,
const zcl_cluster_id_t  cluster_id,
const zcl_command_id_t  command_id,
const size_t  command_arg_count,
const zigpc_zcl_frame_data_t *const  command_arg_list 
)

Send a ZCL multicast command based on the information provided.

Parameters
multicast_idMulticast ID targeted.
frame_typeZCL frame control data to send.
cluster_idcluster ID that will be targeted.
command_idcluster command ID to be sent.
command_arg_countNumber of ZCL command arguments.
command_arg_listlist of ZCL command arguments (or NULL if no arguments are supported by the command).
Returns
sl_status_t SL_STATUS_OK if successfully sent, SL_STATUS_INVALID_RANGE on invalid group id received, or error otherwise.

◆ zigpc_command_mapper_send_unicast()

sl_status_t zigpc_command_mapper_send_unicast ( const dotdot_unid_t  unid,
const dotdot_endpoint_id_t  endpoint,
const zigpc_zcl_frame_type_t  frame_type,
const zcl_cluster_id_t  cluster_id,
const zcl_command_id_t  command_id,
const size_t  command_arg_count,
const zigpc_zcl_frame_data_t *const  command_arg_list 
)

Send a ZCL unicast command based on the information provided.

Parameters
unidUNID that will be converted into EUI64.
endpointendpoint that will be targeted.
frame_typeZCL frame control data to send.
cluster_idcluster ID that will be targeted.
command_idcluster command ID to be sent.
command_arg_countNumber of ZCL command arguments.
command_arg_listlist of ZCL command arguments (or NULL if no arguments are supported by the command).
Returns
sl_status_t SL_STATUS_OK if successfully sent, SL_STATUS_NULL_POINTER on invliad input received, or error otherwise.

◆ zigpc_command_mapper_setup_gen_cmd_publish_listeners()

sl_status_t zigpc_command_mapper_setup_gen_cmd_publish_listeners ( void  )

Setup listeners for ZCL cluster specific commands sent from PAN nodes to the gateway.

Returns
sl_status_t SL_STATUS_OK on successfully registing listeners for all commands supported, error otherwise.