Developing with ZBOSS for Zigbee
ZCL Diagnostics cluster

Data Structures

struct  zb_zcl_diagnostics_ctx_s
 

Diagnostics cluster attributes

enum  zb_zcl_diagnostics_attr_e {
  ZB_ZCL_ATTR_DIAGNOSTICS_NUMBER_OF_RESETS_ID = 0x0000, ZB_ZCL_ATTR_DIAGNOSTICS_PERSISTENT_MEMORY_WRITES_ID = 0x0001, ZB_ZCL_ATTR_DIAGNOSTICS_MAC_RX_BCAST_ID = 0x0100, ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_BCAST_ID = 0x0101,
  ZB_ZCL_ATTR_DIAGNOSTICS_MAC_RX_UCAST_ID = 0x0102, ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_ID = 0x0103, ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_RETRY_ID = 0x0104, ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_FAIL_ID = 0x0105,
  ZB_ZCL_ATTR_DIAGNOSTICS_APS_RX_BCAST_ID = 0x0106, ZB_ZCL_ATTR_DIAGNOSTICS_APS_TX_BCAST_ID = 0x0107, ZB_ZCL_ATTR_DIAGNOSTICS_APS_RX_UCAST_ID = 0x0108, ZB_ZCL_ATTR_DIAGNOSTICS_APS_TX_UCAST_SUCCESS_ID = 0x0109,
  ZB_ZCL_ATTR_DIAGNOSTICS_APS_TX_UCAST_RETRY_ID = 0x010A, ZB_ZCL_ATTR_DIAGNOSTICS_APS_TX_UCAST_FAIL_ID = 0x010b, ZB_ZCL_ATTR_DIAGNOSTICS_ROUTE_DISC_INITIATED_ID = 0x010C, ZB_ZCL_ATTR_DIAGNOSTICS_NEIGHBOR_ADDED_ID = 0x010D,
  ZB_ZCL_ATTR_DIAGNOSTICS_NEIGHBOR_REMOVED_ID = 0x010E, ZB_ZCL_ATTR_DIAGNOSTICS_NEIGHBOR_STALE_ID = 0x010F, ZB_ZCL_ATTR_DIAGNOSTICS_JOIN_INDICATION_ID = 0x0110, ZB_ZCL_ATTR_DIAGNOSTICS_CHILD_MOVED_ID = 0x0111,
  ZB_ZCL_ATTR_DIAGNOSTICS_NWKFC_FAILURE_ID = 0x0112, ZB_ZCL_ATTR_DIAGNOSTICS_APSFC_FAILURE_ID = 0x0113, ZB_ZCL_ATTR_DIAGNOSTICS_APS_UNAUTHORIZED_KEY_ID = 0x0114, ZB_ZCL_ATTR_DIAGNOSTICS_NWK_DECRYPT_FAILURES_ID = 0x0115,
  ZB_ZCL_ATTR_DIAGNOSTICS_APS_DECRYPT_FAILURES_ID = 0x0116, ZB_ZCL_ATTR_DIAGNOSTICS_PACKET_BUFFER_ALLOCATE_FAILURES_ID = 0x0117, ZB_ZCL_ATTR_DIAGNOSTICS_RELAYED_UCAST_ID = 0x0118, ZB_ZCL_ATTR_DIAGNOSTICS_PHYTOMACQUEUELIMITREACHED_ID = 0x0119,
  ZB_ZCL_ATTR_DIAGNOSTICS_PACKET_VALIDATEDROPCOUNT_ID = 0x011A, ZB_ZCL_ATTR_DIAGNOSTICS_AVERAGE_MAC_RETRY_PER_APS_ID = 0x011b, ZB_ZCL_ATTR_DIAGNOSTICS_LAST_LQI_ID = 0x011c, ZB_ZCL_ATTR_DIAGNOSTICS_LAST_RSSI_ID = 0x011d,
  ZB_ZCL_ATTR_DIAGNOSTICS_CUSTOM_ATTR_NWK_RETRY_OVERFLOW_ID = 0xff00, ZB_ZCL_ATTR_DIAGNOSTICS_CUSTOM_ATTR_PHY_CCA_FAILURES_ID = 0xff01, ZB_ZCL_ATTR_DIAGNOSTICS_CUSTOM_ATTR_BCAST_TABLE_FULL_ID = 0xff02
}
 Diagnostics cluster attribute identifiers. More...
 
typedef struct zb_zcl_diagnostics_ctx_s zb_zcl_diagnostics_ctx_t
 
