LitDev Extension API

LD3DView LDArray LDBits LDBlueTooth LDCall
LDChart LDClient LDClipboard LDColours LDCommPort
LDController LDControls LDCursors LDDataBase LDDateTime
LDDebug LDDialogs LDDictionary LDEffect LDEmail
LDEncryption LDEvents LDFastArray LDFastShapes LDFigures
LDFile LDFocus LDftp LDGraph LDGraphicsWindow
LDHID LDImage LDInline LDIOWarrior LDList
LDLogic LDMath LDMathX LDMatrix LDMusic
LDNetwork LDPhysics LDProcess LDQueue LDRegex
LDResources LDScrollBars LDSearch LDServer LDSettings
LDShapes LDShell LDSort LDSound LDSpeech
LDStatistics LDStopwatch LDText LDTextWindow LDTimer
LDTranslate LDUnits LDUtilities LDWaveForm LDWebCam
LDWindows LDxml LDZip

LDIOWarrior
Access IO-Warrior devices.
See http://www.codemercs.com/io-warrior/?L=1


Detatch GetName GetPID
GetReportSize GetSerialNumber GetSpecialReportSize
GetVersion GetVID Initialise
LastError LCDWrite Read
Timeout Write

Detatch()
Disconnect all IO-Warrior devices.

GetName(id)
Get the device name.
id The device number (indexed from 1).
returns The device name or "".

GetPID(id)
Get the device PID.
id The device number (indexed from 1).
returns The device PID (hex) or 0.

GetReportSize(id)
Get the report size.
Number of bytes in a Read/Write.
This the report size for channel 0.

id The device number (indexed from 1).
returns The report size or 0.

GetSerialNumber(id)
Get the device serial number.
id The device number (indexed from 1).
returns The device serial number or "".

GetSpecialReportSize(id)
Get the special report size.
Number of bytes in a special Read/Write.
This the report size for channel 1.

id The device number (indexed from 1).
returns The special report size or 0.

GetVersion(id)
Get the device firmware version.
id The device number (indexed from 1).
returns The device firmware version or 0.

GetVID()
Get the device VID (Common to all IOWarrior types).
returns The device VID (hex) or 0.

Initialise()
Initialise IO-Warrior devices.
returns The number of devices.

LastError()
Get the last system error message.
"" for no error (probably only useful for detailed error analysis of underlying system calls).

returns Last error number.

LCDWrite(id,text)
Write text to the LCD (untested).
id The device number (indexed from 1).
text The text to write.

Read(id,channel,blocking,count)
Read from the IO-Warrior device.
id The device number (indexed from 1).
channel The channel to read (indexed from 0).
blocking "True" (return after the state changes) or "False" (return with current state).
count The number of bytes to read (if zero, then the ReportSize is used if channel is 0 or SpecialReportSize if channel is 1).
See GetReportSize and GetSpecialReportSize.

returns An array of read bytes [0 to 255].

Timeout
The timeout for read and writes in ms.
Default 1000.


Write(id,channel,data)
Write to the IO-Warrior device.
id The device number (indexed from 1).
channel The channel to write to (indexed from 0).
data An array of bytes to send [0 to 255].
The array size should be ReportSize for channel 0 and SpecialReportSize for channel 1.
See GetReportSize and GetSpecialReportSize.

returns The number of bytes successfully written.