Function SimOneAPI::ReceiveRouteMessageCB

Function Documentation

bool SimOneAPI :: ReceiveRouteMessageCB ( void ( * cb ) ( int fromId , ESimOne_Client_Type fromType , int length , const void * pBuffer , int commandId ) )

节点通信数据接收API

Node communication data receiving API.

该函数用于注册回调,以从其他节点接收数据

This function is used to register a callback to receive data from other nodes.

参数 :
  • cb [in]

    回调函数,用于处理接收到的数据

    Callback function for handling received data.

  • fromId [out]

    发送方节点的ID

    ID of the sending node.

  • fromType [out]

    发送方节点的类型

    Type of the sending node.

  • length [out]

    接收到的数据长度

    Length of the received data.

  • pBuffer [out]

    接收到的数据缓冲区

    Buffer containing the received data.

  • commandId [out]

    命令ID(当前未使用)

    Command ID (not in use currently).

返回 :

成功返回true,失败返回false

Returns true if successful, false otherwise.