zb_zcl_diagnostics_ctx_t diagnostics_ctx_zcl
 
#define ZB_ZCL_DIAGNOSTICS_CLUSTER_REVISION_DEFAULT   ((zb_uint16_t)0x0003u)
 Default value for Diagnostics cluster revision global attribute.
 
#define ZB_ZCL_DIAGNOSTICS_NUMBER_OF_RESETS_DEFAULT_VALUE   ((zb_uint16_t)0x00000000)
 Default value for number_of_resets attribute.
 
#define ZB_ZCL_DIAGNOSTICS_PERSISTENT_MEMORY_WRITES_DEFAULT_VALUE   ((zb_uint16_t)0x00000000)
 Default value for PersistentMemoryWrites attribute.
 
#define ZB_ZCL_DIAGNOSTICS_MAC_RX_BCAST_DEFAULT_VALUE   ((zb_uint32_t)0)
 Default value for MacRxBcast attribute.
 
#define ZB_ZCL_DIAGNOSTICS_MAC_TX_BCAST_DEFAULT_VALUE   ((zb_uint32_t)0)
 Default value for MacTxBcast attribute.
 
#define ZB_ZCL_DIAGNOSTICS_MAC_RX_UCAST_DEFAULT_VALUE   ((zb_uint32_t)0)
 Default value for MacRxUcast attribute.
 
#define ZB_ZCL_DIAGNOSTICS_MAC_TX_UCAST_DEFAULT_VALUE   ((zb_uint32_t)0)
 Default value for MacTxUcast attribute.
 
#define ZB_ZCL_DIAGNOSTICS_MAC_TX_UCAST_RETRY_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for MacTxUcastRetry attribute.
 
#define ZB_ZCL_DIAGNOSTICS_MAC_TX_UCAST_FAIL_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for MacTxUcastFail attribute.
 
#define ZB_ZCL_DIAGNOSTICS_APS_RX_BCAST_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for APSRxBcast attribute.
 
#define ZB_ZCL_DIAGNOSTICS_APS_TX_BCAST_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for aps_tx_bcast attribute.
 
#define ZB_ZCL_DIAGNOSTICS_APS_RX_UCAST_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for APSRxUcast attribute.
 
#define ZB_ZCL_DIAGNOSTICS_APS_TX_UCAST_SUCCESS_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for aps_tx_ucast_success attribute.
 
#define ZB_ZCL_DIAGNOSTICS_APS_TX_UCAST_RETRY_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for APSTxUcastRetry attribute.
 
#define ZB_ZCL_DIAGNOSTICS_APS_TX_UCAST_FAIL_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for aps_tx_ucast_fail attribute.
 
#define ZB_ZCL_DIAGNOSTICS_ROUTE_DISC_INITIATED_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for RouteDiscInitiated attribute.
 
#define ZB_ZCL_DIAGNOSTICS_NEIGHBOR_ADDED_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for NeighborAdded attribute.
 
#define ZB_ZCL_DIAGNOSTICS_NEIGHBOR_REMOVED_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for NeighborRemoved attribute.
 
#define ZB_ZCL_DIAGNOSTICS_NEIGHBOR_STALE_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for NeighborStale attribute.
 
#define ZB_ZCL_DIAGNOSTICS_JOIN_INDICATION_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for join_indication attribute.
 
#define ZB_ZCL_DIAGNOSTICS_CHILD_MOVED_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for ChildMoved attribute.
 
#define ZB_ZCL_DIAGNOSTICS_NWKFC_FAILURE_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for nwk_fc_failure attribute.
 
#define ZB_ZCL_DIAGNOSTICS_APSFC_FAILURE_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for aps_fc_failure attribute.
 
#define ZB_ZCL_DIAGNOSTICS_APS_UNAUTHORIZED_KEY_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for APSUnauthorizedKey attribute.
 
#define ZB_ZCL_DIAGNOSTICS_NWK_DECRYPT_FAILURES_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for NWKDecryptFailures attribute.
 
#define ZB_ZCL_DIAGNOSTICS_APS_DECRYPT_FAILURES_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for APSDecryptFailures attribute.
 
#define ZB_ZCL_DIAGNOSTICS_PACKET_BUFFER_ALLOCATE_FAILURES_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for packet_buffer_allocate_failures attribute.
 
#define ZB_ZCL_DIAGNOSTICS_RELAYED_UCAST_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for RelayedUcast attribute.
 
#define ZB_ZCL_DIAGNOSTICS_PHYTO_MA_CQUEUELIMITREACHED_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for PhytoMACqueuelimitreached attribute.
 
