nthallen / monarch

Monarch Data Acquisition System
0 stars 1 forks source link

Document txsrvr configuration #177

Open nthallen opened 1 year ago

nthallen commented 1 year ago

txsrvr is used by SCoPEx for transmitting commands over the radio or via a relay, so currently the SCoPEx implementation is the only documentation on the subject. This should probably be a Wiki page and also go into the cmdgen HTML pages (at least).

nthallen commented 1 year ago

Gist:

%INTERFACE(Tx) <IFname>

Defines an interface, same as any other server interface, to which any transmitting commands are sent.

A transmitting command is any command that is derived from a non-terminal that starts with a carat (^).

On SCoPEx, this is implemented as:

&command
  : &^command
  ;

Then commands are assigned to either &command or &^command, depending on whether or not they should be transmitted. Quit is an example a command that probably should not be transmitted. Besides that, any command that specifically pertains to the user interface (i.e. on the ground), should not be transmitted.

There are then two types of command servers: srvr and txsrvr, distinguished by the suffix of the executable's name. The srvr servers handle the actual execution of all commands they receive and run on the flight computer. The txsrvr servers execute non-transmitting commands locally and send all the transmitting commands to the Tx interface.

To complete the link, transmitting and receiving processes needed to be written. On the ground side, a transmitting process needs to use a Cmd_reader to read from the Tx interface on the txsrvr and then transmit by whatever means or media allows. The receiving process receives commands from the matching media and then forwards them to the srvr via a Cmd_writer (or ci_sendcmd() et al.)

nthallen commented 1 year ago

Added to Wiki. Documention should still be added to cmdgen and appgen.