lriot 2.1.0.0
lr1110_modem_helper_types.h
Go to the documentation of this file.
1
32#ifndef LR1110_MODEM_HELPER_TYPES_H
33#define LR1110_MODEM_HELPER_TYPES_H
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39/*
40 * -----------------------------------------------------------------------------
41 * --- DEPENDENCIES ------------------------------------------------------------
42 */
43
44#include <stdbool.h>
45#include <stdint.h>
46
47/*
48 * -----------------------------------------------------------------------------
49 * --- PUBLIC MACROS -----------------------------------------------------------
50 */
51
52/*
53 * -----------------------------------------------------------------------------
54 * --- PUBLIC CONSTANTS --------------------------------------------------------
55 */
56
60#define LR1110_MODEM_HELPER_INITAL_GNSS_DATE_SECONDS 315964800
61
65#define LR1110_MODEM_HELPER_GNSS_LEAP_SECONDS_OFFSET 18
66
70#define LR1110_MODEM_HELPER_NB_WEEK_PER_WRAP 1024
71
75#define LR1110_MODEM_HELPER_NB_SEC_PER_HOUR 3600
76
80#define LR1110_MODEM_HELPER_NB_HOUR_PER_DAY 24
81
85#define LR1110_MODEM_HELPER_NB_DAY_PER_WEEK 7
86
90#define LR1110_MODEM_HELPER_MAX_DOWNLINK_LENGTH 242
91
95#define LR1110_MODEM_HELPER_GNSS_MAX_NAV_LENGTH 255
96
100#define LR1110_MODEM_HELPER_WIFI_MAX_BUFFER_LENGTH 948 // 12 results * LR1110_WIFI_EXTENDED_FULL_RESULT_SIZE
101
102/*
103 * -----------------------------------------------------------------------------
104 * --- PUBLIC TYPES ------------------------------------------------------------
105 */
106
115
119typedef struct
120{
121 uint8_t event_type;
123 union
124 {
125 struct
126 {
127 uint16_t count;
128 } reset;
129 struct
130 {
131 uint8_t status;
132 } txdone;
133 struct
134 {
135 int8_t rssi;
136 int8_t snr;
137 uint8_t flag;
138 uint8_t fport;
140 uint8_t length;
141 } downdata;
142 struct
143 {
144 uint8_t status;
145 } upload;
146 struct
147 {
148 uint8_t tag;
149 } setconf;
150 struct
151 {
152 uint8_t status;
153 } mute;
154 struct
155 {
156 uint16_t len;
158 } wifi;
159 struct
160 {
161 uint16_t len;
163 } gnss;
164 struct
165 {
166 uint8_t status;
167 } time;
168 } event_data;
170
171#ifdef __cplusplus
172}
173#endif
174
175#endif // LR1110_MODEM_HELPER_TYPES_H
#define LR1110_MODEM_HELPER_WIFI_MAX_BUFFER_LENGTH
Maximum payload size in byte of a Wi-Fi result.
Definition lr1110_modem_helper_types.h:100
#define LR1110_MODEM_HELPER_GNSS_MAX_NAV_LENGTH
Maximum payload size in byte of a nav message.
Definition lr1110_modem_helper_types.h:95
#define LR1110_MODEM_HELPER_MAX_DOWNLINK_LENGTH
Maximum payload size in byte of a downlink.
Definition lr1110_modem_helper_types.h:90
lr1110_modem_helper_status_t
LR1110 Modem helper status.
Definition lr1110_modem_helper_types.h:111
@ LR1110_MODEM_HELPER_STATUS_ERROR
Definition lr1110_modem_helper_types.h:113
@ LR1110_MODEM_HELPER_STATUS_OK
Definition lr1110_modem_helper_types.h:112
Structure holding event-related data.
Definition lr1110_modem_helper_types.h:120
uint8_t missed_events
Number of event_type events missed before the current one.
Definition lr1110_modem_helper_types.h:122
int8_t rssi
Signed value in dBm + 64.
Definition lr1110_modem_helper_types.h:135
uint8_t tag
Definition lr1110_modem_helper_types.h:148
uint8_t event_type
Definition lr1110_modem_helper_types.h:121
int8_t snr
Signed value in dB given in 0.25dB step.
Definition lr1110_modem_helper_types.h:136
uint16_t len
Definition lr1110_modem_helper_types.h:156
uint8_t length
Definition lr1110_modem_helper_types.h:140
uint8_t fport
Definition lr1110_modem_helper_types.h:138
uint8_t status
Definition lr1110_modem_helper_types.h:131
uint16_t count
Definition lr1110_modem_helper_types.h:127
uint8_t flag
Definition lr1110_modem_helper_types.h:137