Class org.bluemelon.bluesense.RelayOutputDevice

Description

Class for communicating with an open collector output device.

Method Index

new RelayOutputDevice()
requestSetOutput(), requestSetOutputs()

Inherited from Device

Constructor Detail

RelayOutputDevice

function RelayOutputDevice(master:Master, deviceId:Number)

This constructor creates a new object for communicating with an open collector output device.

Parameters

mastercontains a pointer to the master object, see Master.
deviceIdis the unique device identifier which you can find on the board or using the Master.requestDeviceTable method of the Master.

Method Detail

requestSetOutput

function requestSetOutput(side:String, gate:Number, state:Boolean)

Use this method if you want to change the state of a seperate output.

Parameters

gatecontains the output number, valid are 1 through 8.
statecontains a boolean, true will turn the output on, while false will turn it off.

requestSetOutputs

function requestSetOutputs(mask:Number, states:Number)

Use this method if you want to change the boolean state of a group of outputs.

Parameters

maskcontaining a 16-bit mask telling which outputs to change.
statescontaining a 16-bit value telling the new states of the outputs enable in the mask.