OSID Logo
OSID Specifications
control package
Version 3.0.0
Release Candidate Preview
Interfaceosid.control.Controller
Implementsosid.OsidObject
osid.Operable
Description

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.

MethodgetAddress
Description

Gets the controller address.

Returnstringthe address
CompliancemandatoryThis method must be implemented.
MethodgetModelId
Description

Gets the controller model Id.

Returnosid.id.Idthe model Id
CompliancemandatoryThis method must be implemented.
MethodgetModel
Description

Gets the controller model.

Returnosid.inventory.Modelthe model
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetVersion
Description

Gets the controller version.

Returnosid.installation.Versionthe version
CompliancemandatoryThis method must be implemented.
MethodisToggleable
Description

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.

Returnboolean true if this controller can be toggled, false otherwise
CompliancemandatoryThis method must be implemented.
MethodisVariable
Description

Tests if this controller supports levels between on and off. A variable controller may also be toggleable but does not define discreet states.

Returnboolean true if this controller has levels, false otherwise
CompliancemandatoryThis method must be implemented.
MethodisVariableByPercentage
Description

Tests if the levels represent a percentage.

Returnboolean true if this controller has levels as a percentage, false otherwise
ErrorsILLEGAL_STATE isVariable() is false
CompliancemandatoryThis method must be implemented.
MethodgetVariableMinimum
Description

Gets the minimum level.

Returndecimalthe minimum level
ErrorsILLEGAL_STATE isVariable() is false
CompliancemandatoryThis method must be implemented.
MethodgetVariableMaximum
Description

Gets the maximum level.

Returndecimalthe maximum level
ErrorsILLEGAL_STATE isVariable() is false
CompliancemandatoryThis method must be implemented.
MethodgetVariableIncrement
Description

Gets the increments in the level.

Returndecimalthe increment
ErrorsILLEGAL_STATE isVariable() is false or isVariableByPercentage() is true
CompliancemandatoryThis method must be implemented.
MethodhasDiscreetStates
Description

Tests if this controller supports discreet states. A state controller may also be toggleable but not variable.

Returnboolean true if this controller has discreet states, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetDiscreetStateIds
Description

Gets the discreet State Ids.

Returnosid.id.IdLista list of state Ids
ErrorsILLEGAL_STATE hasDiscreetStates() is false
CompliancemandatoryThis method must be implemented.
MethodgetDiscreetStates
Description

Gets the discreet States.

Returnosid.process.StateLista list of states
ErrorsILLEGAL_STATE hasDiscreetStates() is false
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodisRampable
Description

Tests if this controller supports a ramp rate for a transition from off to on.

Returnboolean true if this controller supports ramp rates, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetControllerRecord
Description

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 .

Parametersosid.type.TypecontrollerRecordTypethe type of controller record to retrieve
Returnosid.control.records.ControllerRecordthe controller record
ErrorsNULL_ARGUMENT controllerRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(controllerRecordType) is false
CompliancemandatoryThis method must be implemented.