TSE Commander

This service allows dispatching commands to Test Support Equipment (TSE). The instrument must have a remote control interface (Serial, TCP/IP) and should support a text-based command protocol such as SCPI.

Class Name



This is a global service defined in etc/yamcs.yaml. Example from a typical deployment:

  - class: org.yamcs.tse.TseCommander

Configuration Options

Name Type Description
telnet map Required. Configure Telnet properties.
Example: { port: 8023 }
tc map Required. Configure properties of the TC link.
Example: { port: 8135 }
tm map Required. Configure properties of the TM link.
Example: { host: localhost, port: 31002 }

This service reads further configuration options from a file etc/tse.yaml. This file defines all the instruments that can be commanded. Example:

  - name: tenma
    class: org.yamcs.tse.SerialPortDriver
      path: /dev/tty.usbmodem14141
      # Note: this instrument does not terminate responses.
      # Use a very short timeout to compensate (still within spec)
      # responseTermination: "\n"
      responseTimeout: 100

  - name: simulator
    class: org.yamcs.tse.TcpIpDriver
      host: localhost
      port: 10023
      responseTermination: "\r\n"

  - name: rigol
    class: org.yamcs.tse.TcpIpDriver
      port: 5555
      responseTermination: "\n"

Mission Database

The definition of TSE string commands is done in XTCE space systems resorting under /TSE. The /TSE node is added by defining org.yamcs.xtce.TseLoader in the MDB loader tree. Example:

  - type: org.yamcs.xtce.TseLoader
      - type: sheet
        spec: mdb/tse/simulator.xls

The instrument name in etc/tse.yaml should match with the name of the a sub space system of /TSE.

The definition of commands and their arguments follows the same approach as non-TSE commands but with some particularities:

  • Each command should have either QUERY or COMMAND as its parent. These abstract commands are defined by the org.yamcs.xtce.TseLoader.

    • QUERY commands send a text command to the remote instrument and expect a text response. The argument assignments command and response must both be set to a string template that matches what the instrument expects and returns.

    • COMMAND commands send a text command to the remote instrument, but no response is expected (or it is simply ignored). Only the argument assignment command must be set to a string template matching what the instrument expects.

  • Each TSE command may define additional arguments needed for the specific command. In the definition of the command and response string templates you can refer to the value of these arguments by enclosing the argument name in angle brackets. Example: an argument n can be dynamically substituted in the string command by referring to it as <n>.

  • Additionally you can instruct Yamcs to extract one or more parameter values out of instrument response for a particular command by referring to the parameter name enclosed with backticks. This parameter should be defined in the same space system as the command and use the non-qualified name. The raw type of these parameters should be string.

To illustrate these concepts with an example, consider this query command defined in the space system /TSE/simulator:

Command name Parent Assignments Arguments
get_identification QUERY
  • command=*IDN?
  • response=`identification`

When issued, this command will send the string *IDN? to the instrument named simulator. A string response is expected and is read in its entirity as a value of the parameter /TSE/simulator/identification.

The next example shows the definition of a TSE command that uses a dynamic argument in both the command and the response string templates:

Command name Parent Assignments Arguments
get_battery_voltage QUERY
  • command=:BATTERY<n>:VOLTAGE?
  • response=`battery_voltage<n>`
n (range 1-3)

When issued with the argument 2, Yamcs will send the string :BATTERY2:VOLTAGE? to the remote instrument and read back the response into the parameter /TSE/simulator/battery_voltage2. In this simple case you could alternatively have defined three distinct commands without arguments (one for each battery).

Telnet Interface

For debugging purposes, this service starts a telnet server that allows to directly relay text-based commands to the configured instruments. This bypasses the TM/TC processing chain. Access this interface with an interactive TCP client such as telnet or netcat.

The server adds additional SCPI-like commands which allow to switch to any of the configured instruments in a single session. This is best explained via an example:

$ nc localhost 8023
:tse:instrument rigol
RIGOL TECHNOLOGIES,DS2302A,DS2D155201382,00.03.00
:tse:instrument tenma
:tse:output:mode hex

In this session we interacted with two different instruments (named rigol and tenma). The commands starting with :tse were directly interpreted by the TSE Commander, everything else was sent to the selected instrument.