Serial Class Commands
Name
Input type
Output type
Level
Description
State DEV_VOID DEV_STATE OPERATOR This command gets the device state (stored in its device_state data member) and returns it to the caller.
Status DEV_VOID CONST_DEV_STRING OPERATOR This command gets the device status (stored in its device_status data member) and returns it to the caller.
DevSerWriteString DEV_STRING DEV_LONG OPERATOR Write a string of characters to a serial line and return
the number of characters written.
DevSerWriteChar DEVVAR_CHARARRAY DEV_LONG OPERATOR Write N characters to a seria line and return the
number of characters written.
DevSerReadString DEV_LONG DEV_STRING OPERATOR Win32 method :
Read a string of characters, the type of read is specified in the
input parameter SL_RAW SL_NCHAR SL_LINE
DevSerReadChar DEV_LONG DEVVAR_CHARARRAY OPERATOR Win32 method :
Read an array of characters, the type of read is specified in the
input parameter, it can be SL_RAW SL_NCHAR SL_LINE
WriteRead DEVVAR_LONGSTRINGARRAY DEV_STRING OPERATOR This method permit to send a request to a device throw the serial line and returns the
response of the device.
The commands write and read don`t return until they have not finished.
DevSerGetNChar DEV_VOID DEV_LONG OPERATOR Return the number of chars available in receiving buffer
DevSerReadNChar DEV_LONG DEV_STRING OPERATOR Read a string of N characters from the serial line
If there are no characters to be read returns an empty string.
DevSerReadRaw DEV_VOID DEV_STRING OPERATOR read a string from the serialline device in mode raw (no end
of string expected, just empty the entire serialline receiving buffer).
DevSerReadLine DEV_VOID DEV_STRING OPERATOR read a string from the serialline device in mode line (up to
and including the character specified by the NewLine property
DevSerFlush DEV_LONG DEV_VOID OPERATOR Win32 method :
Flush serial line port according to argin passed.
DevSerSetParameter DEVVAR_LONGARRAY DEV_VOID OPERATOR Set serial line parameters
DevSerSetTimeout DEV_SHORT DEV_VOID OPERATOR This command sets the new timeout (in ms).
DevSerSetParity DEV_SHORT DEV_VOID OPERATOR Sets the new parity of the serial line.
NONE 0
ODD 1
EVEN 3
DevSerSetCharLength DEV_SHORT DEV_VOID OPERATOR Sets the new charlength.
0 = 8 bits
1 = 7 bits
2 = 6 bits
3 = 5 bits
DevSerSetStopbit DEV_SHORT DEV_VOID OPERATOR Sets the new stop bit.
0 = none
1 = one stop
2 = 1.5 stop bit
DevSerSetBaudrate DEV_ULONG DEV_VOID OPERATOR Sets the new baudrateof the serial line ( up to 4 Mega).
Default is 9600.
DevSerSetNewline DEV_SHORT DEV_VOID OPERATOR The new ending character in hexa.
Default is 0x13 (=CR
DevSerReadRetry DEV_LONG DEV_STRING OPERATOR read a string from the serialline device in mode raw (no end
of string expected, just empty the entire serialline receiving buffer).
If read successfull, read again "nretry" times.
DevSerReadNBinData DEV_LONG DEVVAR_CHARARRAY OPERATOR Read the specified number of char from the serial line.
If the number of caracters is greater than caracters avaiable, this command returns
all caracters avaiables.
If there are no characters to be read returns an empty array.