Device Replace Functions

When a device replace request is received from the CMS, IDL calls the IDL Driver Instance (IDI) device replace callback function (OnDevReplace) that was registered during the init process.

The replace request from the CMS contains args. IDL passes it to the IDI replace callback as a stringified JSON.  In replace, args only contains unid. The IDI is expected to verify it.

On completion of verification, the IDI must call IdlDevreplaceResult() with the callback_index, pointer to IdlDev and the appropriate idlError (see Error Codes).

Device Replace Callback Function

OnDevReplace

IdlErrorCodes OnDevReplace(int callback_index, IdlDev *dev, char *args);

Device Replace Related Functions

IdlDevReplaceCallbackSet 

void IdlDevReplaceCallbackSet(Idl *idl, int (*OnDevReplace)(int, IdlDev *, char *));

IdlDevReplaceResult

void IdlDevReplaceResult(int callbackIndex, IdlDev *dev, int idlError);