iotagent-node-lib
iotagent-node-lib copied to clipboard
timesinstant setting should allow distinguish between attribute and metadata TimeInstant
Currently, we have a timeinstant boolean setting to include TimeInstant information or not in entities updates on the CB.
This setting can be configured at different levels (IOTA-wide, service or device) but it always affects to both the TimeInstant attribute and TimeInstant metadata. In other words, or both TimeInstant attribute and metadata are included or none of them is included, but mixed cases (e.g. include the TimeInstant attribute but not the TimeInstant metadata) are not possible.
So, some ideas:
- "Split" the setting semantics in two. A new setting can be used to control metadatas (e.g.
timeinstantMd), reducing the scope of existingtimeinstantto the attribute. - Keep
timeinstantfield at root level in the JSON to mean the attribute, use a separatetimeinstantfield in the attribute mapping items to mean the specific metadata for that attribute. This is more flexible than the other in some cases, but in needs repeattimeinstantin the provision for each attribute. - Combine both. Somehow :)
(A small backward compatibility break would take place if we redefine timesinstant semantic, but it is not a widely used setting)