Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Use null instead of ' ' as default attribute value in entity provisioned (#938)
Add basic NGSI-LD support as experimental feature (#842)
- Active measures
- GeoJSON and DateTime, unitCode and observedAt NGSI-LD support
Expand Down
3 changes: 2 additions & 1 deletion lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

const LOCATION_DEFAULT = '0, 0';
const DATETIME_DEFAULT = '1970-01-01T00:00:00.000Z';
const ATTRIBUTE_DEFAULT = ' ';
const ATTRIBUTE_DEFAULT = null;

/**
* Provides a default value for DateTime, GeoProperty and Property Attributes.
Expand Down Expand Up @@ -82,6 +82,7 @@ module.exports = {
MONGO_ALARM: 'MONGO-ALARM',
ORION_ALARM: 'ORION-ALARM',
IOTAM_ALARM: 'IOTAM-ALARM',

ATTRIBUTE_DEFAULT,
DATETIME_DEFAULT,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"name": "attr_name",
"type": "string",
"value": " "
"value": null
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"name": "attr_name",
"type": "string",
"value": " "
"value": null
},
{
"name": "hardcodedAttr",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"name": "attr_name",
"type": "string",
"value": " "
"value": null
},
{
"name": "hardcodedAttr",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
{
"name": "attr_name",
"type": "string",
"value": " "
"value": null
},
{
"name": "status",
"type": "Boolean",
"value": " "
"value": null
},
{
"name": "hardcodedAttr",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
{
"name": "attr_name",
"type": "string",
"value": " "
"value": null
},
{
"name": "status",
"type": "Boolean",
"value": " "
"value": null
},
{
"name": "hardcodedAttr",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
{
"name": "attr_name",
"type": "string",
"value": " "
"value": null
},
{
"name": "status",
"type": "Boolean",
"value": " "
"value": null
},
{
"name": "hardcodedAttr",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"name": "TimeInstant",
"type": "ISO8601",
"value": " "
"value": null
}
]
}
Expand Down
6 changes: 3 additions & 3 deletions test/unit/examples/contextRequests/updateContext5.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"attributes": [{
"name": "state",
"type": "Boolean",
"value": " "
"value": null
},
{
"name": "dimming",
"type": "Percentage",
"value": " "
"value": null
}
]
}],
"updateAction": "APPEND"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"name": "temperature",
"type": "centigrades",
"value": " "
"value": null
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"name": "temperature",
"type": "centigrades",
"value": " "
"value": null
},
{
"name": "move_status",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"name": "newAttribute",
"type": "Integer",
"value": " "
"value": null
},
{
"name": "cellID",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"name": "newAttribute",
"type": "Integer",
"value": " "
"value": null
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"name": "location",
"type": "geo:point",
"value": " "
"value": null
}
],
"id": "TheFirstLight",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"name": "TimeInstant",
"type": "ISO8601",
"value": " "
"value": null
}
],
"id": "eii01201ttt",
Expand All @@ -19,4 +19,4 @@
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"name": "temperature",
"type": "centigrades",
"value": " "
"value": null
},
{
"name": "move_status",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@context": "http://context.json-ld",
"attr_name": {
"type": "Property",
"value": " "
"value": null
},
"id": "urn:ngsi-ld:MicroLights:FirstMicroLight",
"type": "MicroLights"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@context": "http://context.json-ld",
"attr_name": {
"type": "Property",
"value": " "
"value": null
},
"commandAttr_info": {
"type": "Property",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@context": "http://context.json-ld",
"attr_name": {
"type": "Property",
"value": " "
"value": null
},
"commandAttr_info": {
"type": "Property",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@context": "http://context.json-ld",
"attr_name": {
"type": "Property",
"value": " "
"value": null
},
"bootstrapServer": {
"type": "Property",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@context": "http://context.json-ld",
"attr_name": {
"type": "Property",
"value": " "
"value": null
},
"bootstrapServer": {
"type": "Property",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "Property",
"value": {
"@type": "Percentage",
"@value": " "
"@value": null
}
},
"id": "urn:ngsi-ld:Light:light1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@context": "http://context.json-ld",
"attr_name": {
"type": "Property",
"value": " "
"value": null
},
"id": "urn:ngsi-ld:MicroLights:FirstMicroLight",
"type": "MicroLights"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "Property",
"value": {
"@type": "centigrades",
"@value": " "
"@value": null
}
},
"type": "Light"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"type": "Property",
"value": {
"@type": "centigrades",
"@value": " "
"@value": null
}
},
"type": "Light"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"type": "sensor",
"TimeInstant": {
"type": "ISO8601",
"value": " "
"value": null
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"type": "sensor",
"TimeInstant": {
"type": "ISO8601",
"value": " "
"value": null
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"type": "MicroLights",
"attr_name": {
"type": "string",
"value": " "
"value": null
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "TheLightType",
"attr_name": {
"type": "string",
"value": " "
"value": null
},
"hardcodedAttr": {
"type": "hardcodedType",
Expand All @@ -17,4 +17,4 @@
"type": "commandResult",
"value": " "
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type":"TheLightType",
"attr_name":{
"type": "string",
"value": " "
"value": null
},
"hardcodedAttr": {
"type": "hardcodedType",
Expand All @@ -17,4 +17,4 @@
"type": "commandResult",
"value": " "
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"type": "TheLightType",
"attr_name": {
"type": "string",
"value": " "
"value": null
},
"status": {
"type": "Boolean",
"value": " "
"value": null
},
"hardcodedAttr": {
"type": "hardcodedType",
Expand All @@ -33,4 +33,4 @@
"type": "commandResult",
"value": " "
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"type": "SensorMachine",
"attr_name": {
"type": "string",
"value": " "
"value": null
},
"status": {
"type": "Boolean",
"value": " "
"value": null
},
"hardcodedAttr": {
"type": "hardcodedType",
Expand All @@ -33,4 +33,4 @@
"type": "commandResult",
"value": " "
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"type": "Light",
"state": {
"type": "Boolean",
"value": " "
"value": null
},
"dimming": {
"type": "Percentage",
"value": " "
"value": null
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "MicroLights",
"attr_name": {
"type": "string",
"value": " "
"value": null
},
"bootstrapServer": {
"type": "Address",
Expand Down
Loading