Streams and Protocols

In the stream connection pool, communication connections (called streams in the following) to external devices can be created. A protocol is assigned to each stream, via which the received data can be broken down into individual telegrams. In the Global-settings the streams and protocols can be edited via the button ‘Edit streamconnection pool’.

Stream Pool Settings

../_images/01_streampool_settings.png
  1. Stream List: List of streams in the stream pool. The parameters of the selected stream are displayed on the right side of the window.

  • +: Add stream to pool.

  • -: Delete selected stream.

  • +Copy: Add a copy of the selected stream to the pool.

  • Name: Change the name of the stream.

  • Com: open testdialog

  • send/rcv log: All received and sent data are logged in the “Gefasoft.MAK.Communication.ConStreamTelPool” logger.

  • add to statemenu: The Viper-main-menu displays the status of the stream pool.

  1. Stream Type: The following stream types are available in Viper.NET:

  • ConSerialPort: RS232 interface.

  • ConClientSocketUDP: UDP network connection.

  • ConClientSocket: Active TCP network connection (TCP client).

  • ConPassiveSocket: Passive TCP network connection (TCP server).

  • ConStreamTelFromOwner: Device that has a hardware stream interface and actsas a bridge, e.g.: Camera SVS-Vistek UART/RS232.

  1. Stream parameters: Settings of the stream.

  2. Protocon Type: The following protocols are available in Viper.NET:

  • ConProtDel: Telegrams are separated by a delimiter.

  • ConProtTLV: Telegrams with TLV header (Trumpf-Laser Tag+Length+Value).

  • ConProtTelLen: All telegrams have a fixed length.

  • ConProtNone: Data received in one piece is interpreted as a complete telegram without header or separator.

  • ConProtGData: Telegram with Gefasoft data header (12 bytes = 0xEFAFEFAF + 4 bytes data length + 4 bytes telegram ID).

  • ConProtISO: Telegram with ISO header (4 bytes = 2 byte telegram ID + 2 byte data length).

  • ConProtModbus: Telegram with Modbus-TCP header (8 bytes = 2 byte telegram ID + 2 byte protocol ID + 2 byte data length + 1 byte unit ID + 1 byte function code).

  1. Protocol parameters: Protocol settings.

  2. Cancel: Discard changes to the stream and log.

  3. Apply: Apply changes to stream and protocol and start stream.

  4. Reload: Reload the stream pool XML file.

  5. Save: Save the stream pool in the XML file.

  6. OK: Apply unsaved changes and close window.

  7. Apply: Apply unsaved changes.

  8. Cancel: Discard unsaved changes and close window.

Stream Pool List

../_images/02_streampool.png
  1. Stream pool state: If ‘add to statemenu’ is selected in the pool settings, the state of the pool is displayed in the main Viper menu.

  2. Pool Stream List: List of all streams in the pool. The background color indicates the status of the stream.

  • Gray: Stream not started.

  • Green: Connection established.

  • Salmon: Connection closed.

  • Red: Error starting the connection.

  1. Settings: Opens the Pool Settings.

Stream Test Dialog

../_images/03_stream_testform.png
  1. Special characters: clicking a button appends the respective special characters to the send window (’5’).

  • \r\n: Line break : [0x0D][0x0A]

  • >: Command prompt : [0x3E]

  • STX: Text Start : [0x02]

  • ETX: Text End : [0x03]

  1. Stream description: Description of the stream.

  2. Init/Exit con: Start or stop stream.

  3. Connection: Connection status of the stream.

  4. Send Text: Input window for the data that will be sent by clicking on (7) ‘Send’.

  5. Send Text mode:

  • Send \r\n: Transmit manual line breaks of the multiline send-window when sending data

  • ASCII: Text in the send window is an ASCII text. Special characters can be entered in the format [0xFF].

  • HEX: Text in the send window is in hexadecimal format.

  1. Send: Transmit data in the send window.

  2. Send Data: Log of the sent data. The list is cleared by clicking on ‘Clear’.

  3. Received Data: Log der empfangenen Daten. Die Liste wird durch Klick auf ‘Clear’ abgelöscht.

  4. SentRcvd: Displays the counts of telegrams received and sent since the test window was opened.

  5. Follow Tail: Automatically scroll send/receive list.

  6. Automatic word wrapping: Add a new entry to the send or receive list at each line break in the data.