Zigbee Protocol Controller 1.6.0
ZigPC Gateway Component

Public command API for zigpc_gateway. More...

Modules

 ZigPC Observer API
 Observer API for getting events from zigpc_gateway.
 
 ZigPC Gateway Component
 The interface for interacting with sleepy messages.
 
 ZigPC Gateway Process Event API
 Observer API for getting events from zigpc_gateway.
 
 ZigPC Gateway Request Queue
 Request Queue API to send messages to EmberAf/ZigbeeHost layer.
 

Functions

sl_status_t zigpc_gateway_network_init (void)
 Request to initialize the Zigbee Network. The gateway will establish the Gateway device as a Zigbee Coordinator and Trust Center. On success, the "on_network_initialized" event will be set to components listening on zigpc_gateway notifications. More...
 
sl_status_t zigpc_gateway_network_permit_joins (bool enable)
 Request to enable/disable permitting Zigbee devices to join the network. More...
 
sl_status_t zigpc_gateway_send_zcl_command_frame (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_id_t cluster_id, const zcl_frame_t *frame)
 Request to send a ZCL frame to an end device. More...
 
sl_status_t zigpc_gateway_send_zcl_frame_multicast (zigbee_multicast_id_t multicast_id, zcl_cluster_id_t cluster_id, const zcl_frame_t *frame)
 Request to send a ZCL frame to a multicast group. More...
 
sl_status_t zigpc_gateway_configure_reports (const zigbee_eui64_t eui64, uint8_t endpoint_id, zcl_cluster_id_t cluster_id, const uint8_t *report_record, unsigned int record_size)
 Request to send a ZCL Configure Reporting command to an end device. More...
 
sl_status_t zigpc_gateway_request_binding (const zigbee_eui64_t source_eui64, uint8_t source_endpoint_id, zcl_cluster_id_t cluster_id, const zigbee_eui64_t dest_eui64, uint8_t dest_endpoint_id)
 Request to send a ZCL Configure Reporting command to an end device. More...
 
sl_status_t zigpc_gateway_request_unbind (const zigbee_eui64_t source_eui64, uint8_t source_endpoint_id, zcl_cluster_id_t cluster_id, const zigbee_eui64_t dest_eui64, uint8_t dest_endpoint_id)
 
sl_status_t zigpc_gateway_request_binding_endpoint (const zigbee_eui64_t eui64, const zigbee_endpoint_t endpoint, const zigbee_eui64_t gateway_eui64)
 Request to send a ZCL Configure Reporting command to an end device. More...
 
bool zigpc_gateway_install_code_is_valid (const uint8_t *install_code, uint8_t install_code_length)
 Validate if install code can be accepted by EmberAf layer. More...
 
sl_status_t zigpc_gateway_add_node (const zigbee_eui64_t node_eui64, const zigbee_install_code_t install_code, const uint8_t install_code_length, bool is_well_known_key_add)
 Request to add a node to the Zigbee Network using the Z3 Install Code Method. More...
 
sl_status_t zigpc_gateway_remove_node (const zigbee_eui64_t eui64)
 Request to remove node on the Zigbee Network. If the node is not on the Zigbee network, no device remove success events will be sent to listening components. More...
 
sl_status_t zigpc_gateway_discover_device (const zigbee_eui64_t eui64)
 Request to interview node on the Zigbee Network. If the node is not on the Zigbee network, no device or endpoint discovery notifications will be sent. More...
 
sl_status_t zigpc_gateway_discover_endpoint (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id)
 Request to interview device endpoint on the Zigbee Network. If the device is not on the Zigbee network, zero endpoint discovery information will be received as a response. More...
 
sl_status_t zigpc_gateway_add_ota_image (const char *filename, unsigned int filename_size)
 zigpc_gateway_add_ota_image - add an OTA image to the ota-server plugin More...
 
void zigpc_gateway_command_print_info (void)
 Send command to print ZigbeeHost info. More...
 
void zigpc_gateway_send_emberaf_command (char *array)
 Send command to the ember CLI. More...
 
void zigpc_gateway_command_print_nwk_key (void)
 Send command to print Ember NWK key. More...
 
sl_status_t zigpc_gateway_get_counters_list (uint16_t *list, size_t count)
 Populate counters values to list provided. More...
 
const char * zigpc_gateway_get_counters_entry_label (size_t offset)
 Get the label of the counters entry based on the offset passed in. More...
 
size_t zigpc_gateway_get_counters_capacity ()
 Get the counters capacity. More...
 
void zigpc_gateway_clear_counters ()
 clear the counter plugin tokens More...
 
sl_status_t zigpc_gateway_bootload_restart ()
 
uint8_t zigpc_gateway_get_neighbor_count ()
 Get current active count in the neighbor adress table. More...
 
sl_status_t zigpc_gateway_get_neighbor_eui64 (uint8_t index, zigbee_eui64_t eui64)
 Get a specific neighbor EUI64 from its index. More...
 
sl_status_t zigpc_gateway_process_setup (void)
 Set up the function for the zigpc_gateway component. More...
 
int zigpc_gateway_process_shutdown (void)
 Tear-down function for the zigpc_gateway component. More...
 

