This is historical information of device classes implemented in SerialLine2 device server.

Use this link to find the valid information.

Development status: New development
Information status: Updated

Contact:



Class Description


C++ source for the SerialClass

Families: Communication

Key words:

Platform: All Platforms

Language: Cpp

License:

Contact:

Hardware


Manufacturer: none

Bus: Serial Line

Class interface


Attributes:

Commands:

Name Description
StateInput: DevVoid
Output: State
State Code
This command gets the device state (stored in its <i>device_state</i> data member) and returns it to the caller.
StatusInput: DevVoid
Output: ConstDevString
Status description
This command gets the device status (stored in its <i>device_status</i> data member) and returns it to the caller.
DevSerWriteStringInput: DevString
String to write
Output: DevLong
Number of characters written
Write a string of characters to a serial line and return the number of characters written.
DevSerWriteCharInput: DevVarCharArray
Characters to write
Output: DevLong
Number of characters written
Write N characters to a seria line and return the number of characters written.
DevSerReadStringInput: DevLong
type of read SL_RAW SL_NCHAR SL_LINE
Output: DevString
String read
Win32 method : Read a string of characters, the type of read is specified in the input parameter SL_RAW SL_NCHAR SL_LINE
DevSerReadCharInput: DevLong
type of read SL_RAW SL_NCHAR SL_LINE
Output: DevVarCharArray
Array of characters read
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
WriteReadInput: DevVarLongStringArray
type of reading strategy(RAW,NCHAR..),command to write on the port com
Output: DevString
response of the device behind the serial line
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.
DevSerGetNCharInput: DevVoid
no argin
Output: DevLong
number of char available in receiving buffer
Return the number of chars available in receiving buffer
DevSerReadNCharInput: DevLong
number of the caracters to read on the serial line
Output: DevString
pointer to the string read updated
Read a string of N characters from the serial line If there are no characters to be read returns an empty string.
DevSerReadRawInput: DevVoid
no argin
Output: DevString
pointer to the string read updated
read a string from the serialline device in mode raw (no end of string expected, just empty the entire serialline receiving buffer).
DevSerReadLineInput: DevVoid
no argin
Output: DevString
pointer to the string read updated
read a string from the serialline device in mode line (up to and including the character specified by the NewLine property
DevSerFlushInput: DevLong
flush to do 0=input 1=output 2=both
Output: DevVoid
no argout
Win32 method : Flush serial line port according to argin passed.
DevSerSetParameterInput: DevVarLongArray
device parameters in pair
Output: DevVoid
no argout
Set serial line parameters
DevSerSetTimeoutInput: DevShort
Value of the timeout to set
Output: DevVoid
no argout
This command sets the new timeout (in ms).
DevSerSetParityInput: DevShort
The new parity to set.
Output: DevVoid
no argout
Sets the new parity of the serial line. NONE 0 ODD 1 EVEN 3
DevSerSetCharLengthInput: DevShort
The new charlength to set
Output: DevVoid
no argout
Sets the new charlength. 0 = 8 bits 1 = 7 bits 2 = 6 bits 3 = 5 bits
DevSerSetStopbitInput: DevShort
The new stopbit to set
Output: DevVoid
no argout
Sets the new stop bit. 0 = none 1 = one stop 2 = 1.5 stop bit
DevSerSetBaudrateInput: DevULong
The new baudrate to set
Output: DevVoid
no argout
Sets the new baudrateof the serial line ( up to 4 Mega). Default is 9600.
DevSerSetNewlineInput: DevShort
The new line character to set
Output: DevVoid
no argout
The new ending character in hexa. Default is 0x13 (=CR
DevSerReadRetryInput: DevLong
number of reading retries
Output: DevString
pointer to the string read updated
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.
DevSerReadNBinDataInput: DevLong
nb char to read
Output: DevVarCharArray
array of data
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.
DevSerWaitCharInput: DevVoid
Output: DevLong
Number of charcters in reading buffer
Command blocks until a char is available or the timeout expired. If the timeout value is 0 then the command returns immediately with the number of chars available if any or timeout error if no char available
DevSerSetParameterCompatInput: DevVarShortArray
Device parameters in pairs as a short array
Output: DevVoid
no argout
Set serial line parameters. The command is the same as DevSerSetParameters, but takes the parameters as a short array for compatibility with the old Taco interface.
DevSerFlushCompatInput: DevShort
flush to do 0=input 1=output 2=both
Output: DevVoid
Flush the serial line port according to argin passed. The command is the same as DevSerFlush but takes the input parameter as short value for compatibility with the old Taco interface.

Pipes:

Properties:

Name Description
SeriallineDevString The path and name of the serial line device to be used.
TimeoutDevShort The timout value im ms for for answers of requests send to the serial line. This value should be lower than the Tango client server timout value.
ParityDevString The parity used with the serial line protocol. The possibilities are none, even or odd.
CharlengthDevShort The character length used with the serial line protocol. The possibilities are 8, 7, 6 or 5 bits per character.
StopbitsDevShort The number of stop bits used with the serial line protocol. The possibilities are 1 or 2 stop bits
BaudrateDevLong The communication speed in baud used with the serial line protocol.
NewlineDevShort End of message Character used in particular by the DevSerReadLine command Default = 13
SimulatedDevBoolean If this property is true, do not connect to the serial port. It is used when another device simulated this one.
SimulatedDevBoolean If this property is true, do not connect to the serial port. It is used when another device simulated this one.

1 Feb 2022,
Updated:
The device class has been updated.
You can see previous version here .



26 Jan 2022,
Updated:
The device class has been updated.
You are looking at this version now.



25 Jan 2022,
Updated:
The device class has been updated.
You can see previous version here .



20 Jan 2022,
Updated:
The device class has been updated.
You can see previous version here .



20 Jan 2022,
Created:
The device class has been added to catalogue.
Added by:user67 on:26 Jan 2022, 6:47 a.m.