nRF Connect SDK API 3.4.99
Loading...
Searching...
No Matches

◆ VTF_CHANNEL_DEFINE

#define VTF_CHANNEL_DEFINE ( _sym,
_id,
_sample_fn,
_init_fn,
_type,
_field,
_default )

#include <include/drivers/vtf_monitoring/vtf_monitoring.h>

Value:
const int unique_id_##_id = 0; \
static const STRUCT_SECTION_ITERABLE(vtf_channel, _sym) = { \
.id = (_id), \
.sample = (_sample_fn), \
.init = (_init_fn), \
.default_type = (_type), \
.default_value._field = (_default), \
}
Definition vtf_monitoring.h:59

Register a channel with the VTF subsystem.

Expands to a static const struct vtf_channel placed in the vtf_channel iterable section.

Parameters
_symC symbol name for the descriptor.
_idenum vtf_channel_id this channel handles.
_sample_fnPer-channel sample callback. Must be non-NULL.
_init_fnOptional init callback (NULL if not needed).
_typeDefault value's enum vtf_sample_type.
_fieldMember of union vtf_sample_value to assign the default into (for example, i32).
_defaultDefault reading value.