Function sub_receive

Function Documentation

ECAL_API int sub_receive(ECAL_HANDLE handle_, const char **rcv_buf_, int *rcv_buf_len_, long long *rcv_time_, const int timeout_)

Receive a message from the publisher.


Length of received buffer.

  • handle_: Subscriber handle.

  • [out] rcv_buf_: Buffer to store the received message content.

  • [out] rcv_buf_len_: Length of allocated buffer, eCAL is allocating the buffer for you, use ecal_free_mem to free the buffer finally.

  • [out] rcv_time_: Time from publisher in us.

  • timeout_: Maximum time before receive operation returns (in milliseconds, -1 means infinite).