LOM2M  0.8.0
configuration.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2013-2021 LAAS-CNRS (www.laas.fr)
3  7 Colonel Roche 31077 Toulouse - France
4 
5  The use of this source code requires an agreement with the CNRS.
6 
7  Initial Contributors:
8  David Gauchard, Guillaume Garzone, Thierry Monteil.
9 */
10 
11 #ifndef __LOM2M_CONFIG
12 #define __LOM2M_CONFIG
13 
14 #include "configurationTarget.h"
15 #include <Arduino.h>
16 
18 #define mySSID "davisa"
19 #define myPSK "chez,davisa"
20 
22 #define DEBUG 1 // define here for enabling DEBUG logs
23 #if DEBUG
24 #define INFO 1
25 #define TRACE 1
26 #else
27 #define INFO 1 // define here for INFO logs
28 #define TRACE 1 // define here for TRACE logs
29 #endif
31 
32 
34 #ifndef TARGET_UNIX
35 #define TARGET_UNIX 0
36 #endif
37 #if TARGET_UNIX
38 // TARGET (UNIX BASED)
39 #define ACCESS_CONTROL_FEAT 1
40 #define PERSISTENCE_FEAT 1
41 #define SUBSCRIPTION_FEAT 1
42 #define REQ_LVL_FEAT 1
43 #define JSONMAXSIZE_OUTPUT 65536
44 #define GROUP_FEAT 0
45 #define MQTTS_BINDING 1
46 #define CONF_MQTTS_DEFAULT_ENABLED 0
47 #define HTTP_BINDING 1
48 #define HTTP_BINDING_ENABLED_DEFAULT 1
49 #define FEAT_RCN_9 1
50 
51 #else // DEFAULT
52 // FEATURES TO BE ENABLED ON MICROCONTROLLER ESP 8266
53 #define ACCESS_CONTROL_FEAT 1
54 #define PERSISTENCE_FEAT 0
55 #define SUBSCRIPTION_FEAT 1
56 #define REQ_LVL_FEAT 0
57 #define JSONMAXSIZE_OUTPUT 7168
58 #define GROUP_FEAT 0
59 #define MQTTS_BINDING 1
60 #define CONF_MQTTS_DEFAULT_ENABLED 0
61 #define HTTP_BINDING 1
62 #define HTTP_BINDING_ENABLED_DEFAULT 1
63 #define FEAT_RCN_9 1
64 
65 #endif
66 
68 #if PERSISTENCE_FEAT
69 // default backup period, can be set through env var LOM2M_BACKUP_PERIOD
70 #define PERSIST_PERIOD_MS 60000
71 #endif
72 
78 #if TARGET_UNIX
79 
80 // Global Threshold
81 #define GLOBAL_MAX_NUMBER_RESOURCES -1
82 // CIN Specific threshold (per CNT)
83 #define MAX_CIN_PER_CNT 10
84 
85 #else
86 
87 #define GLOBAL_MAX_NUMBER_RESOURCES 30
88 #define MAX_CIN_PER_CNT 1
89 #define DEFAULT_PROTOCOL_HTTP 1
90 
91 #endif
92 
94 
95 
97 #define CONF_REMOTE_POA "http://127.0.0.1:8080"
98 #define CONF_REMOTE_CSE_ID "in-cse"
99 #define CONF_REMOTE_CSE_NAME "in-name"
100 #define CONF_ADMIN_ORIGINATOR "admin:admin"
101 #define CONF_LOCAL_POA "http://"+IP+":"+PORT
102 #if MQTTS_BINDING
103 #define CONF_MQTTS_ENDPOINT "a1y70l404vfam6-ats.iot.us-west-2.amazonaws.com"
104 #define CONF_MQTTS_PORT 8883
105 #define CONF_MQTTS_RETRY_PERIOD 15000
106 #define CONF_MQTTS_TIMEOUT 30000
107 #define CONF_MQTTS_CLIENT_BUFFER_SIZE 1024
108 #define CONF_MQTTS_GENERIC_REQ_TOPIC_BASE "/oneM2M/req/"
109 #define CONF_MQTTS_GENERIC_RESP_TOPIC_BASE "/oneM2M/resp/"
110 #define CONF_MQTTS_GENERIC_TOPIC_END "/json"
111 #define CONF_MQTTS_CLIENT_ID_PREFIX "com.toulousetechtransfer.lom2m-"
112 #endif
114 
117 
118 #define VERBOSE 0
120 #define SKIP_VRQ 0
122 #define DISABLE_RI_CHECK 0
124 #define REL_1 0
126 
127 #endif // __LOM2M_CONFIG