Skip to content

Commit b556ff7

Browse files
committed
NGSI-LD Compliance
1 parent b16a92a commit b556ff7

File tree

7 files changed

+282
-157
lines changed

7 files changed

+282
-157
lines changed

AGECONF/config.json

Lines changed: 134 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,135 @@
11
{
2-
"logLevel" : "INFO",
3-
"multiCore" : false,
4-
"relaxTemplateValidation":true,
5-
"contextBroker" : {
6-
"host" : "orion",
7-
"port" : 1026,
8-
"ngsiVersion":"ld",
9-
"jsonLdContext":"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld",
10-
"fallbackTenant":"opcua_car"
11-
},
12-
"server" : {
13-
"port" : 4001,
14-
"baseRoot" : "/"
15-
},
16-
"deviceRegistry" : {
17-
"type" : "memory"
18-
},
19-
"mongodb" : {
20-
"host" : "iotmongo",
21-
"port" : "27017",
22-
"db" : "iotagent",
23-
"retries" : 5,
24-
"retryTime" : 5
25-
},
26-
"types" : {
27-
"Device" : {
28-
"service" : "opcua_car",
29-
"subservice" : "/demo",
30-
"active" : [{
31-
"name" : "EngineBrake",
32-
"type" : "Number"
33-
}, {
34-
"name" : "Acceleration",
35-
"type" : "Number"
36-
}, {
37-
"name" : "EngineStopped",
38-
"type" : "Boolean"
39-
}, {
40-
"name" : "Engine_Temperature",
41-
"type" : "Number"
42-
}, {
43-
"name" : "Engine_Oxigen",
44-
"type" : "Number"
45-
}],
46-
"lazy" : [{
47-
"name": "Speed",
48-
"type": "Number"
49-
}],
50-
"commands" : [{
51-
"name" : "Error",
52-
"type" : "command"
53-
}, {
54-
"name" : "Stop",
55-
"type" : "command"
56-
}, {
57-
"name" : "Accelerate",
58-
"type" : "command"
59-
}]
60-
}
61-
},
62-
"browseServerOptions" : null,
63-
"service" : "opcua_car",
64-
"subservice" : "/demo",
65-
"providerUrl" : "http://iotage:4001",
66-
"pollingExpiration" : "200000",
67-
"pollingDaemonFrequency" : "20000",
68-
"deviceRegistrationDuration" : "P1M",
69-
"defaultType" : null,
70-
"contexts" : [ {
71-
"id" : "urn:ngsi-ld:Device:age01_Car",
72-
"type" : "Device",
73-
"service" : "opcua_car",
74-
"subservice" : "/demo",
75-
"polling" : false,
76-
"mappings" : [{
77-
"ocb_id" : "Error",
78-
"opcua_id" : "ns=3;s=Error",
79-
"object_id" : null,
80-
"inputArguments" : [ ]
81-
},{
82-
"ocb_id" : "Acceleration",
83-
"opcua_id" : "ns=3;s=Acceleration",
84-
"object_id" : null,
85-
"inputArguments" : [ ]
86-
}, {
87-
"ocb_id" : "EngineStopped",
88-
"opcua_id" : "ns=3;s=EngineStopped",
89-
"object_id" : null,
90-
"inputArguments" : [ ]
91-
}, {
92-
"ocb_id" : "Engine_Temperature",
93-
"opcua_id" : "ns=3;s=Temperature",
94-
"object_id" : null,
95-
"inputArguments" : [ ]
96-
}, {
97-
"ocb_id" : "Engine_Oxigen",
98-
"opcua_id" : "ns=3;s=Oxigen",
99-
"object_id" : null,
100-
"inputArguments" : [ ]
101-
}]
102-
} ],
103-
"contextSubscriptions" : [ {
104-
"id" : "urn:ngsi-ld:Device:age01_Car",
105-
"type" : "Device",
106-
"mappings" : [
107-
{
108-
"ocb_id" : "Error",
109-
"opcua_id" : "ns=3;s=Error",
110-
"object_id" : "ns=3;i=1000",
111-
"inputArguments" : [ {
112-
"dataType" : 12,
113-
"type" : "Error Type"
114-
} ]
115-
},
116-
{
117-
"ocb_id": "Speed",
118-
"opcua_id": "ns=3;s=Speed",
119-
"object_id": "ns=3;i=1000",
120-
"inputArguments" : [ ]
121-
}, {
122-
"ocb_id" : "Stop",
123-
"opcua_id" : "ns=3;s=Stop",
124-
"object_id" : "ns=3;i=1000",
125-
"inputArguments" : [ ]
126-
}, {
127-
"ocb_id" : "Accelerate",
128-
"opcua_id" : "ns=3;s=Accelerate",
129-
"object_id" : "ns=3;i=1000",
130-
"inputArguments" : [ {
131-
"dataType" : 6,
132-
"type" : "Intensity"
133-
} ]
134-
} ]
135-
} ]
136-
}
2+
"logLevel": "DEBUG",
3+
"multiCore": false,
4+
"relaxTemplateValidation": true,
5+
"contextBroker": {
6+
"host": "orion",
7+
"port": 1026,
8+
"ngsiVersion": "ld",
9+
"jsonLdContext": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld",
10+
"service": "opcua_car",
11+
"subservice": "/demo"
12+
},
13+
"server": {
14+
"port": 4001,
15+
"baseRoot": "/"
16+
},
17+
"deviceRegistry": {
18+
"type": "memory"
19+
},
20+
"mongodb": {
21+
"host": "iot_mongo",
22+
"port": "27017",
23+
"db": "iotagent",
24+
"retries": 5,
25+
"retryTime": 5
26+
},
27+
"types": {
28+
"Device": {
29+
"service": "opcua_car",
30+
"subservice": "/demo",
31+
"active": [{
32+
"name": "EngineBrake",
33+
"type": "Number"
34+
}, {
35+
"name": "Acceleration",
36+
"type": "Number"
37+
}, {
38+
"name": "EngineStopped",
39+
"type": "Boolean"
40+
}, {
41+
"name": "Engine_Temperature",
42+
"type": "Number"
43+
}, {
44+
"name": "Engine_Oxigen",
45+
"type": "Number"
46+
}],
47+
"lazy": [{
48+
"name": "Speed",
49+
"type": "Number"
50+
}],
51+
"commands": [{
52+
"name": "Error",
53+
"type": "command"
54+
}, {
55+
"name": "Stop",
56+
"type": "command"
57+
}, {
58+
"name": "Accelerate",
59+
"type": "command"
60+
}]
61+
}
62+
},
63+
"browseServerOptions": null,
64+
"service": "opcua_car",
65+
"subservice": "/demo",
66+
"providerUrl": "http://iotage:4001",
67+
"pollingExpiration": "200000",
68+
"pollingDaemonFrequency": "20000",
69+
"deviceRegistrationDuration": "P1M",
70+
"defaultType": null,
71+
"contexts": [{
72+
"id": "urn:ngsi-ld:Device:age01_Car",
73+
"type": "Device",
74+
"service": "opcua_car",
75+
"subservice": "/demo",
76+
"polling": false,
77+
"mappings": [{
78+
"ocb_id": "Error",
79+
"opcua_id": "ns=3;s=Error",
80+
"object_id": null,
81+
"inputArguments": []
82+
}, {
83+
"ocb_id": "Acceleration",
84+
"opcua_id": "ns=3;s=Acceleration",
85+
"object_id": null,
86+
"inputArguments": []
87+
}, {
88+
"ocb_id": "EngineStopped",
89+
"opcua_id": "ns=3;s=EngineStopped",
90+
"object_id": null,
91+
"inputArguments": []
92+
}, {
93+
"ocb_id": "Engine_Temperature",
94+
"opcua_id": "ns=3;s=Temperature",
95+
"object_id": null,
96+
"inputArguments": []
97+
}, {
98+
"ocb_id": "Engine_Oxigen",
99+
"opcua_id": "ns=3;s=Oxigen",
100+
"object_id": null,
101+
"inputArguments": []
102+
}]
103+
}],
104+
"contextSubscriptions": [{
105+
"id": "urn:ngsi-ld:Device:age01_Car",
106+
"type": "Device",
107+
"mappings": [{
108+
"ocb_id": "Error",
109+
"opcua_id": "ns=3;s=Error",
110+
"object_id": "ns=3;i=1000",
111+
"inputArguments": [{
112+
"dataType": 12,
113+
"type": "Error Type"
114+
}]
115+
}, {
116+
"ocb_id": "Speed",
117+
"opcua_id": "ns=3;s=Speed",
118+
"object_id": "ns=3;i=1000",
119+
"inputArguments": []
120+
}, {
121+
"ocb_id": "Stop",
122+
"opcua_id": "ns=3;s=Stop",
123+
"object_id": "ns=3;i=1000",
124+
"inputArguments": []
125+
}, {
126+
"ocb_id": "Accelerate",
127+
"opcua_id": "ns=3;s=Accelerate",
128+
"object_id": "ns=3;i=1000",
129+
"inputArguments": [{
130+
"dataType": 6,
131+
"type": "Intensity"
132+
}]
133+
}]
134+
}]
135+
}

