Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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: defaultEntityNameConjunction config (env var IOTA_DEFAULT_ENTITY_NAME_CONJUNCTION) and configuration group API field for default entity_name conjunction (#944)
Add basic NGSI-LD support as experimental feature (#842)
- Active measures
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
@@ -1,57 +1,57 @@
[
{
"@context": "http://context.json-ld",
"attr_name": {
"type": "Property",
"value": " "
},
"bootstrapServer": {
"type": "Property",
"value": {
"@type": "Address",
"@value": "127.0.0.1"
}
},
"commandAttr_info": {
"type": "Property",
"value": {
"@type": "commandResult",
"@value": " "
}
},
"commandAttr_status": {
"type": "Property",
"value": {
"@type": "commandStatus",
"@value": "UNKNOWN"
}
},
"hardcodedAttr": {
"type": "Property",
"value": {
"@type": "hardcodedType",
"@value": "hardcodedValue"
}
},
"id": "urn:ngsi-ld:TheLightType:TheFirstLight",
"status": {
"type": "Property",
"value": true
},
"type": "TheLightType",
"wheel1_info": {
"type": "Property",
"value": {
"@type": "commandResult",
"@value": " "
}
},
"wheel1_status": {
"type": "Property",
"value": {
"@type": "commandStatus",
"@value": "UNKNOWN"
}
}
{
"@context": "http://context.json-ld",
"id": "urn:ngsi-ld:TheLightType:TheFirstLight",
"type": "TheLightType",
"attr_name": {
"type": "Property",
"value": null
},
"status": {
"type": "Property",
"value": false
},
"hardcodedAttr": {
"type": "Property",
"value": {
"@type": "hardcodedType",
"@value": "hardcodedValue"
}
},
"bootstrapServer": {
"type": "Property",
"value": {
"@type": "Address",
"@value": "127.0.0.1"
}
},
"commandAttr_status": {
"type": "Property",
"value": {
"@type": "commandStatus",
"@value": "UNKNOWN"
}
},
"commandAttr_info": {
"type": "Property",
"value": {
"@type": "commandResult",
"@value": " "
}
},
"wheel1_status": {
"type": "Property",
"value": {
"@type": "commandStatus",
"@value": "UNKNOWN"
}
},
"wheel1_info": {
"type": "Property",
"value": {
"@type": "commandResult",
"@value": " "
}
}
}
]
Loading