SignalK / specification

Signal K is a JSON-based format for storing and sharing marine data from different sources (e.g. nmea 0183, 2000, seatalk, etc)
Other
92 stars 69 forks source link

clarification: are 'units' and 'description' required properties in 'metadata' #439

Closed bkp7 closed 6 years ago

bkp7 commented 6 years ago

The Documentation refers to Implicit Metadata. Does this mean that these 2 properties are always required within metadata? If not always, under what circumstances are they required?

timmathews commented 6 years ago

Yes, units and description are always required and the schema should reflect that. What I was trying to convey in that section of the documentation was that values for units and description would be pulled from the schema itself and that end users should not need to provide them when configuring their specific metadata (i.e. zones, min/max, custom labels, etc).

bkp7 commented 6 years ago

OK that makes sense for the all the numeric values which have units.

However some values are enums but still have metadata eg. propulsion.instance0.state. In this case I'm not convinced it should have a meta section at all? What would the units be?

Other values are strings and also have metadata eg. tanks.fuel.main.extinguishant and again what would be inserted for units?

timmathews commented 6 years ago

You're right it doesn't make a lot of sense for string and enum typed values. The docs could probably use a bit of clarification there. Docs should also be expanded to indicate that the possible enum values should be included in meta for enum typed values.