Wirepas SDK
poslib_mbcn.h File Reference

Header file for the poslib mini-beacon module. More...

Detailed Description

Header file for the poslib mini-beacon module.

Definition in file poslib_mbcn.h.

Go to the source code of this file.

Functions

bool PosLibMbcn_start (poslib_mbcn_config_t *)
 Starts sending periodic mini-beacons. More...
 
void PosLibMbcn_stop ()
 Stops periodic mini-beacons. More...
 
bool PosLibMbcn_decode (uint8_t *buf, uint8_t length, poslib_mbcn_data_t *mbcn)
 Decodes the mini-beacon payload. More...
 

Data Structures

struct  poslib_mbcn_payload_t
 Mini-beacon payload struct. More...
 

Macros

#define PACKED_STRUCT   struct __attribute__((__packed__))
 

Function Documentation

◆ PosLibMbcn_decode()

bool PosLibMbcn_decode ( uint8_t *  buf,
uint8_t  length,
poslib_mbcn_data_t mbcn 
)

Decodes the mini-beacon payload.

Parameters
[in]bufPointer to the received payload.
[in]lengthlength of the received payload buffer
[out]mbcnpointer to a poslib_mbcn_data_t structure where decoded data will be stored
Returns
true: decoding sucesfull, false: decoding error, data is invalid

◆ PosLibMbcn_start()

bool PosLibMbcn_start ( poslib_mbcn_config_t )

Starts sending periodic mini-beacons.

Parameters
mbcnPointer to poslib_mbcn_config_t structure with configuration.
Returns
true: mini-beacons started, false: mini-beacons not started

◆ PosLibMbcn_stop()

void PosLibMbcn_stop ( )

Stops periodic mini-beacons.

Returns
void

Data Structure Documentation

◆ poslib_mbcn_payload_t

struct poslib_mbcn_payload_t

Mini-beacon payload struct.

Definition at line 16 of file poslib_mbcn.h.

Data Fields
uint8_t data[102 - sizeof(uint16_t)]
uint16_t seq

Macro Definition Documentation

◆ PACKED_STRUCT

#define PACKED_STRUCT   struct __attribute__((__packed__))

Definition at line 11 of file poslib_mbcn.h.