Versions Compared

Key

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

A datapoint read can be issued because of periodic You can use a datapoint read callback function to respond to a datapoint read request from IDL to a custom driver.  A datapoint read request originates from an IAP/MQ datapoint read request to a custom driver.  The IAP/MQ datapoint read request may be a result of periodic polling, an on-demand get request from an IAP/MQ client, event-driven monitoring, or when polling the first datapoint of a device for first provisionprovisioning, a test action, or health checking. In all the cases, the DpRead callback function is called by the IDL that was registered during the custom driver init process.

Datapoint Read Callback Function

...


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

Must be called by the IDI 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 IDI 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:  prioArray is not used by the IDL currentlyIDL and is reserved for future use.  The IDI custom driver can send it as NULL.