#define ZB_ZCL_DIAGNOSTICS_PACKET_VALIDATEDROPCOUNT_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for PacketValidatedropcount attribute.
 
#define ZB_ZCL_DIAGNOSTICS_AVERAGE_MAC_RETRY_PER_APS_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for AverageMACRetryPerAPS attribute.
 
#define ZB_ZCL_DIAGNOSTICS_LAST_LQI_DEFAULT_VALUE   ((zb_uint8_t)0)
 Default value for LastLQI attribute.
 
#define ZB_ZCL_DIAGNOSTICS_LAST_RSSI_DEFAULT_VALUE   ((zb_int8_t)0)
 Default value for LastRSSI attribute.
 
#define ZB_ZCL_DIAGNOSTICS_CUSTOM_ATTR_NWK_RETRY_OVERFLOW_DEFAULT_VALUE   ((zb_uint16_t)0)
 
#define ZB_ZCL_DIAGNOSTICS_CUSTOM_ATTR_PHY_CCA_FAILURES_DEFAULT_VALUE   ((zb_uint16_t)0)
 
#define ZB_ZCL_DIAGNOSTICS_CUSTOM_ATTR_BCAST_TABLE_FULL_DEFAULT_VALUE   ((zb_uint16_t)0)
 

Detailed Description

ZCL Diagnostics cluster definitions

Enumeration Type Documentation

◆ zb_zcl_diagnostics_attr_e

Diagnostics cluster attribute identifiers.

See also
HA spec, Diagnostics Cluster 9.3.2.2.2
Enumerator
ZB_ZCL_ATTR_DIAGNOSTICS_NUMBER_OF_RESETS_ID 

number_of_resets, Zigbee Diagnostic Cluster spec 1.2.2.1.1

ZB_ZCL_ATTR_DIAGNOSTICS_PERSISTENT_MEMORY_WRITES_ID 

This attribute keeps track of the number of writes to persistent memory. HA spec 9.2.2.2.1.2

ZB_ZCL_ATTR_DIAGNOSTICS_MAC_RX_BCAST_ID 

MacRxBcast, HA spec 9.2.2.2.2.1.

ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_BCAST_ID 

MacTxBcast, HA spec 9.2.2.2.2.2.

ZB_ZCL_ATTR_DIAGNOSTICS_MAC_RX_UCAST_ID 

MacRxUcast Attribute A counter that is incremented each time the MAC layer receives a unicast.

ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_ID 

MacTxUcast, HA spec 9.2.2.2.2.4.

ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_RETRY_ID 

MacTxUcastRetry Attribute A counter that is incremented each time the MAC layer retries a unicast.

ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_FAIL_ID 

MacTxUcastFail Attribute A counter that is incremented each time the MAC layer fails to send a unicast.

ZB_ZCL_ATTR_DIAGNOSTICS_APS_RX_BCAST_ID 

APSRxBcast Attribute A counter that is incremented each time the APS layer receives a broadcast.

ZB_ZCL_ATTR_DIAGNOSTICS_APS_TX_BCAST_ID 

aps_tx_bcast, HA spec 9.3.2.2.2 (??)

ZB_ZCL_ATTR_DIAGNOSTICS_APS_RX_UCAST_ID 

APSRxUcast Attribute A counter that is incremented each time the APS layer receives a unicast.

ZB_ZCL_ATTR_DIAGNOSTICS_APS_TX_UCAST_SUCCESS_ID 

aps_tx_ucast_success, HA spec 9.3.2.2.2 (??)

ZB_ZCL_ATTR_DIAGNOSTICS_APS_TX_UCAST_RETRY_ID 

APSTxUcastRetry Attribute A counter that is incremented each time the APS layer retries the sending of a unicast.

ZB_ZCL_ATTR_DIAGNOSTICS_APS_TX_UCAST_FAIL_ID 

aps_tx_ucast_fail, HA spec 9.3.2.2.2 (??)

ZB_ZCL_ATTR_DIAGNOSTICS_ROUTE_DISC_INITIATED_ID 

RouteDiscInitiated Attribute A counter that is incremented each time a route request is initiated .

ZB_ZCL_ATTR_DIAGNOSTICS_NEIGHBOR_ADDED_ID 

NeighborAdded Attribute A counter that is incremented each time an entry is added to the neighbor table.

ZB_ZCL_ATTR_DIAGNOSTICS_NEIGHBOR_REMOVED_ID 

