Package var.mom.mqtt.smarthome
Class AlarmSubscriber
- java.lang.Object
-
- var.mom.mqtt.smarthome.AlarmSubscriber
-
class AlarmSubscriber extends java.lang.Object
client for the Smart Home application: prints out alarm messages to the console if trigger condition in topic is detected- Author:
- Sandro Leuchter
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static double
threshold
trigger alarm if observation > threshold
-
Constructor Summary
Constructors Constructor Description AlarmSubscriber()
-
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: subscribes to topic Conf.TOPICSTART/args[0]/args[1]/args[2] i.e.
-
-
-
Field Detail
-
threshold
static double threshold
trigger alarm if observation > threshold
-
-
Constructor Detail
-
AlarmSubscriber
AlarmSubscriber()
-
-
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: subscribes to topic Conf.TOPICSTART/args[0]/args[1]/args[2] i.e. a specific sensor and prints messages to console if observation > threshold- Parameters:
args
- [0] floor where sensor is locatedargs
- [1] room where sensor is locatedargs
- [2] type of sensorargs
- [3] threshold- Throws:
org.eclipse.paho.client.mqttv3.MqttException
- Paho library exceptions that have something to do with MQTT
-
-