cumulocity - Java Client extracting from Measurements -
how can extract measurements
- c8y_motionmeasurement
- c8y_analogmeasurement
- c8y_signalstrength
the attributes java client? example c8y_motionmeasurement content:
"c8y_motionmeasurement":{ "x":{ "unit":"m/s^2", "value":0.046882 }, "y":{ "unit":"m/s^2", "value":0.140647 }, "z":{ "unit":"m/s^2", "value":0.984529 } }
thanks
you can take @ device-capability-model project. includes lot of commonly used fragments. if fragments need exist can in java:
measurement m = ... // measurement c8y signalstrength s = m.get(c8y.signalstrength.class);
if fragment not exist in device-capability-model recommend creating class fragment in project. of course can handle map , fragment (as object) key.
m.get("c8y_signalstrength")
Comments
Post a Comment