The primary function of a driver procedure is to acquire some information from the device (GET procedure) or to set one or more parameters from the data commanded somewhere else in the software (PUT procedure). The sat-nms device driver definition language provides four highly flexible statements for this purpose. They are:
Composes/formats s (readable) string from multiple elements which may be text fragments, numbers (formatted in various ways), tokens from a CHOICE variable and more. The composed string is packed in a protocol frame and sent to the device. PRINT is used with devices which implement a text based protocol. |
|
| INPUT | The INPUT statement complements the PRINT statement. It reads a message from the device, strips off the protocol frame parses the received data according to the rules specified with the INPUT statement. |
| WRITE | The WRITE statement is the equivalent to PRINT for devices providing a binary communication protocol. WRITE sets up a binary data structure from constant and variable values, packs this structure in a protocol frame and sends it to the device. |
| READ | Reading data from a device providing a binary communication protocol is done with the READ statement. As the counterpart of the WRITE statement it reads a message from the device, strips off the protocol frame and provides means to interpret the received data as a binary structure variables. |