Class MipIdentificationSensor

java.lang.Object
de.iip_ecosphere.platform.configuration.defaultLib.MipIdentificationSensor

public class MipIdentificationSensor extends Object
Support code for the MIP technology identification sensor. Sensor commands can be created and sent directly or scheduled using a timer and MipIdentificationSensor.MipTimerTask.
Author:
Holger Eichelberger, SSE
  • Field Details

  • Constructor Details

    • MipIdentificationSensor

      public MipIdentificationSensor()
  • Method Details

    • formatDate

      public static String formatDate(Date date)
      Formats a date in MIP style.
      Parameters:
      date - the date to be formatted
      Returns:
      the formatted date
    • createStartStopCommand

      public static iip.datatypes.MipMqttInput createStartStopCommand(boolean start, String sensorId)
      Creates a start/stop command for a MIP reader.
      Parameters:
      start - start/switch on the sensor if true, stop/switch off the sensor if false
      sensorId - the id of the sensor to send the data to
      Returns:
      the created command instance
    • sendStartStopCommand

      public static void sendStartStopCommand(boolean start, String sensorId, de.iip_ecosphere.platform.services.environment.DataIngestors<iip.datatypes.MipMqttInput> ingestors)
      Sends a start/stop command to an MIP reader. [convenience]
      Parameters:
      start - start/switch on the sensor if true, stop/switch off the sensor if false
      sensorId - the id of the sensor to send the data to
      ingestors - ingestors to send the command to