I'd like to make a Cellular Modem ThingShape that has a property that determines whether the Thing is CDMA modem, or a GPRS modem,
1xRtt , EDGE, or LTE, etc.
Coming from my world in C#, I use enumerations all of the time, so I'd make a ModemType enumeration, with all possibile values. How do I define this in this system? Do I simply use an integer property and enforce the value in software?
I was thinking Tags, but that seems like more of a hack than a real solution, because you would still have to enforce the Tag's existence or validity in software somewhere.
Thoughts and ideas?
Jason
There's at least two ways you could store this information, and you hit both of them. You can store it as a property on the ThingShape. The value can be defaulted and it would be OK to store the STRING value instead of a integer (to translate later) as 'CDMA', 'GPRS', etc.
Wow this I an old one.
Ultimately we went with just using String properties with lots of validation and a security model that prevents direct writing of the properties so we could enforce correct values. It's not great, I still don't understand why we can't get definable enum type, system enforceable, but, that's just my opinion.