CS Initiator#
Channel Sounding (CS) Initiator provides an instantiable initiator (central) logic that produce its own CS results and also collects CS results from CS Reflector (peripheral) devices. Once all initiator and reflector results collected correctly it is forwarded to the RTL lib that shall produce the high-level measurement values e.g. distance, likeliness of the current distance, etc.
Modules#
Enumerations#
Typedefs#
Functions#
Macros#
Enumeration Documentation#
cs_procedure_action_t#
cs_procedure_action_t
Enumerator | |
---|---|
CS_PROCEDURE_ACTION_CONTINUE | |
CS_PROCEDURE_ACTION_TRIGGER_RESET | |
CS_PROCEDURE_ACTION_TRIGGER_START | |
CS_PROCEDURE_ACTION_TRIGGER_STOP |
91
of file common/cs_initiator/inc/cs_initiator.h
state_machine_event_t#
state_machine_event_t
Enumerator | |
---|---|
INITIATOR_EVT_INIT_STARTED | |
INITIATOR_EVT_INIT_COMPLETED | |
INITIATOR_EVT_START_PROCEDURE | |
INITIATOR_EVT_PROCEDURE_ENABLE_STARTING | |
INITIATOR_EVT_PROCEDURE_ENABLE_COMPLETED | |
INITIATOR_EVT_PROCEDURE_DISABLE_COMPLETED | |
INITIATOR_EVT_CS_RESULT | |
INITIATOR_EVT_DELETE_INSTANCE | |
INITIATOR_EVT_ERROR |
112
of file common/cs_initiator/inc/cs_initiator.h
cs_procedure_state_t#
cs_procedure_state_t
Enumerator | |
---|---|
CS_PROCEDURE_STATE_IN_PROGRESS | |
CS_PROCEDURE_STATE_ABORTED | |
CS_PROCEDURE_STATE_COMPLETED |
125
of file common/cs_initiator/inc/cs_initiator.h
Typedef Documentation#
cs_error_cb_t#
typedef void(* cs_error_cb_t) (uint8_t conn_handle, cs_error_event_t evt, sl_status_t sc) )(uint8_t conn_handle, cs_error_event_t evt, sl_status_t sc)
[in] | conn_handle | connection handle. |
[in] | evt | error event. |
[in] | sc | status code. |
Initiator error callback type Called in case any CS initiator related error occurred.
64
of file common/cs_initiator/inc/cs_initiator.h
cs_result_cb_t#
typedef void(* cs_result_cb_t) (const cs_result_t *result, const void *user_data) )(const cs_result_t *result, const void *user_data)
[in] | result | pointer to the result structure. |
[in] | user_data | pointer to additional user data. |
Initiator result callback type Called in case a CS procedure extracted successfully and based on the extracted data a distance measurement by the RTL library has been successfully performed.
75
of file common/cs_initiator/inc/cs_initiator.h
cs_intermediate_result_cb_t#
typedef void(* cs_intermediate_result_cb_t) (const cs_intermediate_result_t *result, const void *user_data) )(const cs_intermediate_result_t *result, const void *user_data)
[in] | result | pointer to the intermediate result structure. |
[in] | user_data | pointer to additional user data. |
Initiator intermediate result callback type Called only in case the static object tracking mode is active. That means not in every CS procedure the CS initiator gets a distance measurement. When the measurement is still in progress at the end of a successfully extracted CS procedure this callback will be called instead of the result callback.
88
of file common/cs_initiator/inc/cs_initiator.h
Function Documentation#
cs_initiator_create#
sl_status_t cs_initiator_create (const uint8_t conn_handle, cs_initiator_config_t * initiator_config, const rtl_config_t * rtl_config, cs_result_cb_t result_cb, cs_intermediate_result_cb_t intermediate_result_cb, cs_error_cb_t error_cb)
[in] | conn_handle | connection handle |
[in] | initiator_config | pointer to the initiator config |
[in] | rtl_config | callback for result |
[in] | result_cb | callback for error |
N/A | intermediate_result_cb | |
N/A | error_cb |
Create CS Initiator instance for the given connection handle. Returns
status of the operation.
143
of file common/cs_initiator/inc/cs_initiator.h
cs_initiator_init#
void cs_initiator_init (void )
N/A |
Create and configure initiator instances.
153
of file common/cs_initiator/inc/cs_initiator.h
cs_initiator_delete#
sl_status_t cs_initiator_delete (const uint8_t conn_handle)
[in] | conn_handle | connection handle |
Delete CS Initiator instance associated with the given connection handle. Returns
status of the operation.
161
of file common/cs_initiator/inc/cs_initiator.h
cs_initiator_deinit#
void cs_initiator_deinit (void )
N/A |
Deinitialization function of CS Initiator component.
166
of file common/cs_initiator/inc/cs_initiator.h
cs_initiator_on_event#
bool cs_initiator_on_event (sl_bt_msg_t * evt)
[in] | evt | Event coming from the Bluetooth stack. |
Bluetooth stack event handler of the initiator events. Returns
true to send the event to the host in NCP case.
176
of file common/cs_initiator/inc/cs_initiator.h
Macro Definition Documentation#
CS_INITIATOR_MAX_CONNECTIONS#
#define CS_INITIATOR_MAX_CONNECTIONSValue:
(1)
46
of file common/cs_initiator/config/cs_initiator_config.h
CS_INITIATOR_MAX_SUBEVENT_PER_PROC#
#define CS_INITIATOR_MAX_SUBEVENT_PER_PROCValue:
(6)
52
of file common/cs_initiator/config/cs_initiator_config.h
CS_INITIATOR_MAX_STEP_DATA_LEN#
#define CS_INITIATOR_MAX_STEP_DATA_LENValue:
(2048)
58
of file common/cs_initiator/config/cs_initiator_config.h
CS_INITIATOR_LOG#
#define CS_INITIATOR_LOGValue:
(1)
65
of file common/cs_initiator/config/cs_initiator_config.h
CS_INITIATOR_LOG_PREFIX#
#define CS_INITIATOR_LOG_PREFIXValue:
"[Initiator]"
71
of file common/cs_initiator/config/cs_initiator_config.h
CS_INITIATOR_RTL_LOG#
#define CS_INITIATOR_RTL_LOGValue:
(1)
79
of file common/cs_initiator/config/cs_initiator_config.h
CS_INITIATOR_CS_EVENT_BUF_SIZE#
#define CS_INITIATOR_CS_EVENT_BUF_SIZEValue:
(16)
86
of file common/cs_initiator/config/cs_initiator_config.h
CS_INITIATOR_MIN_INTERVAL#
#define CS_INITIATOR_MIN_INTERVALValue:
(30)
93
of file common/cs_initiator/config/cs_initiator_config.h
CS_INITIATOR_MAX_INTERVAL#
#define CS_INITIATOR_MAX_INTERVALValue:
(30)
100
of file common/cs_initiator/config/cs_initiator_config.h
CS_INITIATOR_ANTENNA_OFFSET#
#define CS_INITIATOR_ANTENNA_OFFSETValue:
0
108
of file common/cs_initiator/config/cs_initiator_config.h
CS_INITIATOR_ERROR_TIMEOUT_MS#
#define CS_INITIATOR_ERROR_TIMEOUT_MSValue:
3000
116
of file common/cs_initiator/config/cs_initiator_config.h
CS_INITIATOR_PROCEDURE_TIMEOUT_MS#
#define CS_INITIATOR_PROCEDURE_TIMEOUT_MSValue:
3000
123
of file common/cs_initiator/config/cs_initiator_config.h