Function mon_get_monitoring

Function Documentation

ECAL_API int mon_get_monitoring(const char **mon_buf_, int *mon_buf_len_)

Get monitoring protobuf string.

Parameters
  • mon_buf_[out] Pointer to store the monitoring information.

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

Returns

Monitoring buffer length or zero if failed.

// let eCAL allocate memory for the monitoring buffer and return the pointer to 'buf'
const char* mon_buf_     = NULL;
int         mon_buf_len_ = 0;
mon_get_monitoring(subscriber_handle, &mon_buf_, &mon_buf_len_);
if(mon_buf_len_ > 0)
{
  ...
  // PROCESS THE BUFFER CONTENT HERE
  ...
  // finally free the allocated memory
  ecal_free_mem(((void*)rcv_buf););
}