public class SensorState extends Object
Constructor and Description |
---|
SensorState()
empty constructor for the Data transfer object
|
SensorState(Double temperature,
Double brightness,
String led,
Double threshold_temperature,
Double threshold_brightness)
Constructor for the Data transfer object
|
Modifier and Type | Method and Description |
---|---|
Double |
getBrightness() |
String |
getLed() |
Double |
getTemperature() |
Double |
getThresholdbrightness() |
Double |
getThresholdtemperature() |
void |
setBrightness(Double brightness) |
void |
setLed(String led) |
void |
setTemperature(Double temperature) |
void |
setThresholdbrightness(Double threshold_brightness) |
void |
setThresholdtemperature(Double threshold_temperature) |
SensorState |
unmarshalSensorState(BufferedReader dataset)
Alternative method responsible for deserializing the received
JSON-formatted L stage from sensor.
|
SensorState |
unmarshalSensorState(byte[] dataset)
Method responsible for deserializing the received byte array
representation of L from sensor.
|
public SensorState(Double temperature, Double brightness, String led, Double threshold_temperature, Double threshold_brightness)
public SensorState()
public Double getTemperature()
public void setTemperature(Double temperature)
temperature
- the temperature to setpublic Double getBrightness()
public void setBrightness(Double brightness)
brightness
- the brightness to setpublic String getLed()
public void setLed(String led)
led
- the led to setpublic Double getThresholdtemperature()
public void setThresholdtemperature(Double threshold_temperature)
threshold_temperature
- the threshold_temperature to setpublic Double getThresholdbrightness()
public void setThresholdbrightness(Double threshold_brightness)
threshold_brightness
- the threshold_brightness to setpublic SensorState unmarshalSensorState(BufferedReader dataset)
dataset
- the dataset to unmarshall incoming from sensor side in a JSON
formatpublic SensorState unmarshalSensorState(byte[] dataset) throws IOException, ClassNotFoundException
dataset
- the dataset to unmarshall incoming from sensor side as a byte
arrayIOException
ClassNotFoundException