-
Notifications
You must be signed in to change notification settings - Fork 90
[e2e testing] NGSI-LD #849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
055d343
4d30d69
f1d0201
03779ba
68b5f65
a732017
ff76dfe
3e02f3e
d8a64e3
637451d
73a350c
f525477
866d901
aab10c3
40875e3
caf1896
dd81751
a2b334a
ae20a71
00878fa
bd63653
1234ede
4ad7b8a
dfd0be0
8ea1221
b0943b2
93bf97b
c836260
b41a18a
41342e6
bebf658
2d849b0
44eb834
78c9f59
75467bb
603e024
64f0123
a027234
7d78950
11742cc
51cda9e
2594bc8
c70d9ed
ec47097
2de60eb
6f7a077
a5c650a
fd5c5d9
74e42ab
91235cd
cc42cb7
3cc3064
d32eedf
09e5b88
f863c19
c30d072
1a5aaae
1da050b
fa90072
3751368
9d5edb8
9428a5e
60b5292
5aa3a0b
03bb0fe
6cd5300
16455aa
7991863
3d72455
c0c9d0d
6605627
c6d0d9b
2f2caea
41bbe29
30edc54
283ac4b
448716b
82e1d30
e8cdfeb
845c220
3a90e27
cbf6cef
8399d52
b292f1c
accb670
104526f
9da6a10
263588b
cac4d5f
e099b84
24e08f5
a89d021
e5e0474
66a31ea
5c8a2df
8102bc7
1aedb33
4c1627f
56ca556
42294e3
4a18164
247d085
7040490
66242bd
b5a737e
59d40a4
ddd52ef
2b06ad4
ddb8cfe
21a657a
b023f95
4ed7426
53e46a2
c84ceb8
af4a350
8cd7834
a02a8e5
c715c32
8ebb49b
265351d
e487d17
9d65c09
9f2c8e4
13c5db3
bd172c0
4c9313a
0637bbd
1407de0
c31fbdc
b969f3e
80fef8e
ec539ca
4b57c17
b7d0e90
2c5e872
f248b89
7103039
55f6f71
ce29f81
603cea6
3f18176
930c5b8
ce3e3aa
0d25170
674830e
2ac3b07
f7f5a52
90b050b
ad2e658
7ba7363
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,50 @@ e.g.: | |
} | ||
``` | ||
|
||
#### NGSI-LD data and metadata considerations | ||
|
||
When provisioning devices for an NGSI-LD Context Broker, `type` values should typically correspond to one of the | ||
following: | ||
|
||
- `Property`, `Relationship`, `Geoproperty` | ||
- Native JSON types (e.g. `String`, `Boolean`, `Float` , `Integer` `Number`) | ||
- Temporal Properties (e.g. `Datetime`, `Date` , `Time`) | ||
- GeoJSON types (e.g `Point`, `LineString`, `Polygon`, `MultiPoint`, `MultiLineString`, `MultiPolygon`) | ||
|
||
Most NGSI-LD attributes are sent to the Context Broker as _properties_. If a GeoJSON type or native JSON type is | ||
defined, the data will be converted to the appropriate type. Temporal properties should always be expressed in UTC, | ||
using ISO 8601. This ISO 8601 conversion is applied automatically for the `observedAt` _property-of-a-property_ metadata | ||
where present. | ||
|
||
Data for any attribute defined as a _relationship_ must be a valid URN. | ||
|
||
Note that when the `unitCode` metadata attribute is supplied in the provisioning data under NGSI-LD, the standard | ||
`unitCode` _property-of-a-property_ `String` attribute is created. | ||
|
||
Other unrecognised `type` attributes will be passed as NGSI-LD data using the following JSON-LD format: | ||
|
||
```json | ||
"<property_name>": { | ||
"type" : "Property", | ||
"value": { | ||
"@type": "<property_type>", | ||
"@value": { string or object} | ||
} | ||
} | ||
``` | ||
|
||
`null` values will be passed in the following format: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you choose to pass null values in the following format, is it a requirement ? I cannot find this mentionned in the ngsi-ld specification. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a restriction based on the definitions of the ESTI NGSI-LD specification
and ...
so basically, you cannot store The attribute type is based on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (late reply) It's not clear to me, you say you cannot store There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think about passing a default value? as you use that only for numbers, 0 seems to be a correct choice. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
No that is precisely what I am attempting to do. Directly sending
But |
||
|
||
```json | ||
"<property_name>": { | ||
"type" : "Property", | ||
"value": { | ||
"@type": "Intangible", | ||
"@value": null | ||
} | ||
} | ||
``` | ||
|
||
### Data mapping plugins | ||
|
||
The IoT Agent Library provides a plugin mechanism in order to facilitate reusing code that makes small transformations | ||
|
@@ -166,8 +210,9 @@ events in the IoT Agent with the configured type name will be marked as events. | |
|
||
##### Timestamp Processing Plugin (timestampProcess) | ||
|
||
This plugin processes the entity attributes looking for a TimeInstant attribute. If one is found, the plugin add a | ||
TimeInstant attribute as metadata for every other attribute in the same request. | ||
This plugin processes the entity attributes looking for a `TimeInstant` attribute. If one is found, for NGSI-v1/NGSIv2, | ||
the plugin adds a `TimeInstant` attribute as metadata for every other attribute in the same request. With NGSI-LD, the | ||
Standard `observedAt` property-of-a-property is used instead. | ||
|
||
##### Expression Translation plugin (expressionTransformation) | ||
|
||
|
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have done a little refactor to the NGIS-LD entries in the CNR file.
The line "Lazy attributes" is mine but I guess is correct, as in #842 (comment) see Lazy Attribute checked.
@jason-fox is my understanding correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - Lazy Attributes are mapped to the forwarded GET
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thus, NTC (I guess)