Class org.bluemelon.bluesense.SwitchInputDevice

Description

Class for communicating with a switch input device.

Method Index

new SwitchInputDevice()
requestNeedsBooleans(), requestNeedsClear(), requestNeedsCounter(), requestNeedsRotary()

Inherited from Device

Constructor Detail

SwitchInputDevice

function SwitchInputDevice(master:Master, deviceId:Number)

This constructor creates a new object for communicating with a switch input 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

requestNeedsBooleans

function requestNeedsBooleans(side:String, needed:Boolean)

Use this method to tell the input device that you want to receive boolean events for a certain side.

Parameters

sidecontains a string representation of the side of the board, valid are "A" and "B".
neededset to 0 to disable the reception of booleans or to 1 to enable the reception.

requestNeedsRotary

function requestNeedsRotary(side:String, group:Number, needed:Boolean)

Tell the input device to that you want to receive rotary change events for a certain input group.

Parameters

sidecontains a string representation of the side of the board, valid are "A" and "B".
neededset to 0 to disable the reception of this input or to 1 to enable the reception.

requestNeedsCounter

function requestNeedsCounter(side:String, gate:Number, needed:Boolean)

Tell the input device to that you want to receive counter change events for a certain input group.

Parameters

sidecontains a string representation of the side of the board, valid are "A" and "B".
gatecontains the input number, valid are 1 through 6.
neededset to 0 to disable the reception of this input or to 1 to enable the reception.

requestNeedsClear

function requestNeedsClear()

Use this method to disable all the reception of events, this is useful on initialization of a movie to then enable a few inputs to exactly what you want. This instead of disabling them one by one.