Updated on 2022-03-13 GMT+08:00

HIAI_SetDataRecvFunctor

Sets the callback function for an engine in the graph to receive messages. This API is defined in c_graph.h.

Callback function type: typedef HIAI_StatusT (*HIAI_RecvDataCallbackT)(void*)

Syntax

HIAI_StatusT HIAI_SetDataRecvFunctor(HIAI_PortID_t targetPortConfig, HIAI_RecvDataCallbackT recvCallback)

Parameter Description

Parameter

Description

Value Range

targetPortConfig

Graph ID, engine ID, and port ID of the data receiver

-

recvCallback

Callback function for setting the mode of receiving the user-defined result

-

Return Value

For details about the returned error codes, see "Error Codes."

Error Codes

No.

Error Code

Description

1

HIAI_OK

The running is OK.

2

HIAI_PORT_ID_ERROR

The port ID has an error.