com.cumulocity.model.environmental.measurement
Class SpeedMeasurement

java.lang.Object
  extended by 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

Field Summary
static String BEARING_UNITS
           
static String SPEED_UNITS
           
 
Constructor Summary
SpeedMeasurement()
           
SpeedMeasurement(MotionValue motion, SpeedValue speed, BearingValue bearing)
           
 
Method Summary
 BearingValue getBearing()
           
 MotionValue getMotion()
           
 SpeedValue getSpeed()
           
 Boolean isMotionDetected()
          Motion will be true if motionDetected value is not 0
 void setBearing(BearingValue bearing)
           
 void setMotion(MotionValue motion)
           
 void setSpeed(SpeedValue speed)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

SpeedMeasurement

public SpeedMeasurement()

SpeedMeasurement

public SpeedMeasurement(MotionValue motion,
                        SpeedValue speed,
                        BearingValue bearing)
Method Detail

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.