/* Definitions for optional metrics. */

#if defined(CONFIG_MODEM_INFO)
#include <modem/modem_info.h>
#endif /* defined(CONFIG_MODEM_INFO) */

#ifdef CONFIG_MEMFAULT_NCS_STACK_METRICS
MEMFAULT_METRICS_KEY_DEFINE(ncs_connection_poll_unused_stack, kMemfaultMetricType_Unsigned)
MEMFAULT_METRICS_KEY_DEFINE(ncs_bt_rx_unused_stack, kMemfaultMetricType_Unsigned)
MEMFAULT_METRICS_KEY_DEFINE(ncs_bt_tx_unused_stack, kMemfaultMetricType_Unsigned)
#endif /* CONFIG_MEMFAULT_NCS_STACK_METRICS */

#ifdef CONFIG_MEMFAULT_NCS_LTE_METRICS

#if defined(CONFIG_MODEM_INFO)
MEMFAULT_METRICS_STRING_KEY_DEFINE(ncs_lte_modem_fw_version, MODEM_INFO_FWVER_SIZE)
MEMFAULT_METRICS_STRING_KEY_DEFINE(ncs_lte_operator, MODEM_INFO_SHORT_OP_NAME_SIZE)
MEMFAULT_METRICS_KEY_DEFINE(ncs_lte_snr_decibels, kMemfaultMetricType_Signed)
MEMFAULT_METRICS_KEY_DEFINE(ncs_lte_rsrp_dbm, kMemfaultMetricType_Signed)
MEMFAULT_METRICS_KEY_DEFINE(ncs_lte_tx_kilobytes, kMemfaultMetricType_Unsigned)
MEMFAULT_METRICS_KEY_DEFINE(ncs_lte_rx_kilobytes, kMemfaultMetricType_Unsigned)
MEMFAULT_METRICS_KEY_DEFINE(ncs_lte_band, kMemfaultMetricType_Unsigned)
#endif /* defined(CONFIG_MODEM_INFO) */

MEMFAULT_METRICS_KEY_DEFINE(ncs_lte_time_to_connect_ms, kMemfaultMetricType_Timer)
MEMFAULT_METRICS_KEY_DEFINE(ncs_lte_connection_loss_count, kMemfaultMetricType_Unsigned)
MEMFAULT_METRICS_KEY_DEFINE(ncs_lte_psm_tau_seconds, kMemfaultMetricType_Signed)
MEMFAULT_METRICS_KEY_DEFINE(ncs_lte_psm_active_time_seconds, kMemfaultMetricType_Signed)
MEMFAULT_METRICS_KEY_DEFINE(ncs_lte_edrx_interval_ms, kMemfaultMetricType_Unsigned)
MEMFAULT_METRICS_KEY_DEFINE(ncs_lte_edrx_ptw_ms, kMemfaultMetricType_Unsigned)
MEMFAULT_METRICS_KEY_DEFINE(ncs_lte_mode, kMemfaultMetricType_Unsigned)
MEMFAULT_METRICS_KEY_DEFINE(ncs_lte_on_time_ms, kMemfaultMetricType_Timer)
MEMFAULT_METRICS_KEY_DEFINE(ncs_lte_reset_loop_detected_count, kMemfaultMetricType_Unsigned)
#endif /* CONFIG_MEMFAULT_NCS_LTE_METRICS */

#ifdef CONFIG_MEMFAULT_NCS_BT_METRICS
MEMFAULT_METRICS_KEY_DEFINE(ncs_bt_connection_time_ms, kMemfaultMetricType_Timer)
MEMFAULT_METRICS_KEY_DEFINE(ncs_bt_connection_count, kMemfaultMetricType_Unsigned)
MEMFAULT_METRICS_KEY_DEFINE(ncs_bt_bond_count, kMemfaultMetricType_Unsigned)
#endif /* CONFIG_MEMFAULT_NCS_BT_METRICS */
