iotagent-node-lib 3.4.4 → 4.0.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/README.md +4 -0
- package/doc/admin.md +1 -13
- package/doc/api.md +116 -18
- package/doc/devel/architecture.md +0 -12
- package/doc/index.md +1 -1
- package/doc/roadmap.md +22 -10
- package/lib/commonConfig.js +0 -11
- package/lib/model/Device.js +2 -1
- package/lib/model/Group.js +2 -1
- package/lib/model/dbConn.js +22 -11
- package/lib/plugins/expressionPlugin.js +0 -5
- package/lib/plugins/jexlParser.js +15 -31
- package/lib/services/common/genericMiddleware.js +14 -2
- package/lib/services/common/iotManagerService.js +2 -1
- package/lib/services/devices/deviceRegistryMongoDB.js +3 -1
- package/lib/services/devices/deviceService.js +16 -21
- package/lib/services/devices/devices-NGSI-LD.js +5 -98
- package/lib/services/devices/devices-NGSI-mixed.js +0 -14
- package/lib/services/devices/devices-NGSI-v2.js +3 -0
- package/lib/services/groups/groupRegistryMemory.js +0 -25
- package/lib/services/groups/groupRegistryMongoDB.js +20 -19
- package/lib/services/groups/groupService.js +3 -14
- package/lib/services/ngsi/entities-NGSI-LD.js +81 -6
- package/lib/services/ngsi/entities-NGSI-v2.js +303 -698
- package/lib/services/ngsi/ngsiUtils.js +0 -30
- package/lib/services/northBound/deviceProvisioningServer.js +6 -3
- package/lib/templates/createDevice.json +4 -0
- package/lib/templates/createDeviceLax.json +4 -0
- package/lib/templates/deviceGroup.json +4 -0
- package/lib/templates/updateDevice.json +4 -0
- package/lib/templates/updateDeviceLax.json +4 -0
- package/package.json +6 -2
- package/test/functional/README.md +378 -0
- package/test/functional/config-test.js +70 -0
- package/test/functional/functional-tests-runner.js +126 -0
- package/test/functional/functional-tests.js +241 -0
- package/test/functional/testCases.js +2944 -0
- package/test/functional/testUtils.js +251 -0
- package/test/tools/utils.js +25 -0
- package/test/unit/mongodb/mongodb-connectionoptions-test.js +35 -22
- package/test/unit/ngsi-ld/examples/contextRequests/createProvisionedDeviceWithGroupAndStatic2.json +3 -34
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin6.json +8 -1
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin7.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin8.json +1 -6
- package/test/unit/ngsi-ld/general/contextBrokerOAuthSecurityAccess-test.js +67 -87
- package/test/unit/ngsi-ld/lazyAndCommands/command-test.js +7 -13
- package/test/unit/ngsi-ld/lazyAndCommands/merge-patch-test.js +43 -43
- package/test/unit/ngsi-ld/lazyAndCommands/polling-commands-test.js +19 -29
- package/test/unit/ngsi-ld/ngsiService/languageProperties-test.js +0 -1
- package/test/unit/ngsi-ld/ngsiService/subscriptions-test.js +35 -46
- package/test/unit/ngsi-ld/plugins/alias-plugin_test.js +8 -9
- package/test/unit/ngsi-ld/provisioning/device-provisioning-api_test.js +96 -221
- package/test/unit/ngsi-ld/provisioning/device-registration_test.js +18 -27
- package/test/unit/ngsi-ld/provisioning/device-update-registration_test.js +8 -16
- package/test/unit/ngsi-ld/provisioning/updateProvisionedDevices-test.js +0 -13
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAliasPlugin8.json +4 -4
- package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin29b.json +8 -0
- package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin30.json +1 -1
- package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin32.json +0 -6
- package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin34.json +8 -0
- package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin34b.json +14 -0
- package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin35.json +1 -11
- package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin36b.json +13 -0
- package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin37.json +8 -0
- package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin41.json +1 -11
- package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10b.json +37 -0
- package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin11.json +0 -4
- package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin15.json +0 -4
- package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin16.json +0 -4
- package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin25.json +4 -0
- package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin4.json +0 -3
- package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin5.json +10 -12
- package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin6.json +0 -4
- package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin7.json +1 -5
- package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin8.json +8 -12
- package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityTimestampPlugin2.json +0 -4
- package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityTimestampPlugin3.json +0 -8
- package/test/unit/ngsiv2/examples/contextRequests/updateContextStaticAttributesMetadata.json +7 -1
- package/test/unit/ngsiv2/expressions/jexlBasedTransformations-test.js +898 -28
- package/test/unit/ngsiv2/ngsiService/active-devices-test.js +0 -4
- package/test/unit/ngsiv2/ngsiService/staticAttributes-test.js +267 -0
- package/test/unit/ngsiv2/plugins/alias-plugin_test.js +19 -21
- package/test/unit/ngsiv2/plugins/multientity-plugin_test.js +21 -24
- package/test/unit/ngsiv2/provisioning/device-group-utils-test.js +1 -21
- package/test/unit/ngsiv2/provisioning/device-provisioning-api_test.js +4 -6
- package/test/unit/ngsi-ld/ngsiService/autocast-test.js +0 -438
- package/test/unit/ngsi-ld/ngsiService/geoproperties-test.js +0 -381
- package/test/unit/ngsi-ld/provisioning/singleConfigurationMode-test.js +0 -311
- package/test/unit/ngsiv2/ngsiService/autocast-test.js +0 -325
- package/test/unit/ngsiv2/ngsiService/geoproperties-test.js +0 -427
- package/test/unit/ngsiv2/plugins/compress-timestamp-plugin_test.js +0 -217
- package/test/unit/ngsiv2/plugins/timestamp-processing-plugin_test.js +0 -119
- package/test/unit/ngsiv2/provisioning/singleConfigurationMode-test.js +0 -309
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id":"gps1","type":"GPS",
|
|
3
|
-
"TimeInstant": {
|
|
4
|
-
"type": "DateTime",
|
|
5
|
-
"value": "2015-08-05T07:35:01.468+00:00"
|
|
6
|
-
},
|
|
7
3
|
"location": {
|
|
8
4
|
"value": {
|
|
9
5
|
"coordinates": [
|
|
@@ -12,12 +8,6 @@
|
|
|
12
8
|
],
|
|
13
9
|
"type": "Point"
|
|
14
10
|
},
|
|
15
|
-
"type": "geo:json"
|
|
16
|
-
"metadata": {
|
|
17
|
-
"TimeInstant": {
|
|
18
|
-
"type": "DateTime",
|
|
19
|
-
"value": "2015-08-05T07:35:01.468+00:00"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
11
|
+
"type": "geo:json"
|
|
22
12
|
}
|
|
23
13
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"actionType": "append",
|
|
3
|
+
"entities": [
|
|
4
|
+
{
|
|
5
|
+
"id": "ws9",
|
|
6
|
+
"type": "WeatherStation",
|
|
7
|
+
"st1": {
|
|
8
|
+
"value": 1,
|
|
9
|
+
"type": "Number"
|
|
10
|
+
},
|
|
11
|
+
"st2": {
|
|
12
|
+
"value": 2,
|
|
13
|
+
"type": "Number"
|
|
14
|
+
},
|
|
15
|
+
"vol": {
|
|
16
|
+
"type": "Number",
|
|
17
|
+
"value": 0
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"vol": {
|
|
22
|
+
"type": "Number",
|
|
23
|
+
"value": 100
|
|
24
|
+
},
|
|
25
|
+
"type": "WeatherStation",
|
|
26
|
+
"id": "WeatherStation1"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"vol": {
|
|
30
|
+
"type": "Number",
|
|
31
|
+
"value": 200
|
|
32
|
+
},
|
|
33
|
+
"type": "WeatherStation",
|
|
34
|
+
"id": "WeatherStation2"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"actionType": "append",
|
|
3
3
|
"entities": [
|
|
4
|
-
|
|
5
|
-
"type": "WeatherStation"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"id": "Higro2000",
|
|
9
|
-
"type": "Higrometer",
|
|
10
|
-
"pressure": {
|
|
11
|
-
"type": "Hgmm",
|
|
12
|
-
"value": "16"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
4
|
+
|
|
15
5
|
{
|
|
16
6
|
"id": "Higro2002",
|
|
17
7
|
"type": "Higrometer",
|
|
@@ -19,6 +9,14 @@
|
|
|
19
9
|
"type": "Hgmm",
|
|
20
10
|
"value": "17"
|
|
21
11
|
}
|
|
22
|
-
}
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "Higro2000",
|
|
15
|
+
"type": "Higrometer",
|
|
16
|
+
"pressure": {
|
|
17
|
+
"type": "Hgmm",
|
|
18
|
+
"value": "16"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
23
21
|
]
|
|
24
22
|
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"actionType": "append",
|
|
3
3
|
"entities": [
|
|
4
|
-
{
|
|
5
|
-
"id": "Sensor",
|
|
6
|
-
"type": "Sensor"
|
|
7
|
-
},
|
|
8
4
|
{
|
|
9
5
|
"vol": {
|
|
10
6
|
"type": "number",
|
|
@@ -17,7 +13,7 @@
|
|
|
17
13
|
"vol": {
|
|
18
14
|
"type": "number",
|
|
19
15
|
"value": "39"
|
|
20
|
-
},
|
|
16
|
+
},
|
|
21
17
|
"type": "WM",
|
|
22
18
|
"id": "SO2"
|
|
23
19
|
},
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"actionType": "append",
|
|
3
3
|
"entities": [
|
|
4
|
-
{
|
|
5
|
-
"id": "ws7",
|
|
6
|
-
"type": "WeatherStation"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"pressure": {
|
|
10
|
-
"type": "Hgmm",
|
|
11
|
-
"value": "16"
|
|
12
|
-
},
|
|
13
|
-
"type": "Higrometer",
|
|
14
|
-
"id": "Higro2000"
|
|
15
|
-
},
|
|
16
4
|
{
|
|
17
5
|
"pressure": {
|
|
18
6
|
"type": "Hgmm",
|
|
@@ -26,6 +14,14 @@
|
|
|
26
14
|
},
|
|
27
15
|
"type": "Higrometer",
|
|
28
16
|
"id": "Higro2002"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"pressure": {
|
|
20
|
+
"type": "Hgmm",
|
|
21
|
+
"value": "16"
|
|
22
|
+
},
|
|
23
|
+
"type": "Higrometer",
|
|
24
|
+
"id": "Higro2000"
|
|
29
25
|
}
|
|
30
26
|
]
|
|
31
27
|
}
|