iotagent-node-lib 4.7.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 +6 -3
- 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/CHANGES_NEXT_RELEASE +1 -0
- package/Changelog +793 -0
- package/doc/README.md +1 -0
- package/doc/admin.md +8 -4
- package/doc/api.md +8 -4
- package/doc/devel/northboundinteractions.md +122 -15
- package/doc/models/models.md +260 -0
- package/doc/requirements.txt +1 -1
- package/docker/Mosquitto/Dockerfile +1 -1
- package/lib/commonConfig.js +11 -2
- package/lib/fiware-iotagent-lib.js +15 -11
- package/lib/jexlTranformsMap.js +182 -35
- package/lib/model/Command.js +9 -0
- package/lib/model/Device.js +1 -0
- package/lib/services/commands/commandRegistryMongoDB.js +15 -1
- package/lib/services/commands/commandService.js +3 -3
- package/lib/services/common/domain.js +4 -3
- package/lib/services/devices/deviceRegistryMongoDB.js +1 -1
- package/lib/services/devices/deviceService.js +11 -2
- 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/contextServer-NGSI-v2.js +12 -3
- package/lib/services/northBound/contextServer.js +2 -1
- package/lib/services/northBound/northboundServer.js +2 -1
- package/lib/services/northBound/restUtils.js +6 -2
- package/lib/templates/createDevice.json +4 -0
- package/lib/templates/updateDevice.json +4 -0
- package/package.json +1 -1
- package/test/functional/config-test.js +1 -1
- package/test/functional/testUtils.js +13 -2
- package/test/unit/expressions/jexlExpression-test.js +165 -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/ngsiv2/ngsiService/subscriptions-test.js +0 -326
- /package/test/unit/ngsi-ld/examples/contextRequests/{updateContextLanguageProperties1.json → updateContextLanguageProperty.json} +0 -0
|
@@ -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"
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"@context": "http://context.json-ld",
|
|
4
|
+
"id": "urn:ngsi-ld:Light:ws1",
|
|
5
|
+
"type": "Light",
|
|
6
|
+
"consumption": {
|
|
7
|
+
"type": "Property",
|
|
8
|
+
"value": 1,
|
|
9
|
+
"valueType": "Number"
|
|
10
|
+
},
|
|
11
|
+
"alive": {
|
|
12
|
+
"type": "Property",
|
|
13
|
+
"value": "foo"
|
|
14
|
+
},
|
|
15
|
+
"updated": {
|
|
16
|
+
"type": "Property",
|
|
17
|
+
"value": false,
|
|
18
|
+
"valueType": "Boolean"
|
|
19
|
+
},
|
|
20
|
+
"manufacturer": {
|
|
21
|
+
"type": "Property",
|
|
22
|
+
"value": {
|
|
23
|
+
"hello": "world"
|
|
24
|
+
},
|
|
25
|
+
"valueType": "Object"
|
|
26
|
+
},
|
|
27
|
+
"revisions": {
|
|
28
|
+
"type": "Property",
|
|
29
|
+
"value": [
|
|
30
|
+
1,
|
|
31
|
+
2
|
|
32
|
+
],
|
|
33
|
+
"valueType": "Array"
|
|
34
|
+
},
|
|
35
|
+
"date": {
|
|
36
|
+
"type": "Property",
|
|
37
|
+
"value": "2025-07-18",
|
|
38
|
+
"valueType": "Date"
|
|
39
|
+
},
|
|
40
|
+
"time": {
|
|
41
|
+
"type": "Property",
|
|
42
|
+
"value": "14:22:11",
|
|
43
|
+
"valueType": "Time"
|
|
44
|
+
},
|
|
45
|
+
"datetime": {
|
|
46
|
+
"type": "Property",
|
|
47
|
+
"value": "2025-07-18T14:22:11.000Z",
|
|
48
|
+
"valueType": "DateTime"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"@context": "http://context.json-ld",
|
|
4
|
+
"id": "urn:ngsi-ld:Light:ws1",
|
|
5
|
+
"type": "Light",
|
|
6
|
+
"consumption": {
|
|
7
|
+
"type": "Property",
|
|
8
|
+
"value": {
|
|
9
|
+
"@type": "Number",
|
|
10
|
+
"@value": 1
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"alive": {
|
|
14
|
+
"type": "Property",
|
|
15
|
+
"value": "foo"
|
|
16
|
+
},
|
|
17
|
+
"updated": {
|
|
18
|
+
"type": "Property",
|
|
19
|
+
"value": {
|
|
20
|
+
"@type": "Boolean",
|
|
21
|
+
"@value": false
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"manufacturer": {
|
|
25
|
+
"type": "Property",
|
|
26
|
+
"value": {
|
|
27
|
+
"@type": "Object",
|
|
28
|
+
"@value": {
|
|
29
|
+
"hello": "world"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"revisions": {
|
|
34
|
+
"type": "Property",
|
|
35
|
+
"value": {
|
|
36
|
+
"@type": "Array",
|
|
37
|
+
"@value": [
|
|
38
|
+
1,
|
|
39
|
+
2
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"date": {
|
|
44
|
+
"type": "Property",
|
|
45
|
+
"value": {
|
|
46
|
+
"@type": "Date",
|
|
47
|
+
"@value": "2025-07-18"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"time": {
|
|
51
|
+
"type": "Property",
|
|
52
|
+
"value": {
|
|
53
|
+
"@type": "Time",
|
|
54
|
+
"@value": "14:22:11"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"datetime": {
|
|
58
|
+
"type": "Property",
|
|
59
|
+
"value": {
|
|
60
|
+
"@type": "DateTime",
|
|
61
|
+
"@value": "2025-07-18T14:22:11.000Z"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
@@ -4,17 +4,11 @@
|
|
|
4
4
|
"id": "urn:ngsi-ld:Light:light1",
|
|
5
5
|
"move_info": {
|
|
6
6
|
"type": "Property",
|
|
7
|
-
"value":
|
|
8
|
-
"@type": "commandResult",
|
|
9
|
-
"@value": " "
|
|
10
|
-
}
|
|
7
|
+
"value": " "
|
|
11
8
|
},
|
|
12
9
|
"move_status": {
|
|
13
10
|
"type": "Property",
|
|
14
|
-
"value":
|
|
15
|
-
"@type": "commandStatus",
|
|
16
|
-
"@value": "UNKNOWN"
|
|
17
|
-
}
|
|
11
|
+
"value": "UNKNOWN"
|
|
18
12
|
},
|
|
19
13
|
"type": "Light"
|
|
20
14
|
}
|
|
@@ -89,6 +89,7 @@ describe('NGSI-LD - Startup tests', function () {
|
|
|
89
89
|
process.env.IOTA_FALLBACK_PATH = 'smartgondor';
|
|
90
90
|
process.env.IOTA_LD_SUPPORT_NULL = 'false';
|
|
91
91
|
process.env.IOTA_LD_SUPPORT_DATASET_ID = 'false';
|
|
92
|
+
process.env.IOTA_LD_SUPPORT_DATA_TYPE = 'valueType';
|
|
92
93
|
|
|
93
94
|
nock.cleanAll();
|
|
94
95
|
|
|
@@ -125,6 +126,7 @@ describe('NGSI-LD - Startup tests', function () {
|
|
|
125
126
|
delete process.env.IOTA_FALLBACK_PATH;
|
|
126
127
|
delete process.env.IOTA_LD_SUPPORT_NULL;
|
|
127
128
|
delete process.env.IOTA_LD_SUPPORT_DATASET_ID;
|
|
129
|
+
delete process.env.IOTA_LD_SUPPORT_DATA_TYPE;
|
|
128
130
|
});
|
|
129
131
|
|
|
130
132
|
afterEach(function (done) {
|
|
@@ -155,6 +157,7 @@ describe('NGSI-LD - Startup tests', function () {
|
|
|
155
157
|
config.getConfig().mongodb.port.should.equal('5555');
|
|
156
158
|
config.getConfig().mongodb.db.should.equal('themongodb');
|
|
157
159
|
config.getConfig().mongodb.replicaSet.should.equal('customReplica');
|
|
160
|
+
config.getConfig().server.ldSupport.dataType.should.equal('valueType');
|
|
158
161
|
done();
|
|
159
162
|
});
|
|
160
163
|
});
|