public class Sensor
extends java.lang.Object
Constructor and Description |
---|
Sensor(int i,
java.lang.String t,
int a,
int o,
int b,
java.lang.String d,
java.lang.String s,
java.lang.String u,
int st,
java.lang.Double c)
Creates a new Sensor
|
Modifier and Type | Method and Description |
---|---|
int |
getAddress()
Gets the address of the sensor
|
int |
getByteLength()
Gets the byte length of the sensor
|
java.lang.String |
getCalibValue()
Gets the calibrated value of the Sensor
|
java.lang.Double |
getCorrection()
Gets the correction factor of the sensor
|
java.lang.String |
getDescription()
Gets the description of the sensor
|
int |
getID()
Returns the ID of the sensor
|
int |
getOffset()
Gets the offset of the sensor
|
java.lang.Boolean |
getStore()
Gets the storage state of the sensor
|
java.lang.String |
getSystem()
Gets the system of the sensor
|
java.lang.String |
getTag()
Gets the Sensor Tag
|
java.lang.String |
getUnits()
Gets the units of the sensor
|
void |
setAddress(int i)
Sets the address of the sensor
|
void |
setByteLength(int i)
Sets the byte length of the sensor
|
void |
setCalibValue(java.lang.String v)
Sets the calibrated value of the Sensor
|
void |
setCorrection(java.lang.Double c)
Sets the correction factor of the sensor
|
void |
setDescription(java.lang.String s)
Sets the description of the sensor
|
void |
setID(int i)
Sets the ID of the sensor
|
void |
setOffset(int i)
Sets the offset of the sensor
|
void |
setStore(java.lang.Boolean b)
Sets whether or not to store the sensor data
|
void |
setSystem(java.lang.String s)
Sets the system of the sensor
|
void |
setTag(java.lang.String s)
Sets the sensor tag
|
void |
setUnits(java.lang.String s)
Sets the units of the sensor
|
public Sensor(int i, java.lang.String t, int a, int o, int b, java.lang.String d, java.lang.String s, java.lang.String u, int st, java.lang.Double c)
i
- The ID of the sensort
- The tag of the sensora
- The address of the sensor (the CAN address it's being sent over)o
- The byte offset from the addressb
- The byte length (number of bytes) of the sensor datad
- The description of the sensors
- The system of the sensoru
- The units of the sensorst
- 1 for storage into the DB 0 for notc
- The correction factor after the CAN read (decimals can't be sent over CAN so we must shift the value)public int getAddress()
public int getByteLength()
public java.lang.String getCalibValue()
public java.lang.Double getCorrection()
public java.lang.String getDescription()
public int getID()
public int getOffset()
public java.lang.Boolean getStore()
public java.lang.String getSystem()
public java.lang.String getTag()
public java.lang.String getUnits()
public void setAddress(int i)
i
- the address to setpublic void setByteLength(int i)
i
- the value to setpublic void setCalibValue(java.lang.String v)
v
- The to set for the Sensorpublic void setCorrection(java.lang.Double c)
c
- the value to setpublic void setDescription(java.lang.String s)
s
- the value to setpublic void setID(int i)
i
- the ID to setpublic void setOffset(int i)
i
- the value to setpublic void setStore(java.lang.Boolean b)
b
- true for store, false for notpublic void setSystem(java.lang.String s)
s
- the value to setpublic void setTag(java.lang.String s)
s
- the tag of the sensorpublic void setUnits(java.lang.String s)
s
- the value to set