SignalK / SensESP

Universal Signal K sensor framework for the ESP32 platform
https://signalk.org/SensESP/
Apache License 2.0
151 stars 81 forks source link

Add sk_path to metadata structure #327

Open joelkoz opened 3 years ago

joelkoz commented 3 years ago

For SensESP v2.0: if we add sk_path as a member of SKMetadata we can combine two of the three parameters to the constructor of that class. We then start moving toward specifying sk_path not with a String, but with SKMetadata. We could even deprecate all versions of constructors that take sk_path as a String. What this would do is strongly type the sk_path as a complex Signal K definition, and not just any old String

ba58smith commented 3 years ago

Would it, though? (Strongly type the sk_path.) It's still going to be defined as a string (lowercase) within SKMetadata, isn't it? What's to prevent someone from just making up a path, same as they do now?

SKMetadata* metadata = new SKMetadata();
  metadata->sk_path_ = "whatever.i.feel.like";