diff --git a/docs/usermanual.md b/docs/usermanual.md index bd8c1f163..091ba450d 100644 --- a/docs/usermanual.md +++ b/docs/usermanual.md @@ -130,7 +130,15 @@ Examples of these `ngsiv2` payloads are the following ones: { "id": "MyEntityId1", "type": "MyEntityType1", - "attr1": { type: "Text", "value": "MyAttr1Value"}, + "attr1": { "type": "Text", "value": "MyAttr1Value"}, + "attr2": { "type": "Text", "value": "MyAttr1Value" + "metadata": { + "TimeInstant": { + "type": "DateTime", + "value": "2023-11-17T11:59:22.661Z" + } + } + } ... }, ... diff --git a/test/unit/ngsiv2/HTTP_receive_ngsiv2_measures-test.js b/test/unit/ngsiv2/HTTP_receive_ngsiv2_measures-test.js index 788dfd30b..bab21fbb4 100644 --- a/test/unit/ngsiv2/HTTP_receive_ngsiv2_measures-test.js +++ b/test/unit/ngsiv2/HTTP_receive_ngsiv2_measures-test.js @@ -88,7 +88,13 @@ describe('HTTP: NGSIv2 Measure reception ', function () { }, status: { type: 'Text', - value: 'connected' + value: 'connected', + metadata: { + TimeInstant: { + type: 'DateTime', + value: '2023-11-17T11:59:22.661Z' + } + } }, dateServiceStarted: { type: 'DateTime', @@ -178,7 +184,13 @@ describe('HTTP: NGSIv2 Measure reception ', function () { }, status: { type: 'Text', - value: 'connected' + value: 'connected', + metadata: { + TimeInstant: { + type: 'DateTime', + value: '2023-11-17T11:59:22.661Z' + } + } }, dateServiceStarted: { type: 'DateTime', @@ -223,7 +235,13 @@ describe('HTTP: NGSIv2 Measure reception ', function () { }, status: { type: 'Text', - value: 'connected' + value: 'connected', + metadata: { + TimeInstant: { + type: 'DateTime', + value: '2023-11-17T11:59:22.661Z' + } + } }, dateServiceStarted: { type: 'DateTime', @@ -316,7 +334,13 @@ describe('HTTP: NGSIv2 Measure reception ', function () { }, status: { type: 'Text', - value: 'connected' + value: 'connected', + metadata: { + TimeInstant: { + type: 'DateTime', + value: '2023-11-17T11:59:22.661Z' + } + } }, dateServiceStarted: { type: 'DateTime', @@ -400,7 +424,13 @@ describe('HTTP: NGSIv2 Measure reception ', function () { }, status: { type: 'Text', - value: 'connected' + value: 'connected', + metadata: { + TimeInstant: { + type: 'DateTime', + value: '2023-11-17T11:59:22.661Z' + } + } }, dateServiceStarted: { type: 'DateTime', @@ -445,7 +475,13 @@ describe('HTTP: NGSIv2 Measure reception ', function () { }, status: { type: 'Text', - value: 'connected' + value: 'connected', + metadata: { + TimeInstant: { + type: 'DateTime', + value: '2023-11-17T11:59:22.661Z' + } + } }, dateServiceStarted: { type: 'DateTime', diff --git a/test/unit/ngsiv2/MQTT_receive_ngsiv2_measures-test.js b/test/unit/ngsiv2/MQTT_receive_ngsiv2_measures-test.js index edd8414f8..afd8a7c6f 100644 --- a/test/unit/ngsiv2/MQTT_receive_ngsiv2_measures-test.js +++ b/test/unit/ngsiv2/MQTT_receive_ngsiv2_measures-test.js @@ -92,7 +92,13 @@ describe('MQTT: NGSIv2 Measure reception ', function () { }, status: { type: 'Text', - value: 'connected' + value: 'connected', + metadata: { + TimeInstant: { + type: 'DateTime', + value: '2023-11-17T11:59:22.661Z' + } + } }, dateServiceStarted: { type: 'DateTime', @@ -164,7 +170,13 @@ describe('MQTT: NGSIv2 Measure reception ', function () { }, status: { type: 'Text', - value: 'connected' + value: 'connected', + metadata: { + TimeInstant: { + type: 'DateTime', + value: '2023-11-17T11:59:22.661Z' + } + } }, dateServiceStarted: { type: 'DateTime', @@ -209,7 +221,13 @@ describe('MQTT: NGSIv2 Measure reception ', function () { }, status: { type: 'Text', - value: 'connected' + value: 'connected', + metadata: { + TimeInstant: { + type: 'DateTime', + value: '2023-11-17T11:59:22.661Z' + } + } }, dateServiceStarted: { type: 'DateTime', @@ -285,7 +303,13 @@ describe('MQTT: NGSIv2 Measure reception ', function () { }, status: { type: 'Text', - value: 'connected' + value: 'connected', + metadata: { + TimeInstant: { + type: 'DateTime', + value: '2023-11-17T11:59:22.661Z' + } + } }, dateServiceStarted: { type: 'DateTime', @@ -352,7 +376,13 @@ describe('MQTT: NGSIv2 Measure reception ', function () { }, status: { type: 'Text', - value: 'connected' + value: 'connected', + metadata: { + TimeInstant: { + type: 'DateTime', + value: '2023-11-17T11:59:22.661Z' + } + } }, dateServiceStarted: { type: 'DateTime', @@ -397,7 +427,13 @@ describe('MQTT: NGSIv2 Measure reception ', function () { }, status: { type: 'Text', - value: 'connected' + value: 'connected', + metadata: { + TimeInstant: { + type: 'DateTime', + value: '2023-11-17T11:59:22.661Z' + } + } }, dateServiceStarted: { type: 'DateTime', diff --git a/test/unit/ngsiv2/contextRequests/ngsiv2PayloadMeasure.json b/test/unit/ngsiv2/contextRequests/ngsiv2PayloadMeasure.json index e2e40697d..f86bd9076 100644 --- a/test/unit/ngsiv2/contextRequests/ngsiv2PayloadMeasure.json +++ b/test/unit/ngsiv2/contextRequests/ngsiv2PayloadMeasure.json @@ -11,7 +11,13 @@ }, "status": { "type": "Text", - "value": "connected" + "value": "connected", + "metadata": { + "TimeInstant": { + "type": "DateTime", + "value": "2023-11-17T11:59:22.661Z" + } + } }, "dateServiceStarted": { "type": "DateTime", diff --git a/test/unit/ngsiv2/contextRequests/ngsiv2PayloadMeasure2.json b/test/unit/ngsiv2/contextRequests/ngsiv2PayloadMeasure2.json index f7b68438b..4609d052c 100644 --- a/test/unit/ngsiv2/contextRequests/ngsiv2PayloadMeasure2.json +++ b/test/unit/ngsiv2/contextRequests/ngsiv2PayloadMeasure2.json @@ -11,7 +11,13 @@ }, "status": { "type": "Text", - "value": "connected" + "value": "connected", + "metadata": { + "TimeInstant": { + "type": "DateTime", + "value": "2023-11-17T11:59:22.661Z" + } + } }, "dateServiceStarted": { "type": "DateTime",