Class Component

Direct Known Subclasses:
ButtonComponent, ButtonMatrixComponent, BuzzerComponent, HT16K33, HumiTempComponent, IrReceiverComponent, LcdDisplayComponent, LightSensorComponent, MAX7219, MCP23008, MFRC522, PirMotionSensorComponent, RelayComponent, ServoMotorComponent, SoundSensorComponent, StepMotorComponent, TiltSensorComponent, TouchSensorComponent, UltrasonicDistanceSensorComponent, VibrationMotorComponent

public abstract class Component extends Object
  • Field Details

    • logger

      protected final Logger logger
      Logger instance
  • Constructor Details

    • Component

      public Component()
  • Method Details

    • sleep

      protected void sleep(long milliseconds)
      Utility function to sleep for the specified amount of milliseconds. An InterruptedException will be catched and ignored while setting the interrupt flag again.
      milliseconds - Time in milliseconds to sleep
    • triggerSimpleEvent

      protected void triggerSimpleEvent(SimpleEventHandler handler)
      Utility function to trigger a simple event handler. If the handler is currently null it gets silently ignored.
      handler - Event handler to call or null