Wirepas SDK
|
Go to the source code of this file.
Typedefs | |
typedef void(* | poslib_events_listen_info_f) (POSLIB_FLAG_EVENT_info_t *msg) |
Function used with POSLIB_FLAG_EVENT_setCb. More... | |
typedef void(* | poslib_events_callback_f) (poslib_events_listen_info_f callback) |
This callback is used to receive Poslib generated events. More... | |
Functions | |
poslib_ret_e | PosLib_setConfig (poslib_settings_t *settings) |
Sets PosLib configuration. More... | |
poslib_ret_e | PosLib_getConfig (poslib_settings_t *settings) |
Gets PosLib configuration. More... | |
poslib_ret_e | PosLib_startPeriodic (void) |
Start the positioning updates according to provided configuration. Calls PosLib initialization function before start. More... | |
poslib_ret_e | PosLib_stopPeriodic (void) |
Stops the positioning updates. More... | |
poslib_ret_e | PosLib_startOneshot (void) |
Triggers one position update. If PosLib is started the scheduled operation will continue after the oneshot update. If in stop state then after the oneshot update is completed it will return in stop state. More... | |
poslib_ret_e | PosLib_motion (poslib_motion_mode_e mode) |
Used to indicate that the tag is static or dynamic. The update rate used will be adjusted according to the state. More... | |
poslib_status_e | PosLib_status (void) |
Returns the current status of PosLib. More... | |
poslib_ret_e | PosLib_eventRegister (poslib_events_e event, poslib_events_listen_info_f cb, uint8_t *id) |
Register an event subscriber. More... | |
void | PosLib_eventDeregister (uint8_t id) |
De-register the event subscriber with the provided id. More... | |
bool | PosLib_decodeMbcn (uint8_t *buf, uint8_t length, poslib_mbcn_data_t *mbcn) |
Decodes the mini-beacon payload. More... | |
app_lib_data_send_res_e | PosLib_sendData (app_lib_data_to_send_t *data, app_lib_data_data_sent_cb_f sent_cb) |
Send data. The packet to send is represented as a app_lib_data_to_send_t struct. In node has Advertiser role and dest_address is APP_ADDR_ANYSINK then the function will replace the destination with the address of the best found LL router supporting DA. More... | |
Data Structures | |
struct | poslib_mbcn_record_t |
defines mini-beacon record. More... | |
struct | poslib_mbcn_config_t |
defines mini-beacon configuration. More... | |
struct | poslib_mbcn_data_t |
defines mini-beacon data payload. More... | |
struct | poslib_ble_mode_config_t |
defines BLE mode mode configuration. More... | |
struct | ble_beacon_settings_t |
position library ble settings. More... | |
struct | poslib_motion_mon_settings_t |
position library motion settings. More... | |
struct | poslib_da_settings_t |
position library DA settings. More... | |
struct | poslib_settings_t |
position library settings. More... | |
struct | poslib_aux_settings_t |
positioning library auxiliary settings More... | |
struct | POSLIB_FLAG_EVENT_info_t |
Macros | |
#define | POS_DESTINATION_ENDPOINT 238 |
Endpoints for measurements. More... | |
#define | POS_SOURCE_ENDPOINT 238 |
#define | POSLIB_MIN_MEAS_RATE_S 8 |
Update rate min/max. More... | |
#define | POSLIB_MAX_MEAS_RATE_S 86400 |
#define | POSLIB_VOLTAGE_SAMPLING_MAX_S 60 |
Voltage sampling settings. More... | |
#define | POSLIB_VOLTAGE_FILTER_SAMPLES 30 |
#define | POSLIB_FLAG_EVENT_SUBSCRIBERS_MAX 8 |
#define | POSLIB_MBCN_RECORD_MAX_SIZE 16 |
#define | POSLIB_MBCN_RECORDS 8 |
#define | POSLIB_MBCN_SRC_EP 238 |
#define | POSLIB_MBCN_DEST_EP 238 |
typedef void(* poslib_events_callback_f) (poslib_events_listen_info_f callback) |
typedef void(* poslib_events_listen_info_f) (POSLIB_FLAG_EVENT_info_t *msg) |
bool PosLib_decodeMbcn | ( | uint8_t * | buf, |
uint8_t | length, | ||
poslib_mbcn_data_t * | mbcn | ||
) |
Decodes the mini-beacon payload.
[in] | buf | pointer to MBCN payload |
[in] | length | length of the MBCN payload |
[out] | mbcn | decoded minibeacon content |
void PosLib_eventDeregister | ( | uint8_t | id | ) |
De-register the event subscriber with the provided id.
id | subscriber ID |
poslib_ret_e PosLib_eventRegister | ( | poslib_events_e | event, |
poslib_events_listen_info_f | cb, | ||
uint8_t * | id | ||
) |
Register an event subscriber.
event | Events of interest (type of poslib_events_e) |
cb | Callback to be called (type poslib_events_listen_info_f) |
id | Returned subscriber ID |
poslib_ret_e PosLib_getConfig | ( | poslib_settings_t * | settings | ) |
Gets PosLib configuration.
poslib_settings_t | pointer where settings will be copied |
poslib_ret_e PosLib_motion | ( | poslib_motion_mode_e | mode | ) |
Used to indicate that the tag is static or dynamic. The update rate used will be adjusted according to the state.
mode | type of poslib_motion_mode_e |
app_lib_data_send_res_e PosLib_sendData | ( | app_lib_data_to_send_t * | data, |
app_lib_data_data_sent_cb_f | sent_cb | ||
) |
Send data. The packet to send is represented as a app_lib_data_to_send_t struct. In node has Advertiser role and dest_address is APP_ADDR_ANYSINK then the function will replace the destination with the address of the best found LL router supporting DA.
data | Data to send |
sent_cb | Callback function to be called when a packet has gone through local processing and has finally been sent or discarded. If NULL is passed, the callback is disabled. This callback replaces tracking_id and APP_LIB_DATA_SEND_FLAG_TRACK flag of data structure. |
poslib_ret_e PosLib_setConfig | ( | poslib_settings_t * | settings | ) |
Sets PosLib configuration.
poslib_settings_t | type pointer |
poslib_ret_e PosLib_startOneshot | ( | void | ) |
Triggers one position update. If PosLib is started the scheduled operation will continue after the oneshot update. If in stop state then after the oneshot update is completed it will return in stop state.
poslib_ret_e PosLib_startPeriodic | ( | void | ) |
Start the positioning updates according to provided configuration. Calls PosLib initialization function before start.
poslib_status_e PosLib_status | ( | void | ) |
Returns the current status of PosLib.
poslib_ret_e PosLib_stopPeriodic | ( | void | ) |
Stops the positioning updates.
struct poslib_mbcn_record_t |
struct poslib_mbcn_config_t |
Data Fields | ||
---|---|---|
bool | enabled | |
poslib_mbcn_record_t | records[8] | |
uint16_t | tx_interval_ms |
struct poslib_mbcn_data_t |
Data Fields | ||
---|---|---|
uint16_t | features | |
poslib_mbcn_record_t | records[8] | |
uint16_t | seq | |
uint16_t | tx_interval_ms |
struct poslib_ble_mode_config_t |
Data Fields | ||
---|---|---|
app_lib_beacon_tx_channels_mask_e | channels | |
uint16_t | tx_interval_ms | |
int8_t | tx_power |
struct ble_beacon_settings_t |
Data Fields | ||
---|---|---|
uint16_t | activation_delay_s | |
poslib_ble_mode_config_t | eddystone | |
poslib_ble_mode_config_t | ibeacon | |
poslib_ble_mode_e | mode | |
poslib_ble_type_e | type |
struct poslib_motion_mon_settings_t |
position library motion settings.
Data Fields | ||
---|---|---|
uint16_t | duration_ms | |
bool | enabled | |
uint16_t | threshold_mg |
struct poslib_da_settings_t |
struct poslib_settings_t |
Data Fields | ||
---|---|---|
ble_beacon_settings_t | ble | |
poslib_da_settings_t | da | |
poslib_mbcn_config_t | mbcn | |
poslib_motion_mon_settings_t | motion | |
poslib_class_e | node_class | |
poslib_mode_e | node_mode | |
uint32_t | update_period_dynamic_s | |
uint32_t | update_period_offline_s | |
uint32_t | update_period_static_s |
struct poslib_aux_settings_t |
struct POSLIB_FLAG_EVENT_info_t |
Helper structure to move data from PosLib events
Data Fields | ||
---|---|---|
uint16_t | event_id | |
uint32_t | nrls_sleep_time_sec | |
app_lib_time_timestamp_hp_t | time_hp |
enum poslib_ble_mode_e |
enum poslib_ble_type_e |
enum poslib_class_e |
enum poslib_events_e |
Defines the events triggered by PosLib.
Definition at line 122 of file poslib.h.
defines the mini-beacon payload records types
Definition at line 161 of file poslib.h.
enum poslib_mode_e |
enum poslib_motion_mode_e |
enum poslib_ret_e |
Return codes of positioning functions.
Definition at line 37 of file poslib.h.
enum poslib_status_e |
defines status returned in PosLib_status().
Enumerator | |
---|---|
POSLIB_STOPPED | |
POSLIB_IDLE | |
POSLIB_UPDATE_START |
Definition at line 151 of file poslib.h.
#define POS_DESTINATION_ENDPOINT 238 |
#define POSLIB_FLAG_EVENT_SUBSCRIBERS_MAX 8 |
#define POSLIB_MBCN_RECORD_MAX_SIZE 16 |