iotagent-node-lib 4.8.0 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +4 -1
- package/.nyc_output/e4b1fe20-197e-4221-9f8d-6db65ff234b2.json +1 -0
- package/.nyc_output/processinfo/e4b1fe20-197e-4221-9f8d-6db65ff234b2.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -0
- package/Changelog +785 -0
- package/doc/admin.md +8 -4
- package/doc/api.md +1 -1
- package/lib/commonConfig.js +11 -2
- package/lib/services/common/domain.js +4 -3
- package/lib/services/devices/devices-NGSI-LD.js +1 -2
- package/lib/services/devices/devices-NGSI-v2.js +1 -2
- package/lib/services/ngsi/entities-NGSI-LD.js +69 -13
- package/lib/services/ngsi/ngsiService.js +3 -1
- package/lib/services/northBound/contextServer-NGSI-LD.js +5 -3
- package/lib/services/northBound/northboundServer.js +1 -1
- package/lib/services/northBound/restUtils.js +6 -2
- package/package.json +1 -1
- package/test/functional/config-test.js +1 -1
- package/test/unit/ngsi-ld/examples/contextRequests/createDatetimeProvisionedDevice.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/createProvisionedDevice.json +3 -12
- package/test/unit/ngsi-ld/examples/contextRequests/createProvisionedDeviceMultientity.json +3 -12
- package/test/unit/ngsi-ld/examples/contextRequests/createProvisionedDeviceWithGroupAndStatic.json +6 -24
- package/test/unit/ngsi-ld/examples/contextRequests/createProvisionedDeviceWithGroupAndStatic2.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContext1.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContext3WithStatic.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContext4.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContext5.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin6.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin7.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin8.json +4 -2
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin9.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextCommandError.json +3 -9
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextCommandExpired.json +13 -19
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextCommandFinish.json +13 -19
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextCommandStatus1.json +4 -9
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextCompressTimestamp1.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextCompressTimestamp2.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin1a.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin2.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin29.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin4.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin4a.json +3 -12
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin6.json +3 -5
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin7.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin8a.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextJsonProperty.json +13 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextListProperty.json +14 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextListRelationship.json +14 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin1.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin2.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin3.json +3 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin4.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin5.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin8.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin1.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin2.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin3.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin4.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextRelationship.json +11 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextValueType1.json +51 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextValueType2.json +65 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextVocabProperty.json +11 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateProvisionCommands1.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateProvisionDeviceStatic.json +1 -4
- package/test/unit/ngsi-ld/general/startup-test.js +3 -0
- package/test/unit/ngsi-ld/lazyAndCommands/command-test.js +1 -1
- package/test/unit/ngsi-ld/lazyAndCommands/lazy-devices-test.js +71 -1
- package/test/unit/ngsi-ld/ngsiService/attributeTypes-test.js +293 -0
- package/test/unit/ngsi-ld/ngsiService/unsupported-endpoints-test.js +0 -10
- package/test/unit/ngsi-ld/ngsiService/value-types-test.js +221 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast1.json +0 -11
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast10.json +0 -14
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast2.json +0 -11
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast3.json +0 -11
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast4.json +0 -11
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast5.json +0 -7
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast6.json +0 -17
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast7.json +0 -19
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast8.json +0 -14
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast9.json +0 -14
- package/test/unit/ngsi-ld/ngsiService/languageProperties-test.js +0 -109
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast1.json +0 -8
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast2.json +0 -8
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast3.json +0 -8
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast4.json +0 -8
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast5.json +0 -8
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast6.json +0 -8
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast7.json +0 -8
- /package/test/unit/ngsi-ld/examples/contextRequests/{updateContextLanguageProperties1.json → updateContextLanguageProperty.json} +0 -0
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
"configuration": {
|
|
5
5
|
"type": "Property",
|
|
6
6
|
"value": {
|
|
7
|
-
"
|
|
8
|
-
|
|
7
|
+
"firmware": {
|
|
8
|
+
"version": "1.1.0",
|
|
9
|
+
"hash": "cf23df2207d99a74fbe169e3eba035e633b65d94"
|
|
10
|
+
}
|
|
9
11
|
}
|
|
10
12
|
},
|
|
11
13
|
"id": "urn:ngsi-ld:Light:light1",
|
|
@@ -3,19 +3,13 @@
|
|
|
3
3
|
"@context": "http://context.json-ld",
|
|
4
4
|
"position_status": {
|
|
5
5
|
"type": "Property",
|
|
6
|
-
"value":
|
|
7
|
-
"@type": "commandStatus",
|
|
8
|
-
"@value": "ERROR"
|
|
9
|
-
}
|
|
6
|
+
"value": "ERROR"
|
|
10
7
|
},
|
|
11
8
|
"position_info": {
|
|
12
9
|
"type": "Property",
|
|
13
|
-
"value":
|
|
14
|
-
"@type": "commandResult",
|
|
15
|
-
"@value": "Stalled"
|
|
16
|
-
}
|
|
10
|
+
"value": "Stalled"
|
|
17
11
|
},
|
|
18
12
|
"id": "urn:ngsi-ld:Robot:r2d2",
|
|
19
13
|
"type": "Robot"
|
|
20
14
|
}
|
|
21
|
-
]
|
|
15
|
+
]
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
[
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"@value":"EXPIRED"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"id":"urn:ngsi-ld:Robot:r2d2",
|
|
19
|
-
"type":"Robot"
|
|
20
|
-
}
|
|
2
|
+
{
|
|
3
|
+
"@context":"http://context.json-ld",
|
|
4
|
+
"position_status": {
|
|
5
|
+
"type":"Property",
|
|
6
|
+
"value": "ERROR"
|
|
7
|
+
},
|
|
8
|
+
"position_info": {
|
|
9
|
+
"type":"Property",
|
|
10
|
+
"value": "EXPIRED"
|
|
11
|
+
},
|
|
12
|
+
"id":"urn:ngsi-ld:Robot:r2d2",
|
|
13
|
+
"type":"Robot"
|
|
14
|
+
}
|
|
21
15
|
]
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
[
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"@value":"[72, 368, 1]"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"id":"urn:ngsi-ld:Robot:r2d2",
|
|
19
|
-
"type":"Robot"
|
|
20
|
-
}
|
|
2
|
+
{
|
|
3
|
+
"@context":"http://context.json-ld",
|
|
4
|
+
"position_status": {
|
|
5
|
+
"type": "Property",
|
|
6
|
+
"value": "FINISHED"
|
|
7
|
+
},
|
|
8
|
+
"position_info": {
|
|
9
|
+
"type":"Property",
|
|
10
|
+
"value": [72, 368, 1]
|
|
11
|
+
},
|
|
12
|
+
"id":"urn:ngsi-ld:Robot:r2d2",
|
|
13
|
+
"type":"Robot"
|
|
14
|
+
}
|
|
21
15
|
]
|
|
@@ -5,17 +5,12 @@
|
|
|
5
5
|
"type": "Robot",
|
|
6
6
|
"position_status": {
|
|
7
7
|
"type": "Property",
|
|
8
|
-
"value":
|
|
9
|
-
|
|
10
|
-
"@value": "UNKNOWN"
|
|
11
|
-
}
|
|
8
|
+
"value": "UNKNOWN"
|
|
9
|
+
|
|
12
10
|
},
|
|
13
11
|
"position_info": {
|
|
14
12
|
"type": "Property",
|
|
15
|
-
"value":
|
|
16
|
-
"@type": "commandResult",
|
|
17
|
-
"@value": " "
|
|
18
|
-
}
|
|
13
|
+
"value": " "
|
|
19
14
|
}
|
|
20
15
|
}
|
|
21
|
-
]
|
|
16
|
+
]
|
|
@@ -9,17 +9,11 @@
|
|
|
9
9
|
},
|
|
10
10
|
"humidity": {
|
|
11
11
|
"type": "Property",
|
|
12
|
-
"value":
|
|
13
|
-
"@type": "Percentage",
|
|
14
|
-
"@value": "12"
|
|
15
|
-
}
|
|
12
|
+
"value": "12"
|
|
16
13
|
},
|
|
17
14
|
"weather": {
|
|
18
15
|
"type": "Property",
|
|
19
|
-
"value":
|
|
20
|
-
"@type": "Summary",
|
|
21
|
-
"@value": "Humidity 6 and pressure 20800"
|
|
22
|
-
}
|
|
16
|
+
"value": "Humidity 6 and pressure 20800"
|
|
23
17
|
}
|
|
24
18
|
}
|
|
25
19
|
]
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
"type": "WeatherStation",
|
|
6
6
|
"weather": {
|
|
7
7
|
"type": "Property",
|
|
8
|
-
"value":
|
|
9
|
-
"@type": "Summary",
|
|
10
|
-
"@value": "Humidity 6 and pressure 1040"
|
|
11
|
-
}
|
|
8
|
+
"value": "Humidity 6 and pressure 1040"
|
|
12
9
|
},
|
|
13
10
|
"pressure25": {
|
|
14
11
|
"type": "Property",
|
|
@@ -16,10 +13,7 @@
|
|
|
16
13
|
},
|
|
17
14
|
"humidity12": {
|
|
18
15
|
"type": "Property",
|
|
19
|
-
"value":
|
|
20
|
-
"@type": "Percentage",
|
|
21
|
-
"@value": "12"
|
|
22
|
-
}
|
|
16
|
+
"value": "12"
|
|
23
17
|
}
|
|
24
18
|
}
|
|
25
19
|
]
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
"type": "WeatherStation",
|
|
6
6
|
"weather": {
|
|
7
7
|
"type": "Property",
|
|
8
|
-
"value":
|
|
9
|
-
"@type": "Summary",
|
|
10
|
-
"@value": "Humidity 6 and pressure 1040"
|
|
11
|
-
}
|
|
8
|
+
"value": "Humidity 6 and pressure 1040"
|
|
12
9
|
},
|
|
13
10
|
"pressure25": {
|
|
14
11
|
"type": "Property",
|
|
@@ -16,17 +13,11 @@
|
|
|
16
13
|
},
|
|
17
14
|
"humidity12": {
|
|
18
15
|
"type": "Property",
|
|
19
|
-
"value":
|
|
20
|
-
"@type": "Percentage",
|
|
21
|
-
"@value": "12"
|
|
22
|
-
}
|
|
16
|
+
"value": "12"
|
|
23
17
|
},
|
|
24
18
|
"alive": {
|
|
25
19
|
"type": "Property",
|
|
26
|
-
"value":
|
|
27
|
-
"@type": "None",
|
|
28
|
-
"@value": "undefined"
|
|
29
|
-
}
|
|
20
|
+
"value": "undefined"
|
|
30
21
|
},
|
|
31
22
|
"updated": {
|
|
32
23
|
"type": "Property",
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
"type": "WeatherStation",
|
|
6
6
|
"pressure": {
|
|
7
7
|
"type": "Property",
|
|
8
|
-
"value":
|
|
9
|
-
"@type": "Hgmm",
|
|
10
|
-
"@value": "52"
|
|
11
|
-
}
|
|
8
|
+
"value": "52"
|
|
12
9
|
}
|
|
13
10
|
},
|
|
14
11
|
{
|
|
@@ -17,10 +14,7 @@
|
|
|
17
14
|
"type": "Higrometer",
|
|
18
15
|
"humidity": {
|
|
19
16
|
"type": "Property",
|
|
20
|
-
"value":
|
|
21
|
-
"@type": "Percentage",
|
|
22
|
-
"@value": "12"
|
|
23
|
-
}
|
|
17
|
+
"value": "12"
|
|
24
18
|
}
|
|
25
19
|
}
|
|
26
20
|
]
|
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
"id": "urn:ngsi-ld:WeatherStation:ws4",
|
|
5
5
|
"pressure": {
|
|
6
6
|
"type": "Property",
|
|
7
|
-
"value":
|
|
8
|
-
"@type": "Hgmm",
|
|
9
|
-
"@value": "52"
|
|
10
|
-
}
|
|
7
|
+
"value": "52"
|
|
11
8
|
},
|
|
12
9
|
"type": "WeatherStation"
|
|
13
10
|
},
|
|
@@ -15,10 +12,7 @@
|
|
|
15
12
|
"@context": "http://context.json-ld",
|
|
16
13
|
"humidity": {
|
|
17
14
|
"type": "Property",
|
|
18
|
-
"value":
|
|
19
|
-
"@type": "Percentage",
|
|
20
|
-
"@value": "12"
|
|
21
|
-
}
|
|
15
|
+
"value": "12"
|
|
22
16
|
},
|
|
23
17
|
"id": "urn:ngsi-ld:WeatherStation:Higro2000",
|
|
24
18
|
"type": "WeatherStation"
|
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
"id": "urn:ngsi-ld:WeatherStation:ws4",
|
|
5
5
|
"pressure": {
|
|
6
6
|
"type": "Property",
|
|
7
|
-
"value":
|
|
8
|
-
"@type": "Hgmm",
|
|
9
|
-
"@value": "52"
|
|
10
|
-
}
|
|
7
|
+
"value": "52"
|
|
11
8
|
},
|
|
12
9
|
"sn": {
|
|
13
10
|
"type": "Property",
|
|
@@ -19,10 +16,8 @@
|
|
|
19
16
|
"@context": "http://context.json-ld",
|
|
20
17
|
"humidity": {
|
|
21
18
|
"type": "Property",
|
|
22
|
-
"value":
|
|
23
|
-
|
|
24
|
-
"@value": "12"
|
|
25
|
-
}
|
|
19
|
+
"value": "12"
|
|
20
|
+
|
|
26
21
|
},
|
|
27
22
|
"id": "urn:ngsi-ld:WeatherStation:Station Number 50",
|
|
28
23
|
"type": "WeatherStation"
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
"type": "Higrometer",
|
|
6
6
|
"pressure": {
|
|
7
7
|
"type": "Property",
|
|
8
|
-
"value":
|
|
9
|
-
"@type": "Hgmm",
|
|
10
|
-
"@value": "17"
|
|
11
|
-
}
|
|
8
|
+
"value": "17"
|
|
12
9
|
}
|
|
13
10
|
},
|
|
14
11
|
{
|
|
@@ -17,10 +14,7 @@
|
|
|
17
14
|
"type": "Higrometer",
|
|
18
15
|
"pressure": {
|
|
19
16
|
"type": "Property",
|
|
20
|
-
"value":
|
|
21
|
-
"@type": "Hgmm",
|
|
22
|
-
"@value": "16"
|
|
23
|
-
}
|
|
17
|
+
"value": "16"
|
|
24
18
|
}
|
|
25
19
|
}
|
|
26
20
|
]
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
"type": "Higrometer",
|
|
6
6
|
"pressure": {
|
|
7
7
|
"type": "Property",
|
|
8
|
-
"value":
|
|
9
|
-
"@type": "Hgmm",
|
|
10
|
-
"@value": "17"
|
|
11
|
-
},
|
|
8
|
+
"value": "17",
|
|
12
9
|
"unitCode": "Hgmm"
|
|
13
10
|
}
|
|
14
11
|
},
|
|
@@ -18,10 +15,7 @@
|
|
|
18
15
|
"type": "Higrometer",
|
|
19
16
|
"pressure": {
|
|
20
17
|
"type": "Property",
|
|
21
|
-
"value":
|
|
22
|
-
"@type": "Hgmm",
|
|
23
|
-
"@value": "16"
|
|
24
|
-
}
|
|
18
|
+
"value": "16"
|
|
25
19
|
}
|
|
26
20
|
}
|
|
27
21
|
]
|
package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin1.json
CHANGED
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
"type": "WeatherStation",
|
|
6
6
|
"pressure": {
|
|
7
7
|
"type": "Property",
|
|
8
|
-
"value":
|
|
9
|
-
"@type": "Hgmm",
|
|
10
|
-
"@value": "52"
|
|
11
|
-
},
|
|
8
|
+
"value": "52",
|
|
12
9
|
"observedAt": "2016-05-30T16:25:22.304Z"
|
|
13
10
|
}
|
|
14
11
|
},
|
|
@@ -18,10 +15,7 @@
|
|
|
18
15
|
"type": "Higrometer",
|
|
19
16
|
"humidity": {
|
|
20
17
|
"type": "Property",
|
|
21
|
-
"value":
|
|
22
|
-
"@type": "Percentage",
|
|
23
|
-
"@value": "12"
|
|
24
|
-
},
|
|
18
|
+
"value": "12",
|
|
25
19
|
"observedAt": "2023-03-21T18:30:30.948Z"
|
|
26
20
|
}
|
|
27
21
|
}
|
package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin4.json
CHANGED
|
@@ -4,18 +4,12 @@
|
|
|
4
4
|
"PING_info": {
|
|
5
5
|
"observedAt": "2015-08-05T07:35:01.468Z",
|
|
6
6
|
"type": "Property",
|
|
7
|
-
"value":
|
|
8
|
-
"@type": "commandResult",
|
|
9
|
-
"@value": "1234567890"
|
|
10
|
-
}
|
|
7
|
+
"value": "1234567890"
|
|
11
8
|
},
|
|
12
9
|
"PING_status": {
|
|
13
10
|
"observedAt": "2015-08-05T07:35:01.468Z",
|
|
14
11
|
"type": "Property",
|
|
15
|
-
"value":
|
|
16
|
-
"@type": "commandStatus",
|
|
17
|
-
"@value": "OK"
|
|
18
|
-
}
|
|
12
|
+
"value": "OK"
|
|
19
13
|
},
|
|
20
14
|
"id": "urn:ngsi-ld:SensorCommand:sensorCommand",
|
|
21
15
|
"type": "SensorCommand"
|