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.

Parameters
  • handle_ – Subscriber handle.

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

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

  • rcv_time_[out] Time from publisher in us.

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

Returns

Length of received buffer.