Wirepas SDK
poslib_measurement.h
Go to the documentation of this file.
1
7#ifndef _POSLIB_MEASUREMENT_H_
8#define _POSLIB_MEASUREMENT_H_
9
33
35#define MAX_PAYLOAD 102
36
38#define MAX_BEACONS 14
40#define NODE_ADDRESS_LENGTH 4
41#define DEFAULT_MEASUREMENT_TYPE_TAG POSLIB_MEAS_RSS_SR_4BYTE_ADDR
42#define DEFAULT_MEASUREMENT_TYPE_ANCHOR POSLIB_MEAS_RSS_SR_ANCHOR_4BYTE_ADDR
43
44
46#define PACKED_STRUCT struct __attribute__((__packed__))
47
52
57{
58 uint32_t address;
59 uint8_t norm_rss;
61
70
76
85
87#define POSLIB_NODE_INFO_FEATURES_VERSION 1
106
121
122typedef enum
123{
126
127typedef struct poslib_measurement
128{
130 uint32_t max_duration_ms; //maximum scan duration [ms], (if 0 then scan default time is used)
132
133
140
142
148
153
154bool PosLibMeas_getPayload(uint8_t * bytes, uint8_t max_len, uint16_t sequence,
155 poslib_measurements_e meas_type, bool add_voltage,
157 uint8_t * bytes_len, uint8_t * num_meas);
158
165#endif
void PosLibMeas_clearMeas(void)
Clears measurement table.
poslib_measurements_e
defines the device's positioning mode. The type is matched against the WPE proto definition.
@ POSLIB_MEAS_DA
@ POSLIB_MEAS_VOLTAGE
@ POSLIB_MEAS_RSS_SR_4BYTE_ADDR
@ POSLIB_MEAS_RSS_SR
@ POSLIB_MEAS_SPACE
@ POSLIB_MEAS_NODE_INFO
@ POSLIB_MEAS_RSS_SR_ANCHOR_4BYTE_ADDR
@ POSLIB_MEAS_RSS_HR
@ POSLIB_MEAS_TIME
@ POSLIB_MEAS_RSS_SR_ANCHOR
void PosLibMeas_stop(void)
Stops the measurement module. Callbacks are removed.
bool PosLibMeas_opportunisticScan(bool enable)
bool PosLibMeas_startScan(poslib_scan_ctrl_t *scan_ctrl)
Starts new scan.
uint8_t PosLibMeas_getBeaconNum(void)
Get the number of beacons available.
poslib_scan_mode_e mode
poslib_node_info_features_e
Node active features (.
@ POSLIB_NODE_INFO_MASK_VERSION
@ POSLIB_NODE_INFO_FLAG_IS_STATIC
@ POSLIB_NODE_INFO_FLAG_IBEACON_ON
@ POSLIB_NODE_INFO_FLAG_MBCN_ON
@ POSLIB_NODE_INFO_FLAG_EDDYSTONE_ON
@ POSLIB_NODE_INFO_FLAG_MOTION_EN
poslib_meas_record_header_t header
bool PosLibMeas_getPayload(uint8_t *bytes, uint8_t max_len, uint16_t sequence, poslib_measurements_e meas_type, bool add_voltage, poslib_meas_record_node_info_t *node_info, uint8_t *bytes_len, uint8_t *num_meas)
poslib_scan_mode_e
@ SCAN_MODE_STANDARD
#define PACKED_STRUCT
Measurement record header.
Voltage record (header + payload)
RSS measurement structure.