C SIGFOX CALLBACK  0.0.1
A Sigfox Callback program writtent in C
frames.h
Go to the documentation of this file.
1 
10 #ifndef __FRAME_H__
11 #define __FRAME_H__
12 
13 #include <time.h>
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 
23 #define SIGFOX_DATA_STR_LENGTH 24
24 
25 
29 #define SIGFOX_DOWNLINK_DATA_LENGTH 16
30 
31 
35 #define SIGFOX_DATA_LENGTH 12
36 
37 
41 #define SIGFOX_STATION_LENGTH 4
42 
43 
47 #define SIGFOX_DEVICE_LENGTH 8
48 
49 
53 typedef struct sigfox_raws_s sigfox_raws_t;
54 
55 
59 typedef struct sigfox_device_s sigfox_device_t;
60 
61 
66 struct sigfox_raws_s {
67  unsigned char id_modem[SIGFOX_DEVICE_LENGTH + 1];
68  time_t timestamp;
69  unsigned char duplicate;
70  double snr;
73  unsigned char station[SIGFOX_STATION_LENGTH + 1];
74  unsigned char data_str[SIGFOX_DATA_STR_LENGTH + 1];
75  unsigned char data_hex[SIGFOX_DATA_LENGTH];
76  double avg_signal;
77  short latitude;
79  short longitude;
80  double rssi;
81  unsigned int seq_number;
83  unsigned char ack;
84  unsigned char long_polling;
85 };
86 
87 
93  unsigned char id_modem[SIGFOX_DEVICE_LENGTH];
96 };
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 
102 #endif // __FRAME_H__
unsigned char long_polling
longPolling : &#39;true&#39; or &#39;false&#39;
Definition: frames.h:84
#define SIGFOX_STATION_LENGTH
Length of a Sigfox station name.
Definition: frames.h:41
short latitude
the latitude, rounded to the nearest integer, of the base station which received the message ...
Definition: frames.h:78
#define SIGFOX_DATA_LENGTH
Length of a Sigfox data frame in hexadecimal.
Definition: frames.h:35
unsigned char ack
true if this message needs to be acknowledged, false else
Definition: frames.h:83
double rssi
Definition: frames.h:80
Contains all the informations that can be given by the Sigfox backend.
Definition: frames.h:66
int timestamp_attribution
Timestamp of the attribution.
Definition: frames.h:95
short longitude
the longitude, rounded to the nearest integer, of the base station which received the message ...
Definition: frames.h:79
Contains all the informations that defines a Sigfox device.
Definition: frames.h:92
unsigned char station[SIGFOX_STATION_LENGTH+1]
the base station identifier (in hexadecimal – 4 characters <=> 2 bytes)
Definition: frames.h:73
unsigned int seq_number
the sequence number of the message if available
Definition: frames.h:82
unsigned char duplicate
Definition: frames.h:69
unsigned char data_hex[SIGFOX_DATA_LENGTH]
the user data (in hexadecimal)
Definition: frames.h:75
time_t timestamp
the event timestamp (in seconds since the Unix Epoch)
Definition: frames.h:68
unsigned char data_str[SIGFOX_DATA_STR_LENGTH+1]
the user data (in string)
Definition: frames.h:74
double snr
the signal to noise ratio (in dB – Float value with two maximum fraction digits) ...
Definition: frames.h:72
unsigned char id_modem[SIGFOX_DEVICE_LENGTH+1]
device identifier (in hexadecimal – up to 8 characters <=> 4 bytes)
Definition: frames.h:67
double avg_signal
Definition: frames.h:76
int attribution
Attrbution variable.
Definition: frames.h:94
#define SIGFOX_DEVICE_LENGTH
Length of a Sigfox modem name.
Definition: frames.h:47
#define SIGFOX_DATA_STR_LENGTH
Length of a Sigfox data frame in string.
Definition: frames.h:23