hbUCPSetTaskDoneCb

int32_t hbUCPSetTaskDoneCb(hbUCPTaskHandle_t taskHandle, hbUCPTaskDoneCb taskDoneCb, void *userdata);

Register a callback function, this callback function is executed automatically after the task is completed.

  • Parameter

    • [in] taskHandle Task handle pointer.
    • [in] taskDoneCb Callback function pointer.
    • [in] userdata User-defined data.
  • Return Value

    • If the return value is 0, the callback function is registered successfully, otherwise the registration fails.
Note

This interface allows you to register a callback function that will be called to perform a user-defined function when the task is completed. If you don't need to customize the input, you can set userdata to nullptr.