7.2.4 Adding data exchange procedures
While the device driver variables discussed in the chapters above specify the driver's interface to the other parts of the software, does the device driver procedure implement the interface to the device itself. Based on the communication protocol selected in the equipment setup (the protocol handles the low level coding of the data exchanged with the device), procedures handle the chats done between the MNC and the device to perform parameter settings or to gain some information from the device.
The description of the PROC statement in the following chapter together with the examples supplied with this manual explain the usage of procedures. Generally the following rules apply to device driver procedures:
- Procedures are executed by the driver in the same order as they are defined in the driver specification.
- The driver knows GET-type procedures which read some information from the device into one or more variables and PUT-type procedures which send settings to the device.
- A procedure may handle one or more parameters.
- The driver skips any procedures where actually nothing is to do. For example a PUT-type procedure is skipped unless at least one of the values handled by it has been changed by the operator.
- A variable which has it's data source in the device must be handled at exactly one GET-type procedure.
- A variable being a device setting must be handled at exactly one PUT-type procedure.