convert the message in the reporter
This commit is contained in:
		| @@ -57,10 +57,15 @@ bool AircraftReporter::deinitialize() { | ||||
|     return true; | ||||
| } | ||||
|  | ||||
| bool AircraftReporter::send(zmq::message_t& message) { | ||||
| bool AircraftReporter::send(const aman::AircraftReport& report) { | ||||
|     bool retval = false; | ||||
|  | ||||
|     if (nullptr != this->m_socket) { | ||||
|         /* serialize the report */ | ||||
|         std::string serialized = report.SerializeAsString(); | ||||
|         zmq::message_t message(serialized.size()); | ||||
|         std::memcpy(message.data(), serialized.c_str(), serialized.size()); | ||||
|  | ||||
|         try { | ||||
|             auto size = message.size(); | ||||
|             auto result = this->m_socket->send(message, zmq::send_flags::none); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user