| Page 40 of 48 |
Appendix E. Writing data to DAP Devices
Appendix E.1. Background
The variables in a DAP device are not individually addressable. When a DAP device is read a data composite is returned and the driver extracts the required data. When data is written to a DAP device it is not possible to write a value to one individual data element such as a temperature setpoint. Rather, the DAP devices requires the complete data composite (all its variables, states, settings) be written at once. This makes the setting of a setpoint a complex operation for the driver.
It involves the following steps
a.Read the device, obtain a complete set of data and store (internally in the driver.).
b.Use this stored data to form the basis for a write. Modify the data with the data the user wishes to set.
c.Write the modified data composite back to the DAP device.
Thus to complete a 'write' operation successfully, the device must be read successfully. If the read has not been completed then the write operation will be abandoned. The driver prints messages to the error logs and records a NODE_OFFLINE stat under these circumstances.
Appendix E.2. Associated Map Descriptors
When writing to a DAP device it is possible to associate Map Descriptors using the DA_Assoc parameter. T his is straightforward using WRBC or RDBC. When using WRBX to trigger the writes on change, however, the function of the associated Map Descriptors must be passive if the upstream device block writes the data. The following diagram outlines the required strategy.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com Tel: (408)