NeighborRemoved Attribute A counter that is incremented each time an entry is removed from the neighbor table.

ZB_ZCL_ATTR_DIAGNOSTICS_NEIGHBOR_STALE_ID 

A counter that is incremented each time a neighbor table entry becomes stale because the neighbor has not been heard from.

ZB_ZCL_ATTR_DIAGNOSTICS_JOIN_INDICATION_ID 

join_indication, HA spec 1.2.2.2.17

ZB_ZCL_ATTR_DIAGNOSTICS_CHILD_MOVED_ID 

A counter that is incremented each time an entry is removed from the child table.

ZB_ZCL_ATTR_DIAGNOSTICS_NWKFC_FAILURE_ID 

A counter that is incremented each time a message is dropped at the network layer because the APS frame counter was not higher than the last message seen from that source.

ZB_ZCL_ATTR_DIAGNOSTICS_APSFC_FAILURE_ID 

A counter that is incremented each time a message is dropped at the APS layer because the APS frame counter was not higher than the last message seen from that source.

ZB_ZCL_ATTR_DIAGNOSTICS_APS_UNAUTHORIZED_KEY_ID 

A counter that is incremented each time a message is dropped at the APS layer because it had APS encryption but the key associated with the sender has not been authenticated, and thus the key is not authorized for use in APS data messages.

ZB_ZCL_ATTR_DIAGNOSTICS_NWK_DECRYPT_FAILURES_ID 

A counter that is incremented each time a NWK encrypted message was received but dropped because decryption failed.

ZB_ZCL_ATTR_DIAGNOSTICS_APS_DECRYPT_FAILURES_ID 

A counter that is incremented each time an APS encrypted message was received but dropped because decryption failed.

ZB_ZCL_ATTR_DIAGNOSTICS_PACKET_BUFFER_ALLOCATE_FAILURES_ID 

A counter that is incremented each time the stack failed to allocate a packet buffers. This doesn't necessarily mean that the packet buffer count was 0 at the time, but that the number requested was greater than the number free.

ZB_ZCL_ATTR_DIAGNOSTICS_RELAYED_UCAST_ID 

A counter that is incremented each time a unicast packet is relayed.

ZB_ZCL_ATTR_DIAGNOSTICS_PHYTOMACQUEUELIMITREACHED_ID 

A counter that is incremented each time a packet is dropped because the PHY to MAC queue was exhausted

ZB_ZCL_ATTR_DIAGNOSTICS_PACKET_VALIDATEDROPCOUNT_ID 

A counter that is incremented each time a packet was dropped due to a packet validation error. This could be due to length or other formatting problems in the packet.

ZB_ZCL_ATTR_DIAGNOSTICS_AVERAGE_MAC_RETRY_PER_APS_ID 

A counter that is equal to the average number of MAC retries needed to send an APS message, HA spec 9.2.2.2.2.27

ZB_ZCL_ATTR_DIAGNOSTICS_LAST_LQI_ID 

This is the Link Quality Indicator for the last message received. There is no current agreed upon standard for calculating the LQI. For some implementations LQI is related directly to RSSI for others it is a function of the number of errors received over a fixed number of bytes in a given message. The one thing that has been agreed is that the Link Quality Indicator is a value between 0 and 255 where 0 indicates the worst possible link and 255 indicates the best possible link. Note that for a device reading the Last Message LQI the returned value SHALL be the LQI for the read attribute message used to read the attribute itself.

ZB_ZCL_ATTR_DIAGNOSTICS_LAST_RSSI_ID 

This is the receive signal strength indication for the last message received. As with Last Message LQI, a device reading the Last Message RSSI, the returned value SHALL be the RSSI of the read attribute message used to read the attribute itself.

ZB_ZCL_ATTR_DIAGNOSTICS_CUSTOM_ATTR_NWK_RETRY_OVERFLOW_ID 

A counter that is incremented on the NWK layer each time tries number of a packet resending are gone.

Note
It's a non-standard counter that depends on ZB_ENABLE_NWK_RETRANSMIT and will be zero always when the macro isn't set.
ZB_ZCL_ATTR_DIAGNOSTICS_CUSTOM_ATTR_PHY_CCA_FAILURES_ID 

A non-standard counter that is incremented each time an the PHY layer was unable to transmit due to a failed CCA

ZB_ZCL_ATTR_DIAGNOSTICS_CUSTOM_ATTR_BCAST_TABLE_FULL_ID 

A non-standard counter of the number of times the NWK broadcast was dropped because the broadcast table was full.