Coulomb Counter#
API and Callbacks for the Coulomb Counter Component.
Approximates energy consumption by keeping time spent in different device states. This is used for testing.
Modules#
API#
Return the current core mode.
Return the current state of all additive modes.
Return the cumulative energy usage metric since last value reset.
Reset the energy usage metric.
Enumerations#
Macros#
API Documentation#
sl_zigbee_af_command_coulomb_counter_get_current_core_mode#
uint16_t sl_zigbee_af_command_coulomb_counter_get_current_core_mode (void )
Return the current core mode.
N/A |
Returns the current core mode of the system. The core mode is the basis for energy consumption measurements. Each core mode is mutually exclusive.
Returns
the current core mode.
86
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
sl_zigbee_af_command_coulomb_counter_get_additive_modes_bitfield#
uint16_t sl_zigbee_af_command_coulomb_counter_get_additive_modes_bitfield (void )
Return the current state of all additive modes.
N/A |
Returns the current state of all additive modes. All bits raised in the bitfield indicate that the state is current 'On'.
Returns
the current additive modes bitfield.
95
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
sl_zigbee_af_command_coulomb_counter_get_energy_usage#
uint32_t sl_zigbee_af_command_coulomb_counter_get_energy_usage (void )
Return the cumulative energy usage metric since last value reset.
N/A |
Returns the cumulative energy usage metric since last value reset. This value is in the same unit as all other provided values and is persisted until explicitly reset.
Returns
the currently recorded energy usage.
104
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
sl_zigbee_af_command_coulomb_counter_reset_energy_usage#
void sl_zigbee_af_command_coulomb_counter_reset_energy_usage (void )
Reset the energy usage metric.
N/A |
Resets the energy usage metric. This calls clears both the volatile and non volatile values.
110
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
Enumeration Documentation#
sl_zigbee_af_plugin_coulomb_counter_core_mode_t#
sl_zigbee_af_plugin_coulomb_counter_core_mode_t
Enumerator | |
---|---|
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_RADIO_MODE_RX_SHIFT | |
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_RADIO_MODE_TX_SHIFT | |
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_CORE_MODE_SLEEP_SHIFT | |
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_CORE_MODE_IDLE_SHIFT | |
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_CORE_MODE_AWAKE_SHIFT | |
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_EEPROM_STATE_SHIFT | |
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_CORE_MODE_MAX |
37
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
Macro Definition Documentation#
COULOMB_COUNTER_MAX_NB_USER_DEFINED_ADDITIVE_STATES#
#define COULOMB_COUNTER_MAX_NB_USER_DEFINED_ADDITIVE_STATESValue:
(16U)
36
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_RADIO_MODE_RX#
#define SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_RADIO_MODE_RXValue:
(1U << SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_RADIO_MODE_RX_SHIFT)
Radio in Idle state Radio in Receive state
51
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_RADIO_MODE_TX#
#define SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_RADIO_MODE_TXValue:
(1U << SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_RADIO_MODE_TX_SHIFT)
Radio in Transmit state
53
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_CORE_MODE_SLEEP#
#define SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_CORE_MODE_SLEEPValue:
(1U << SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_CORE_MODE_SLEEP_SHIFT)
55
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_CORE_MODE_IDLE#
#define SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_CORE_MODE_IDLEValue:
(1U << SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_CORE_MODE_IDLE_SHIFT)
57
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_CORE_MODE_AWAKE#
#define SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_CORE_MODE_AWAKEValue:
(1U << SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_CORE_MODE_AWAKE_SHIFT)
59
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_RADIO_EVENT_MASK#
#define SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_RADIO_EVENT_MASKValue:
(0x03U)
A mask representing all Radio state options <bit1:bit0>
62
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_EM_MODE_MASK#
#define SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_EM_MODE_MASKValue:
(0x1CU)
A mask representing all EM mode options <bit4:bit2>
65
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_EEPROM_MODE_MASK#
#define SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_EEPROM_MODE_MASKValue:
(0x1E0U)
A mask representing all EEPROM mode options <bit8:bit5>
68
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_MASK#
#define SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_MASKValue:
(0xFFFFU)
70
of file app/framework/plugin/coulomb-counter/coulomb-counter.h
SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_USER_DEF_STATES#
#define SL_ZIGBEE_AF_PLUGIN_COULOMB_COUNTER_USER_DEF_STATESValue:
71
of file app/framework/plugin/coulomb-counter/coulomb-counter.h