-
Notifications
You must be signed in to change notification settings - Fork 1
/
project-conf.h
95 lines (70 loc) · 2.76 KB
/
project-conf.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#ifndef PROJECT_CONF_H_
#define PROJECT_CONF_H_
/* Set to enable TSCH security */
#ifndef WITH_SECURITY
#define WITH_SECURITY 0
#endif /* WITH_SECURITY */
/* USB serial takes space, free more space elsewhere */
#define SICSLOWPAN_CONF_FRAG 0
#define UIP_CONF_BUFFER_SIZE 160
/*******************************************************/
/******************* Configure TSCH ********************/
/*******************************************************/
/* Disable the 6TiSCH minimal schedule */
#define TSCH_SCHEDULE_CONF_WITH_6TISCH_MINIMAL 0
/* IEEE802.15.4 PANID */
#define IEEE802154_CONF_PANID 0x81a5
/* Do not start TSCH at init, wait for NETSTACK_MAC.on() */
// you can use this funtion to finish initialization
#define TSCH_CONF_AUTOSTART 0
/* Length of slotframes */
#define BROADCAST_SLOTFRAME_LENGTH 7
#define UNICAST_SLOTFRAME_LENGTH 15
// UDP packet sending interval in seconds
#define PACKET_SENDING_INTERVAL 30
// UDP packet payload size
#define UDP_PLAYLOAD_SIZE 50
// expected header lenght of a UDP packet from Application layer
#define UDP_HEADER_LEN 21
// MAX number of re-transmissions
#define TSCH_CONF_MAX_FRAME_RETRIES 3
// hopping sequence
#define TSCH_CONF_DEFAULT_HOPPING_SEQUENCE TSCH_HOPPING_SEQUENCE_2_2
// define a link selector function
#define TSCH_CONF_WITH_LINK_SELECTOR 0
#define TSCH_CALLBACK_PACKET_READY my_callback_packet_ready
// macros to enbale QL-TSCH in tsch libriaries
#define QL_TSCH_ENABLED_CONF 1
// Run algorithm with tsch locking
#define WITH_TSCH_LOCKING 1
// drift compensation time when tsch locking is used in milliseconds
#define EXTRA_TIME 78
// define an interval policy update time, for testing (fixed time to update Q-table)
// not et the beginning of each slotframe
#define UPDATE_POLICY_INTERVAL_CONF 0
// Default slotframe length
// #define TSCH_SCHEDULE_CONF_DEFAULT_LENGTH 7
// Packetbuffer size
// #define PACKETBUF_CONF_SIZE 128 // 128 default
// to list all the packets in the queue and get the total number
// #define QUEUEBUF_CONF_DEBUG 1
// #define QUEUEBUF_CONF_STATS 1
// The 6lowpan "headers" length
// #define TSCH_CONF_WITH_SIXTOP 1
/*******************************************************/
#if WITH_SECURITY
/* Enable security */
#define LLSEC802154_CONF_ENABLED 1
#endif /* WITH_SECURITY */
/*******************************************************/
/************* Other system configuration **************/
/*******************************************************/
/* Logging */
#define LOG_CONF_LEVEL_RPL LOG_LEVEL_WARN
#define LOG_CONF_LEVEL_TCPIP LOG_LEVEL_WARN
#define LOG_CONF_LEVEL_IPV6 LOG_LEVEL_WARN
#define LOG_CONF_LEVEL_6LOWPAN LOG_LEVEL_WARN
#define LOG_CONF_LEVEL_MAC LOG_LEVEL_WARN // alternative _INFO/WARN
#define LOG_CONF_LEVEL_FRAMER LOG_LEVEL_WARN
#define TSCH_LOG_CONF_PER_SLOT 1
#endif /* PROJECT_CONF_H_ */