forked from telefonicaid/lwm2m-node-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-mongo.js
62 lines (59 loc) · 1.44 KB
/
config-mongo.js
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
var config = {};
// Configuration of the LWTM2M Server
//--------------------------------------------------
config.server = {
port: 5683, // Port where the server will be listening
lifetimeCheckInterval: 1000, // Minimum interval between lifetime checks in ms
udpWindow: 100,
defaultType: 'Device',
logLevel: 'FATAL',
ipProtocol: 'udp4',
serverProtocol: 'udp4',
deviceRegistry: {
type: 'mongodb'
},
mongodb:{
host: 'localhost',
port: '27017',
db: 'lwtm2m'
},
formats: [
{
name: 'application-vnd-oma-lwm2m/text',
value: 1541
},
{
name: 'application-vnd-oma-lwm2m/tlv',
value: 1542
},
{
name: 'application-vnd-oma-lwm2m/json',
value: 1543
},
{
name: 'application-vnd-oma-lwm2m/opaque',
value: 1544
}
],
writeFormat: 'application-vnd-oma-lwm2m/text'
};
// Configuration of the LWTM2M Client
//--------------------------------------------------
config.client = {
lifetime: '85671',
version: '1.0',
logLevel: 'FATAL',
observe: {
period: 3000
},
ipProtocol: 'udp4',
serverProtocol: 'udp4',
formats: [
{
name: 'lightweightm2m/text',
value: 1541
}
],
writeFormat: 'lightweightm2m/text'
};
module.exports = config;