Class 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • 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 located
        args - [1] room where sensor is located
        args - [2] type of sensor
        args - [3] initial observation of sensor
        Throws:
        org.eclipse.paho.client.mqttv3.MqttException - Paho library exceptions that have something to do with MQTT