Interface Controller

All Superinterfaces:
Browsable, Extensible, Identifiable, Operable, OsidObject

public interface Controller extends OsidObject, Operable

A Controller is an addressable Operable that executes an action. Controllers are related to Devices through Inputs. A few typical controller modes are defined such as a toggle, a variable amount, and a set of discreet states. Other kinds of controllers may be defined in a ControllerRecord.

  • Method Details

    • getAddress

      String getAddress()
      Gets the controller address.
      Returns:
      the address
      Compliance:
      mandatory - This method must be implemented.
    • getModelId

      Id getModelId()
      Gets the controller model Id.
      Returns:
      the model Id
      Compliance:
      mandatory - This method must be implemented.
    • getModel

      Model getModel() throws OperationFailedException
      Gets the controller model.
      Returns:
      the model
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getVersion

      Version getVersion()
      Gets the controller version.
      Returns:
      the version
      Compliance:
      mandatory - This method must be implemented.
    • isToggleable

      boolean isToggleable()
      Tests if this controller can be turned on and off. A controller that may also be variable if the minimum and maximum settings correspond to ON and OFF. A controller that defines discreet states may also presnet itself as toggleable if there are ON and OFF states.
      Returns:
      true if this controller can be toggled, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • isVariable

      boolean isVariable()
      Tests if this controller supports levels between on and off. A variable controller may also be toggleable but does not define discreet states.
      Returns:
      true if this controller has levels, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • isVariableByPercentage

      boolean isVariableByPercentage()
      Tests if the levels represent a percentage.
      Returns:
      true if this controller has levels as a percentage, false otherwise
      Throws:
      IllegalStateException - isVariable() is false
      Compliance:
      mandatory - This method must be implemented.
    • getVariableMinimum

      BigDecimal getVariableMinimum()
      Gets the minimum level.
      Returns:
      the minimum level
      Throws:
      IllegalStateException - isVariable() is false
      Compliance:
      mandatory - This method must be implemented.
    • getVariableMaximum

      BigDecimal getVariableMaximum()
      Gets the maximum level.
      Returns:
      the maximum level
      Throws:
      IllegalStateException - isVariable() is false
      Compliance:
      mandatory - This method must be implemented.
    • getVariableIncrement

      BigDecimal getVariableIncrement()
      Gets the increments in the level.
      Returns:
      the increment
      Throws:
      IllegalStateException - isVariable() is false or isVariableByPercentage() is true
      Compliance:
      mandatory - This method must be implemented.
    • hasDiscreetStates

      boolean hasDiscreetStates()
      Tests if this controller supports discreet states. A state controller may also be toggleable but not variable.
      Returns:
      true if this controller has discreet states, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDiscreetStateIds

      IdList getDiscreetStateIds()
      Gets the discreet State Ids.
      Returns:
      a list of state Ids
      Throws:
      IllegalStateException - hasDiscreetStates() is false
      Compliance:
      mandatory - This method must be implemented.
    • getDiscreetStates

      StateList getDiscreetStates() throws OperationFailedException
      Gets the discreet States.
      Returns:
      a list of states
      Throws:
      IllegalStateException - hasDiscreetStates() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isRampable

      boolean isRampable()
      Tests if this controller supports a ramp rate for a transition from off to on.
      Returns:
      true if this controller supports ramp rates, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getControllerRecord

      ControllerRecord getControllerRecord(Type controllerRecordType) throws OperationFailedException
      Gets the controller record corresponding to the given Controller record Type. This method is used to retrieve an object implementing the requested record. The controllerRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(controllerRecordType) is true.
      Parameters:
      controllerRecordType - the type of controller record to retrieve
      Returns:
      the controller record
      Throws:
      NullArgumentException - controllerRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(controllerRecordType) is false
      Compliance:
      mandatory - This method must be implemented.