Comments (7)
Thank you! I have contacted the data provider to see if they can modify their packets, but this will surely take time if they even will do this at all. I will contact the spec authors :)
from senml.
Thanks, @wmkamerman. Please keep us posted if we should update, it's really a simple task, as you mentioned.
from senml.
@dusanb94 I have an update from the spec authors. You are right: the example in the spec is wrong, and every record needs to have a value or a sum.
Thank you for your email and indeed finding an error in the example of the SenML specification.
During the standardization work in the CoRE WG we discussed for some time whether the first record could have "only base values" and eventually we concluded that the benefits of allowing that are smaller than the downsides. Hence the RFC says you must always have either value or sum. Seems that we missed to update one of the examples and we should file an errata on the RFC to make that clear.
We can close this issue - I will reach out to our data provider.
from senml.
This design is driven by the spec, Section 4.2:
Value: Value of the entry. Optional if a Sum value is present;
otherwise, it's required. Values are represented using basic data
types. This specification defines floating-point numbers ("v"
field for "Value"), booleans ("vb" for "Boolean Value"), strings
("vs" for "String Value"), and binary data ("vd" for "Data
Value"). Exactly one Value field MUST appear unless there is a
Sum field, in which case it is allowed to have no Value field.
The particular example from the spec, however, does not have any of the sum value
, base value
, or any of the value
fields. It looks to me that's the only such example.
from senml.
Hi @dusanb94, thank you for responding! If I understand you correctly, this particular example in the spec is incorrect? In that case I will have to contact the third party that is sending data to us.
Or would it be possible to allow a base Record without a Value using some flag?
from senml.
Hello, @wmkamerman, you're welcome. TBH, I can't be sure if the example is incorrect or the spec, but it looks like the example to me. Spec is very precise and this is the only example that does not meet requirements.
Or would it be possible to allow a base Record without a Value using some flag?
It would definitely be possible, but I would not like to do that because 1) the doc per se does not specify validation is configurable and 2) it looks to me that the spec is correct, it's just the example that isn't. Is it possible for the data provider to modify packets? Also, you can contact the original spec authors to check if the example is wrong, or I can write them an email.
from senml.
@wmkamerman Thanks for the explanation.
from senml.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from senml.