how to publish char* with UInt8MultiArray

asked 2020-05-22 02:29:57 -0500

typedef struct{ char* buffer; size_t length; }qxwz_rtcm;

void qxwz_rtcm_response_callback(qxwz_rtcm data) { std_msgs::UInt8MultiArray array;

memcpy(array.data,(uint8_t *)data.buffer,data.length);

}

error: cannot convert ‘std_msgs::UInt8MultiArray_<std::allocator<void> >::_data_type {aka std::vector<unsigned char="">}’ to ‘void’ for argument ‘1’ to ‘void memcpy(void, const void, size_t)’ memcpy(array.data,(uint8_t *)data.buffer,data.length);

edit retag flag offensive close merge delete