Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


IdlErrorCodes DpRead(int callback_index, IdlDev *dev, IdlDatapoint *dp, void *idlContext);
The

callback_index

is of no significance to the IDI. It must be passed as is back to the IDL when calling IdlDpReadResult

 is a callback identifier used by IDL.  The custom driver must pass it back to IDL when calling IdlDpReadResult.

dev is the IDL device object for the device containing the datapoint to read.  The custom driver must pass it back to IDL when calling IdlDpReadResult.

dp is the IDL datapoint object for the datapoint to read.  The custom driver must pass it back to IDL when calling IdlDpReadResult.

When a datapoint read is complete, IDI reports the result to the IDL using IdlDpReadResult.

Datapoint Read Related Functions

IdlDpReadCallbackSet


void IdlDpReadCallbackSet(Idl *idl, int (*DpRead)(int, IdlDev *, IdlDatapoint *, void *));

Must be called by the custom driver prior to calling IdlInit.

IdlDpReadResult


void IdlDpReadResult(int callbackIndex, IdlDev *dev, IdlDatapoint *dp, void *idlContext, int idlError, char *prioArray, double value);

Must be called by the custom driver at the end of the callback function before exiting.  

The actual value of the datapoint must be sent as a double value.

Note:  

callback_index is the callback identifier received in the DpRead callback.

dev is the IDL device object for the device received in the DpRead callback.

dp is the IDL datapoint object received in the DpRead callback.

idlError is an error code as described in Error Codes.

prioArray is not used by IDL and is reserved for future use.  The custom driver can send it as NULL.

value is the reported value for the datapoint.  The value of the datapoint must be returned as a double value.