Detailed Description

Public command API for zigpc_gateway.

Set up and tear down the ZigPC gateway process.

TODO: Write component description for zigpc_gateway_process

Function Documentation

◆ zigpc_gateway_add_node()

sl_status_t zigpc_gateway_add_node ( const zigbee_eui64_t  node_eui64,
const zigbee_install_code_t  install_code,
const uint8_t  install_code_length,
bool  is_well_known_key_add 
)

Request to add a node to the Zigbee Network using the Z3 Install Code Method.

Parameters
node_eui64End device EUI64 in big-endian format
install_codeEnd device install code
install_code_lengthinstall code length
is_well_known_key_add
Returns
sl_status_t SL_STATUS_OK on request accepted by ZigPC Gateway, or error in reading and preparing data to be sent to ZigPC Gateway.

◆ zigpc_gateway_add_ota_image()

sl_status_t zigpc_gateway_add_ota_image ( const char *  filename,
unsigned int  filename_size 
)

zigpc_gateway_add_ota_image - add an OTA image to the ota-server plugin

Parameters
filename- the filepath of the requested OTA image
Returns
SL_STATUS_SUCCESS if able to add the filename properly

◆ zigpc_gateway_bootload_restart()

sl_status_t zigpc_gateway_bootload_restart ( )

◆ zigpc_gateway_clear_counters()

void zigpc_gateway_clear_counters ( )

clear the counter plugin tokens

◆ zigpc_gateway_command_print_info()

void zigpc_gateway_command_print_info ( void  )

Send command to print ZigbeeHost info.

◆ zigpc_gateway_command_print_nwk_key()

void zigpc_gateway_command_print_nwk_key ( void  )

Send command to print Ember NWK key.

◆ zigpc_gateway_configure_reports()

sl_status_t zigpc_gateway_configure_reports ( const zigbee_eui64_t  eui64,
uint8_t  endpoint_id,
zcl_cluster_id_t  cluster_id,
const uint8_t *  report_record,
unsigned int  record_size 
)

Request to send a ZCL Configure Reporting command to an end device.

Parameters
eui64End device EUI64 in big-endian format.
endpoint_idEnd device endpoint identifier.
cluster_idEnd device ZCL cluster identifier.
report_recordZCL report record to send.
record_sizeZCL report record size.
Returns
sl_status_t SL_STATUS_OK on request accepted by ZigPC Gateway, or error in reading and preparing data to be sent to ZigPC Gateway.

◆ zigpc_gateway_discover_device()

sl_status_t zigpc_gateway_discover_device ( const zigbee_eui64_t  eui64)

Request to interview node on the Zigbee Network. If the node is not on the Zigbee network, no device or endpoint discovery notifications will be sent.

NOTE: Callers should use a timeout to respond to failure in interviewing a device if no notifications are sent within that timeout.

Parameters
eui64End device EUI64 in big-endian format
Returns
sl_status_t SL_STATUS_OK on request accepted by ZigPC Gateway, or error in reading and preparing data to be sent to ZigPC Gateway.

◆ zigpc_gateway_discover_endpoint()

sl_status_t zigpc_gateway_discover_endpoint ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id 
)

Request to interview device endpoint on the Zigbee Network. If the device is not on the Zigbee network, zero endpoint discovery information will be received as a response.

NOTE: Callers should use a timeout to respond to failure in interviewing a device if no notifications are sent within that timeout.

Parameters
eui64Device identifier.
endpointEndpoint identifier.
Returns
sl_status_t SL_STATUS_OK on request accepted by ZigPC Gateway, or error in reading and preparing data to be sent to EmberAf.

◆ zigpc_gateway_get_counters_capacity()

size_t zigpc_gateway_get_counters_capacity ( )

Get the counters capacity.

Returns
size_t capacity

◆ zigpc_gateway_get_counters_entry_label()

const char * zigpc_gateway_get_counters_entry_label ( size_t  offset)

Get the label of the counters entry based on the offset passed in.

Parameters
offsetcounter entry offset to get label for.
Returns
const char* counter entry label if valid, NULL otherwise.

◆ zigpc_gateway_get_counters_list()

sl_status_t zigpc_gateway_get_counters_list ( uint16_t *  list,
size_t  count 
)

Populate counters values to list provided.

Parameters
listList provided.
sizeCapcity of list passed in.
Returns
sl_status SL_STATUS_OK on successful retrieval, SL_STATUS_NULL_POINTER on invalid input, or SL_STATUS_WOULD_OVERFLOW on insufficient capacity in list passed in.

◆ zigpc_gateway_get_neighbor_count()

uint8_t zigpc_gateway_get_neighbor_count ( )

Get current active count in the neighbor adress table.

◆ zigpc_gateway_get_neighbor_eui64()

sl_status_t zigpc_gateway_get_neighbor_eui64 ( uint8_t  index,
zigbee_eui64_t  eui64 
)

Get a specific neighbor EUI64 from its index.

◆ zigpc_gateway_install_code_is_valid()

bool zigpc_gateway_install_code_is_valid ( const uint8_t *  install_code,
uint8_t  install_code_length 
)

