Class HighVoltageSensor

    • Constructor Summary

      Constructors 
      Constructor Description
      HighVoltageSensor​(VoltageSensor voltageSensor, double threshold)
      Triggers when the voltage exceeds a threshold
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isTriggered()
      Determines if the voltage is greater or equal to the threshold
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HighVoltageSensor

        public HighVoltageSensor​(VoltageSensor voltageSensor,
                                 double threshold)
        Triggers when the voltage exceeds a threshold
        Parameters:
        voltageSensor - A voltage sensor
        threshold - A threshold to trigger in Volts.
    • Method Detail

      • isTriggered

        public boolean isTriggered()
        Determines if the voltage is greater or equal to the threshold
        Returns:
        true if the switch is triggered, false otherwise