Wirepas SDK
poslib_control.h File Reference

Header for poslib_control.c. More...

Detailed Description

Header for poslib_control.c.

Definition in file poslib_control.h.

Go to the source code of this file.

Functions

poslib_ret_e PosLibCtrl_setConfig (poslib_settings_t *settings)
 Sets new configration to PosLib. More...
 
poslib_ret_e PosLibCtrl_getConfig (poslib_settings_t *settings)
 Returns the current PosLib configuration. More...
 
poslib_ret_e PosLibCtrl_startPeriodic (void)
 Starts periodic positioning update. More...
 
poslib_ret_e PosLibCtrl_stopPeriodic (void)
 Stops periodic positioning update. More...
 
poslib_ret_e PosLibCtrl_startOneshot (void)
 Triggers a single position update imediatelly. More...
 
poslib_ret_e PosLibCtrl_motion (poslib_motion_mode_e mode)
 Adjust the update rate according to motion state (static/dynamic) More...
 
poslib_status_e PosLibCtrl_status (void)
 Returns the current status of PosLib. More...
 
void PosLibCtrl_processEvent (poslib_internal_event_t *event)
 Process the internal event. More...
 
void PosLibCtrl_getAppConfig (uint8_t **cfg, uint8_t *len)
 Returns the current app config payload. More...
 
void PosLibCtrl_setAppConfig (const uint8_t *cfg, uint8_t len)
 

Enumerations

enum  poslib_state_e { POSLIB_STATE_STOPPED = 0, POSLIB_STATE_IDLE = 1, POSLIB_STATE_UPDATE = 2 }
 PosLib control internal state definitions. More...
 

Function Documentation

◆ PosLibCtrl_getAppConfig()

void PosLibCtrl_getAppConfig ( uint8_t **  cfg,
uint8_t *  len 
)

Returns the current app config payload.

Parameters
[out]cfgpointer to the app config array
[out]lenthe length of the app config, 0 no configuration valid
Returns
void

◆ PosLibCtrl_getConfig()

poslib_ret_e PosLibCtrl_getConfig ( poslib_settings_t settings)

Returns the current PosLib configuration.

Parameters
settingstype of poslib_settings_t where settings will be delivered
Returns
See poslib_ret_e

◆ PosLibCtrl_motion()

poslib_ret_e PosLibCtrl_motion ( poslib_motion_mode_e  mode)

Adjust the update rate according to motion state (static/dynamic)

Parameters
modetype of poslib_motion_mode_e
Returns
See poslib_ret_e

◆ PosLibCtrl_processEvent()

void PosLibCtrl_processEvent ( poslib_internal_event_t event)

Process the internal event.

Parameters
eventtype of poslib_internal_event_t
Returns
void

◆ PosLibCtrl_setAppConfig()

void PosLibCtrl_setAppConfig ( const uint8_t *  cfg,
uint8_t  len 
)

◆ PosLibCtrl_setConfig()

poslib_ret_e PosLibCtrl_setConfig ( poslib_settings_t settings)

Sets new configration to PosLib.

Parameters
settingstype of poslib_settings_t with settings
Returns
See poslib_ret_e

◆ PosLibCtrl_startOneshot()

poslib_ret_e PosLibCtrl_startOneshot ( void  )

Triggers a single position update imediatelly.

Note
If periodic update is active it will continue after oneshot completed If an update is already in progress the call will be ignored
Returns
See poslib_ret_e

◆ PosLibCtrl_startPeriodic()

poslib_ret_e PosLibCtrl_startPeriodic ( void  )

Starts periodic positioning update.

Returns
See poslib_ret_e

◆ PosLibCtrl_status()

poslib_status_e PosLibCtrl_status ( void  )

Returns the current status of PosLib.

Returns
See poslib_status_e

◆ PosLibCtrl_stopPeriodic()

poslib_ret_e PosLibCtrl_stopPeriodic ( void  )

Stops periodic positioning update.

Enumeration Type Documentation

◆ poslib_state_e

PosLib control internal state definitions.

Enumerator
POSLIB_STATE_STOPPED 
POSLIB_STATE_IDLE 
POSLIB_STATE_UPDATE 

Definition at line 15 of file poslib_control.h.

16 {
POSLIB_STATE_UPDATE
@ POSLIB_STATE_UPDATE
Definition: poslib_control.h:19
POSLIB_STATE_STOPPED
@ POSLIB_STATE_STOPPED
Definition: poslib_control.h:17
poslib_state_e
poslib_state_e
PosLib control internal state definitions.
Definition: poslib_control.h:15
POSLIB_STATE_IDLE
@ POSLIB_STATE_IDLE
Definition: poslib_control.h:18