Class TrcPriorityIndicator.PatternState

java.lang.Object
trclib.driverio.TrcPriorityIndicator.PatternState
Enclosing class:
TrcPriorityIndicator<T>

private class TrcPriorityIndicator.PatternState extends Object
This class implements the pattern state. It contains the pattern and the state if the pattern is active or not.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) boolean
     
    (package private) double
     
    (package private) double
     
    (package private) boolean
     
    (package private) double
     
    (package private) final T
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PatternState(T pattern)
    Constructor: Create an instance of the object.
    PatternState(T pattern, boolean enabled, double onDuration, double offDuration)
    Constructor: Create an instance of the object.
  • Method Summary

    Modifier and Type
    Method
    Description
    This method returns the string representation of the LED pattern state.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • pattern

      final T pattern
    • enabled

      boolean enabled
    • onDuration

      double onDuration
    • offDuration

      double offDuration
    • on

      boolean on
    • expiredTime

      double expiredTime
  • Constructor Details

    • PatternState

      public PatternState(T pattern, boolean enabled, double onDuration, double offDuration)
      Constructor: Create an instance of the object.
      Parameters:
      pattern - specifies the pattern.
      enabled - specifies the initial state of the pattern.
      onDuration - specifies the time in seconds the pattern remains ON, zero to turn it ON indefinitely.
      offDuration - specifies the time in seconds the pattern remains OFF, then turn the LED back ON. Zero for disabling after onDuration expires.
    • PatternState

      public PatternState(T pattern)
      Constructor: Create an instance of the object.
      Parameters:
      pattern - specifies the indicator pattern.
  • Method Details

    • toString

      public String toString()
      This method returns the string representation of the LED pattern state.
      Overrides:
      toString in class Object
      Returns:
      string representation of the LED pattern state.