Graph::RegisterEventHandle
Subscribes to interested events. Currently, the host-device disconnection event is supported. When disconnection occurs, the user can receive this event and handle the disconnection logic (for example, waiting for stopping the main program) in the registered callback function. This API is defined in graph.h.
Syntax
HIAI_StatusT Graph::RegisterEventHandle(const HIAIEvent& event, const std::function<HIAI_StatusT(void)>&callBack)
Parameter Description
|
Parameter |
Description |
Value Range |
|---|---|---|
|
event |
Subscribed event |
typedef enum { HIAI_DEVICE_DISCONNECT_EVENT // Disconnection message }HIAIEvent; |
|
callBack |
Event callback function |
Callback function for user subscription |
Return Value
If the operation is successful, HIAI_OK is returned. Otherwise, a failure message is returned.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot