Package var.mom.mqtt.smarthome
Class Sensor
- java.lang.Object
-
- var.mom.mqtt.smarthome.Sensor
-
class Sensor extends java.lang.Object
client for the Smart Home application: sensor simulator- Author:
- Sandro Leuchter
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.String
clientId
unique name of client(package private) static java.lang.String
floor
floor where sensor is located(package private) static java.lang.String
room
room where sensor is located(package private) static java.lang.String
sensorType
type of sensor(package private) static java.lang.String
topic
topic to which this sensor publishes its observations
-
Constructor Summary
Constructors Constructor Description Sensor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
main routine and starting point of program
-
-
-
Field Detail
-
topic
static java.lang.String topic
topic to which this sensor publishes its observations
-
floor
static java.lang.String floor
floor where sensor is located
-
room
static java.lang.String room
room where sensor is located
-
sensorType
static java.lang.String sensorType
type of sensor
-
clientId
static java.lang.String clientId
unique name of client
-
-
Constructor Detail
-
Sensor
Sensor()
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws org.eclipse.paho.client.mqttv3.MqttException
main routine and starting point of program- Parameters:
args
- [0] floor where sensor is locatedargs
- [1] room where sensor is locatedargs
- [2] type of sensorargs
- [3] initial observation of sensor- Throws:
org.eclipse.paho.client.mqttv3.MqttException
- Paho library exceptions that have something to do with MQTT
-
-