Validate if install code can be accepted by EmberAf layer.

Parameters
install_codeInstall code data.
install_code_lengthInstall code length.
Returns
true Is valid and can be accepted.
false Is not valid.

◆ zigpc_gateway_network_init()

sl_status_t zigpc_gateway_network_init ( void  )

Request to initialize the Zigbee Network. The gateway will establish the Gateway device as a Zigbee Coordinator and Trust Center. On success, the "on_network_initialized" event will be set to components listening on zigpc_gateway notifications.

Returns
sl_status_t SL_STATUS_OK on request accepted by ZigPC Gateway, or error in reading and preparing data to be sent to ZigPC Gateway.

◆ zigpc_gateway_network_permit_joins()

sl_status_t zigpc_gateway_network_permit_joins ( bool  enable)

Request to enable/disable permitting Zigbee devices to join the network.

Returns
sl_status_t SL_STATUS_OK on request accepted by ZigPC Gateway, or error in reading and preparing data to be sent to ZigPC Gateway.

◆ zigpc_gateway_process_setup()

sl_status_t zigpc_gateway_process_setup ( void  )

Set up the function for the zigpc_gateway component.

Returns
SL_STATUS_OK if initialization is completed, SL_STATUS_FAIL otherwise.

◆ zigpc_gateway_process_shutdown()

int zigpc_gateway_process_shutdown ( void  )

Tear-down function for the zigpc_gateway component.

Returns
Always returns 0.

◆ zigpc_gateway_remove_node()

sl_status_t zigpc_gateway_remove_node ( const zigbee_eui64_t  eui64)

Request to remove node on the Zigbee Network. If the node is not on the Zigbee network, no device remove success events will be sent to listening components.

NOTE: Callers should use a timeout to respond to failure in removing a device if no notifications are sent within that timeout.

Parameters
eui64End device EUI64 in big-endian format
Returns
sl_status_t SL_STATUS_OK on request accepted by ZigPC Gateway, or error in reading and preparing data to be sent to ZigPC Gateway.

◆ zigpc_gateway_request_binding()

sl_status_t zigpc_gateway_request_binding ( const zigbee_eui64_t  source_eui64,
uint8_t  source_endpoint_id,
zcl_cluster_id_t  cluster_id,
const zigbee_eui64_t  dest_eui64,
uint8_t  dest_endpoint_id 
)

Request to send a ZCL Configure Reporting command to an end device.

Parameters
eui64End device EUI64 in big-endian format.
endpoint_idEnd device endpoint identifier.
cluster_idEnd device ZCL cluster identifier.
Returns
sl_status_t SL_STATUS_OK on request accepted by ZigPC Gateway, or error in reading and preparing data to be sent to ZigPC Gateway.

◆ zigpc_gateway_request_binding_endpoint()

sl_status_t zigpc_gateway_request_binding_endpoint ( const zigbee_eui64_t  eui64,
const zigbee_endpoint_t  endpoint,
const zigbee_eui64_t  gateway_eui64 
)

Request to send a ZCL Configure Reporting command to an end device.

Parameters
eui64End device EUI64 in big-endian format.
endpoint_idEnd device endpoint identifier.
cluster_idEnd device ZCL cluster identifier.
report_recordZCL report record to send.
record_sizeZCL report record size.
Returns
sl_status_t SL_STATUS_OK on request accepted by ZigPC Gateway, or error in reading and preparing data to be sent to ZigPC Gateway.

◆ zigpc_gateway_request_unbind()

sl_status_t zigpc_gateway_request_unbind ( const zigbee_eui64_t  source_eui64,
uint8_t  source_endpoint_id,
zcl_cluster_id_t  cluster_id,
const zigbee_eui64_t  dest_eui64,
uint8_t  dest_endpoint_id 
)

◆ zigpc_gateway_send_emberaf_command()

void zigpc_gateway_send_emberaf_command ( char *  array)

Send command to the ember CLI.

Parameters
array
length

◆ zigpc_gateway_send_zcl_command_frame()

sl_status_t zigpc_gateway_send_zcl_command_frame ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_id_t  cluster_id,
const zcl_frame_t frame 
)

Request to send a ZCL frame to an end device.

Parameters
eui64End device EUI64 in big-endian format.
endpoint_idEnd device endpoint identifier.
cluster_idEnd device ZCL cluster identifier.
frameZCL Frame to send.
Returns
sl_status_t SL_STATUS_OK on request accepted by ZigPC Gateway, or error in reading and preparing data to be sent to ZigPC Gateway.

◆ zigpc_gateway_send_zcl_frame_multicast()

sl_status_t zigpc_gateway_send_zcl_frame_multicast ( zigbee_multicast_id_t  multicast_id,
zcl_cluster_id_t  cluster_id,
const zcl_frame_t frame 
)

Request to send a ZCL frame to a multicast group.

Parameters
multicast_idMulticast identifier.
frameZCL Frame to send.
Returns
sl_status_t SL_STATUS_OK on request accepted by ZigPC Gateway, or error in reading and preparing data to be sent to ZigPC Gateway.