Interface Controller
- All Superinterfaces:
Browsable, Extensible, Identifiable, Operable, OsidObject
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 Summary
Modifier and TypeMethodDescriptionGets the controller address.getControllerRecord(Type controllerRecordType) Gets the controller record corresponding to the givenControllerrecordType.Gets the discreetStateIds.Gets the discreetStates.getModel()Gets the controller model.Gets the controller modelId.Gets the increments in the level.Gets the maximum level.Gets the minimum level.Gets the controller version.booleanTests if this controller supports discreet states.booleanTests if this controller supports a ramp rate for a transition from off to on.booleanTests if this controller can be turned on and off.booleanTests if this controller supports levels between on and off.booleanTests if the levels represent a percentage.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeModifier and TypeMethodDescriptionGets a list of properties.getPropertiesByRecordType(Type recordType) Gets a list of properties corresponding to the specified record type.Methods inherited from interface Extensible
getRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionGets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface Operable
isActive, isDisabled, isEnabled, isOperationalModifier and TypeMethodDescriptionbooleanisActive()Tests if this operable is active.booleanTests if this operable is administravely disabled.booleanTests if this operable is administravely enabled.booleanTests if thisOperableis operational.Methods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeModifier and TypeMethodDescriptionGets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.
-
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 modelId.- Returns:
- the model
Id - Compliance:
mandatory- This method must be implemented.
-
getModel
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:
trueif 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:
trueif this controller has levels, false otherwise- Compliance:
mandatory- This method must be implemented.
-
isVariableByPercentage
boolean isVariableByPercentage()Tests if the levels represent a percentage.- Returns:
trueif this controller has levels as a percentage, false otherwise- Throws:
IllegalStateException-isVariable()isfalse- Compliance:
mandatory- This method must be implemented.
-
getVariableMinimum
BigDecimal getVariableMinimum()Gets the minimum level.- Returns:
- the minimum level
- Throws:
IllegalStateException-isVariable()isfalse- Compliance:
mandatory- This method must be implemented.
-
getVariableMaximum
BigDecimal getVariableMaximum()Gets the maximum level.- Returns:
- the maximum level
- Throws:
IllegalStateException-isVariable()isfalse- Compliance:
mandatory- This method must be implemented.
-
getVariableIncrement
BigDecimal getVariableIncrement()Gets the increments in the level.- Returns:
- the increment
- Throws:
IllegalStateException-isVariable()isfalseorisVariableByPercentage()istrue- 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:
trueif this controller has discreet states, false otherwise- Compliance:
mandatory- This method must be implemented.
-
getDiscreetStateIds
IdList getDiscreetStateIds()Gets the discreetStateIds.- Returns:
- a list of state
Ids - Throws:
IllegalStateException-hasDiscreetStates()isfalse- Compliance:
mandatory- This method must be implemented.
-
getDiscreetStates
Gets the discreetStates.- Returns:
- a list of states
- Throws:
IllegalStateException-hasDiscreetStates()isfalseOperationFailedException- 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:
trueif this controller supports ramp rates, false otherwise- Compliance:
mandatory- This method must be implemented.
-
getControllerRecord
Gets the controller record corresponding to the givenControllerrecordType. This method is used to retrieve an object implementing the requested record. ThecontrollerRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(controllerRecordType)istrue.- Parameters:
controllerRecordType- the type of controller record to retrieve- Returns:
- the controller record
- Throws:
NullArgumentException-controllerRecordTypeisnullOperationFailedException- unable to complete requestUnsupportedException-hasRecordType(controllerRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-