Home

RE04 Serial Line Adapter


Outline

The Serial Line Adapter allows to read streams from serial line. The received data is forwarded to a configurable reader. Scripts are used to send data to the serial line counterpart and activate the streaming environment (stimulation). The adapter can be combined with other adapters using a multi-adapter port.

Platforms:
32/64bit 32/64bit 32/64bit
Requirements:
  • None
Known limitations:
  • None
Status:
  • Stable
Operations:
  • Connect
  • Read
  • Sync
  • Stimulate
Parameters:
  • Enable: Enables/disables the port adapter.
  • Port: Select the system port as the input.
  • Baud-rate, Data-Bits, Stop-Bits, Parity: Serial line parameters.
  • Reader: Select the reader to parse the raw data stream.
  • Configuration: Optionally, a serialization configuration can be selected (depending on the reader).
  • Insert as root: If the adapter is included in a multi adapter port, the flag will force the adapter to add its signal hierarchy into the root of the combined record.
  • Write input to file: Select a file to log the input stream.
  • Synchronisation: Allows to define a script to do adapter synchronisation.
  • Stimulation: Allows to define a script to stimulate the connected serial port.


Video

Screen Cast: Using the Serial Port Adapter



Source Configuration

You may specify a file "Write input to file" to store the raw input for debugging purpose.



Serializer

Configure the serializer by selecting a reader and optionally a reader configuration (some reader require a configuration, e.g. the CSV reader).
You may use the buttons '+' and '...' to add and manage existing reader configurations (Preferences).
You may use the "Test Line Reader" (extracts lines from the raw input) and "Test Block Reader" (extract fixed size byte blocks) for debugging purpose.


Synchronization

Using a multi port adapter, you can combine an unlimited number of different input ports. The synchronization section of the adapters allows you to synchronize inputs with different domain bases (e.g. each input has its own time base). See 11 Synchronisation.


Stimulation

There may be cases where the device connected to the serial line need to be stimulated to make the source data available. In this case, enable the "Enable Script" check and extend the stimulation script according to your needs.

The script is executed after connecting (background thread).

	// serialPort: jssc.SerialPort
	// log: java.io.OutputStream,
	// out: java.io.OutputStream,
	//   out.write(0x10);
	// progress: progress control of type IPortProgress
	// console: console output of type MessageConsoleStream
	
	out.write(0x10);
	java.lang.Thread.sleep(100);
	out.write(0x15);