-
Notifications
You must be signed in to change notification settings - Fork 3
/
SD_table_entries.h
66 lines (56 loc) · 1.25 KB
/
SD_table_entries.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
// Created by Bassirou on 10.09.2018.
//
#ifndef GATEWAY_SD_TABLE_ENTRIES_H
#define GATEWAY_SD_TABLE_ENTRIES_H
#include <string.h>
#include <stdio.h>
#include "global_defines.h"
#include "mqttsn_messages.h"
#include "core_defines.h"
struct entry_mqtt_subscription{
uint32_t client_subscription_count;
char topic_name[255];
};
struct entry_will {
char willtopic[255];
char willmsg[255];
uint8_t willmsg_length;
uint8_t qos;
bool retain;
};
struct entry_subscription{
uint16_t topic_id;
uint8_t qos;
char topic_name[255];
};
struct entry_registration{
uint16_t topic_id;
char topic_name[255];
bool known;
};
struct entry_publish{
uint8_t msg[255];
uint8_t msg_length;
uint16_t topic_id;
uint8_t qos;
bool retain;
bool dup;
uint16_t msg_id;
uint16_t publish_id;
uint32_t retransmition_timeout; // not used atm
};
//TODO remove pragma and test
#pragma pack(push, 1)
struct entry_client {
char client_id[24];
char file_number[9];
device_address client_address;
CLIENT_STATUS client_status;
uint32_t duration; // changed
uint32_t timeout;
uint16_t await_message_id;
message_type await_message;
};
#pragma pack(pop)
#endif //GATEWAY_SD_TABLE_ENTRIES_H