com.cumulocity.model.environmental.measurement
Class SpeedMeasurement
java.lang.Object
com.cumulocity.model.environmental.measurement.SpeedMeasurement
public class SpeedMeasurement
- extends Object
Provides a representation for a motion measurement, as reported by MotionSensor
.
See https://code.telcoassetmarketplace.com/devcommunity/index.php/c8ydocumentation/114/320#Motion for details.
- Author:
- ricardomarques
SPEED_UNITS
public static final String SPEED_UNITS
- See Also:
- Constant Field Values
BEARING_UNITS
public static final String BEARING_UNITS
- See Also:
- Constant Field Values
SpeedMeasurement
public SpeedMeasurement()
SpeedMeasurement
public SpeedMeasurement(MotionValue motion,
SpeedValue speed,
BearingValue bearing)
isMotionDetected
public Boolean isMotionDetected()
- Motion will be true if motionDetected value is not 0
- Returns:
getMotion
@JSONProperty(value="motionDetected",
ignoreIfNull=true)
public MotionValue getMotion()
- Returns:
- the motion, or null if no motion is set
setMotion
public void setMotion(MotionValue motion)
- Parameters:
motion
- the motion to set
getSpeed
@JSONProperty(value="speed",
ignoreIfNull=true)
public SpeedValue getSpeed()
- Returns:
- the speed, or null if speed is not set
setSpeed
public void setSpeed(SpeedValue speed)
- Parameters:
speed
- the speed to set
getBearing
@JSONProperty(value="bearing",
ignoreIfNull=true)
public BearingValue getBearing()
- Returns:
- the bearing, or null if the bearing is not set
setBearing
public void setBearing(BearingValue bearing)
- Parameters:
bearing
- the bearing to set
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2013 (C) Cumulocity GmbH. All Rights Reserved.