rsc3/doc-schelp/HelpSource/Classes/LIDSlot.schelp

98 lines
No EOL
1.9 KiB
Text

TITLE:: LIDSlot
summary:: Handles incoming LID data.
categories:: Platform>Linux, External Control>HID
related:: Classes/LID
DESCRIPTION::
CLASSMETHODS::
private:: new, initClass
METHOD:: slotTypeStrings
An IdentityDictionary mapping the evtTypes to descriptive strings.
INSTANCEMETHODS::
private:: initSpec, init
METHOD:: postInfo
Post the slots properties in a nice, human readable way.
METHOD:: debug
Turn on or off the debug posting for this slot.
METHOD:: action
Set the action for this slot.
METHOD:: value
Get the current value of this slot, mapped according to its spec.
METHOD:: spec
The ControlSpec to map this slots value.
METHOD:: rawValue
Get the rawValue; the setter of this method is called from the primitive code::LID.prHandleEvent:: and should not be called by the user.
METHOD:: next
Convenience method to use a LIDSlot in a pattern; this will call the value of the slot.
METHOD:: createBus
Create a bus on the server. The slot's value will automatically be set to this bus on the server.
ARGUMENT:: server
The server on which to create the bus and forward the value to. By default this is code::Server.default::
METHOD:: bus
The bus on the server that this slot's value is mapped to.
METHOD:: freeBus
Free the bus on the server and remove the action to forward the value.
METHOD:: kr
JITLib support to access the bus in NodeProxy's. This will create the bus if it does not already exist.
METHOD:: device
The device to which this slot belongs.
METHOD:: type
The type of slot that this is.
METHOD:: code
The eventCode for this slot.
METHOD:: key
The key by which this slot is known in the spec of the device.
EXAMPLES::
code::
LID.findAvailable;
LID.postAvailable; // pick one that you want to open, and fill in the vendor and product id in the next line:
d = LID.open( 2, 10 ); // trackpoint
s.boot;
d.slot(2,1).createBus;
Ndef( \checkbus, { d.slot(2,1).kr.poll } );
d.slot(2,1).freeBus;
Ndef( \checkbus ).clear;
::