![]() |
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 one-shot update with the respective schedule. If in stop mode then will stay in stop mode after the one-shot update. More... | |
| poslib_ret_e | PosLib_motion (poslib_motion_mode_e mode) |
| Is used to indicate that the tag is static or dynamic. The update rate used will be adjusted according to the state: when moving from static → dynamic: an update will be triggered immediately if the last update is older than (current time - dynamic rate), otherwise the next update is re-scheduled as (last update + dynamic rate). 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) |
| Clears a callback for the requested event. More... | |
Data Structures | |
| struct | poslib_ble_mode_config_t |
| defines BLE mode mode configration. More... | |
| struct | ble_beacon_settings_t |
| position library ble settings. More... | |
| struct | poslib_motion_mon_settings_t |
| position library motion 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 /* FixMe: adjust based on testing*/ |
| 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 |
| 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) |
| void PosLib_eventDeregister | ( | uint8_t | id | ) |
Clears a callback for the requested event.
| requested_event | type of poslib_events_e |
| 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 | type pointer |
| poslib_ret_e PosLib_motion | ( | poslib_motion_mode_e | mode | ) |
Is used to indicate that the tag is static or dynamic. The update rate used will be adjusted according to the state: when moving from static → dynamic: an update will be triggered immediately if the last update is older than (current time - dynamic rate), otherwise the next update is re-scheduled as (last update + dynamic rate).
| mode | type of poslib_motion_mode_e |
| 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 one-shot update with the respective schedule. If in stop mode then will stay in stop mode after the one-shot update.
| 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_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_settings_t |
| Data Fields | ||
|---|---|---|
| ble_beacon_settings_t | ble | |
| 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 | ||
|---|---|---|
| uint8_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 121 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 150 of file poslib.h.
| #define POS_DESTINATION_ENDPOINT 238 |
| #define POSLIB_FLAG_EVENT_SUBSCRIBERS_MAX 8 |
| #define POSLIB_MIN_MEAS_RATE_S 8 /* FixMe: adjust based on testing*/ |