The CAT (computer-aided transceiver) protocol is a text-based system that allows for communication with radio equipment. This software allows for adjusting the oscillator frequencies and the transmit/receive state with a GUI (graphical user interface).
CAT uses the serial protocol in order to send the ASCII characters making up the text commands. This is then translated to universal asynchronous receiver/transmitter (UART) protocol using the FT232 module for the microcontroller, which is a daughtercard that interfaces with Subsystem C for my SDR project.
Similar to PyVISA, CAT works on a set and query system. The transmitter (the PC) sets and queries, while the tranceiver (the FLRTRX) performs the actions accociated with the sets and responds to queries. Values, such as the transmit/receive state, are set by including them after the two letter command, such as TX1; or TX0;. The state can be queried by not including any values and just terminating with a semicolon, such as TX;. As such, the FLRTRX needs to be able to
1. receive the incoming string;
2. parse the first two letters to determine the appropriate command;
3. perform the appropriate action (send a response for a query, perform the value change for a command).
One example: > = send by transmitter
>TX ;
TX0 ;
>TX1;
>TX ;
TX1 ;
Here, the transmitter is querying (TX;) the transmit/receive state of the receiver, which is currently in the receive state, denoted by TX0;. It then sets the receiver to transmit mode with TX1;. Following this, the transmitter queries (TX;) the receiver to confirm that it is indeed in the transmit mode (TX1;). Note that each statement must be terminated with a semicolon (;).