AGECONF/config.json.NGSIV1_WITH_PLACEHOLDER renamed to AGECONF/config.json.NGSIV2_WITH_PLACEHOLDER

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"contextBroker" : {
66
"host" : "TEST_MACHINE_IP",
77
"port" : 1026,
8-
"ngsiVersion":"v1",
98
"service" : "opcua_car",
109
"subservice" : "/demo"
1110
},
@@ -144,4 +143,3 @@
144143
} ]
145144
} ]
146145
}
147-

conf/config.json_NGSILD renamed to AGECONF/config_NGSIV2.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
"contextBroker": {
66
"host": "orion",
77
"port": 1026,
8-
"ngsiVersion": "ld",
9-
"jsonLdContext": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld",
10-
"fallbackTenant": "opcua_car"
8+
"service": "opcua_car",
9+
"subservice": "/demo"
1110
},
1211
"server": {
1312
"port": 4001,
@@ -17,7 +16,7 @@
1716
"type": "memory"
1817
},
1918
"mongodb": {
20-
"host": "iotmongo",
19+
"host": "iot_mongo",
2120
"port": "27017",
2221
"db": "iotagent",
2322
"retries": 5,
@@ -28,9 +27,6 @@
2827
"service": "opcua_car",
2928
"subservice": "/demo",
3029
"active": [{
31-
"name": "EngineBrake",
32-
"type": "Number"
33-
}, {
3430
"name": "Acceleration",
3531
"type": "Number"
3632
}, {
@@ -68,7 +64,7 @@
6864
"deviceRegistrationDuration": "P1M",
6965
"defaultType": null,
7066
"contexts": [{
71-
"id": "urn:ngsi-ld:Device:age01_Car",
67+
"id": "age01_Car",
7268
"type": "Device",
7369
"service": "opcua_car",
7470
"subservice": "/demo",
@@ -101,7 +97,7 @@
10197
}]
10298
}],
10399
"contextSubscriptions": [{
104-
"id": "urn:ngsi-ld:Device:age01_Car",
100+
"id": "age01_Car",
105101
"type": "Device",
106102
"mappings": [{
107103
"ocb_id": "Error",

conf/config.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
2-
"logLevel": "INFO",
2+
"logLevel": "DEBUG",
33
"multiCore": false,
44
"relaxTemplateValidation": true,
55
"contextBroker": {
66
"host": "orion",
77
"port": 1026,
8-
"service" : "opcua_car",
9-
"subservice" : "/demo"
8+
"ngsiVersion": "ld",
9+
"jsonLdContext": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld",
10+
"service": "opcua_car",
11+
"subservice": "/demo"
1012
},
1113
"server": {
1214
"port": 4001,
@@ -16,7 +18,7 @@
1618
"type": "memory"
1719
},
1820
"mongodb": {
19-
"host": "iotmongo",
21+
"host": "iot_mongo",
2022
"port": "27017",
2123
"db": "iotagent",
2224
"retries": 5,
@@ -67,7 +69,7 @@
6769
"deviceRegistrationDuration": "P1M",
6870
"defaultType": null,
6971
"contexts": [{
70-
"id": "age01_Car",
72+
"id": "urn:ngsi-ld:Device:age01_Car",
7173
"type": "Device",
7274
"service": "opcua_car",
7375
"subservice": "/demo",
@@ -100,7 +102,7 @@
100102
}]
101103
}],
102104
"contextSubscriptions": [{
103-
"id": "age01_Car",
105+
"id": "urn:ngsi-ld:Device:age01_Car",
104106
"type": "Device",
105107
"mappings": [{
106108
"ocb_id": "Error",
@@ -130,4 +132,4 @@
130132
}]
131133
}]
132134
}]
133-
}
135+
}
File renamed without changes.

0 commit comments

Comments
 (0)