add the reported timestamp
This commit is contained in:
@@ -65,6 +65,12 @@ bool AircraftReporter::send(aman::AircraftReport& report) {
|
|||||||
bool retval = false;
|
bool retval = false;
|
||||||
|
|
||||||
if (nullptr != this->m_socket) {
|
if (nullptr != this->m_socket) {
|
||||||
|
/* set the report time */
|
||||||
|
std::stringstream stream;
|
||||||
|
auto reportTime = std::chrono::utc_clock::now();
|
||||||
|
stream << std::format("{0:%y%m%d%H%M}", reportTime);
|
||||||
|
report.set_reporttime(stream.str());
|
||||||
|
|
||||||
/* serialize the report */
|
/* serialize the report */
|
||||||
std::string serialized = report.SerializeAsString();
|
std::string serialized = report.SerializeAsString();
|
||||||
zmq::message_t message(serialized.size());
|
zmq::message_t message(serialized.size());
|
||||||
|
|||||||
Reference in New Issue
Block a user