35#ifndef NRF_802154_STATS_H_
36#define NRF_802154_STATS_H_
49#define nrf_802154_stat_counter_increment(field_name) \
52 nrf_802154_mcu_critical_state_t mcu_cs; \
54 nrf_802154_mcu_critical_enter(mcu_cs); \
55 (g_nrf_802154_stats.counters.field_name)++; \
56 nrf_802154_mcu_critical_exit(mcu_cs); \
65#define nrf_802154_stat_timestamp_write(field_name, value) \
68 nrf_802154_mcu_critical_state_t mcu_cs; \
70 nrf_802154_mcu_critical_enter(mcu_cs); \
71 (g_nrf_802154_stats.timestamps.field_name) = (value); \
72 nrf_802154_mcu_critical_exit(mcu_cs); \
77#define nrf_802154_stat_timestamp_read(variable, field_name) \
80 nrf_802154_mcu_critical_state_t mcu_cs; \
82 nrf_802154_mcu_critical_enter(mcu_cs); \
83 *(variable) = g_nrf_802154_stats.timestamps.field_name; \
84 nrf_802154_mcu_critical_exit(mcu_cs); \
90#define nrf_802154_stat_counter_increment(field_name) \
91 nrf_802154_stat_counter_increment_func(offsetof(nrf_802154_stat_counters_t, field_name))
93#define nrf_802154_stat_timestamp_write(field_name, value) \
94 nrf_802154_stat_timestamp_write_func(offsetof(nrf_802154_stat_timestamps_t, field_name), \
97#define nrf_802154_stat_timestamp_read(variable, field_name) \
98 *(variable) = nrf_802154_stat_timestamp_read_func(offsetof(nrf_802154_stat_timestamps_t, \
102void nrf_802154_stat_counter_increment_func(
size_t field_offset);
103void nrf_802154_stat_timestamp_write_func(
size_t field_offset, uint64_t value);
104uint64_t nrf_802154_stat_timestamp_read_func(
size_t field_offset);
volatile nrf_802154_stats_t g_nrf_802154_stats
Type of structure holding statistics about the Radio Driver behavior.
Definition nrf_802154_types.h:342