Enum Class LoggedSignals.SignalLocation

java.lang.Object
java.lang.Enum<LoggedSignals.SignalLocation>
com.stuypulse.robot.util.LoggedSignals.SignalLocation
All Implemented Interfaces:
Serializable, Comparable<LoggedSignals.SignalLocation>, Constable
Enclosing class:
LoggedSignals

public static enum LoggedSignals.SignalLocation extends Enum<LoggedSignals.SignalLocation>

The CAN bus network that a group of signals is from

Each location maintains its own set of signals and a cached List used for BaseStatusSignal.refreshAll(List) calls

  • Enum Constant Details

  • Method Details

    • values

      public static LoggedSignals.SignalLocation[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LoggedSignals.SignalLocation valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getSignals

      public Set<com.ctre.phoenix6.BaseStatusSignal> getSignals()

      Gets the set of signals registered to this location

      Returns:
      the set of registered BaseStatusSignals
    • getSignalsList

      public List<com.ctre.phoenix6.BaseStatusSignal> getSignalsList()

      Gets the cached list of signals used for refreshAll calls

      Exists because BaseStatusSignal.refreshAll(com.ctre.phoenix6.BaseStatusSignal...) doesn't accept sets

      Returns:
      an immutable cache of the registered signals
    • register

      public void register(Set<com.ctre.phoenix6.BaseStatusSignal> signals)

      Adds signals to this location

      Parameters:
      signals - signals to register
    • deregister

      public void deregister(Set<com.ctre.phoenix6.BaseStatusSignal> signals)

      Removes signals from this location

      Parameters:
      signals - signals to deregister