Graph::SendData
Sends void data from an external system to a specified port on the Matrix. This API is defined in graph.h.

The SendData interface uses the DMA transfer mode, which may affect the CPU's timely response to and processing of interrupt requests, for example, memory allocation by calling the new or malloc function.
Syntax
HIAI_StatusT Graph::SendData(const EnginePortID& targetPortConfig, const std::string& messageName, const std::shared_ptr<void>& dataPtr, const uint32_t timeOut = 500)
Parameter Description
Parameter |
Description |
Value Range |
---|---|---|
targetPortConfig |
Graph ID, engine ID, and port ID of the data receiver |
- |
messageName |
Name of a message |
- |
dataPtr |
Pointer to a message |
- |
timeOut |
Timeout for calling this API to send data. The default timeout is 500 ms. If data sending times out, the system background attempts to send data again. A maximum of 16 attempts are allowed. |
- |
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_GRAPH_ENGINE_NOT_EXIST |
The engine does not exist. |
3 |
HIAI_GRAPH_NOT_EXIST |
The graph does not exist. |
4 |
HIAI_GRAPH_NO_USEFUL_MEMORY |
There is no useful memory. |
5 |
HIAI_GRAPH_SENDMSG_FAILED |
The HDC module fails to send a message. |
6 |
HIAI_GRAPH_INVALID_VALUE |
The graph has an invalid value. |
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