Class org.bluemelon.bluesense.Device

Description

General Device base class, this class itself will normaly not be instantiated.

Method Index

new Device()
getDeviceId(), getMaster(), triggerEvent()

Constructor Detail

Device

function Device(master:Master, deviceId:Number, representsType:Number)

Constructs a new Device object and registers it to the master, this way the events for this device will be routed from the Master to this object.

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.
representsTypecontains the decimal form of the device type which will be filled by the respective device subclasses.

Method Detail

getMaster

function getMaster()

Return

returns the couples master object.

getDeviceId

function getDeviceId()

Return

returns the unique device identifier of this device.

triggerEvent

function triggerEvent()

Use this method to tell the device to resend all data. This is useful in case of switch or analogue inputs to retrigger all your events. You might want to use this after hooking (overriding) new event handlers to make your Flash movie initialize correctly.