event manager update

This commit is contained in:
Robin Müller 2021-05-12 16:37:12 +02:00
parent 8293e6b0c7
commit a6dd2d5dcb
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -156,21 +156,19 @@ void EventManager::printUtility(sif::OutputTypes printType, EventMessage *messag
sif::info << "0x" << std::hex << std::setw(8) << std::setfill('0') << sif::info << "0x" << std::hex << std::setw(8) << std::setfill('0') <<
message->getReporter() << std::setfill(' ') << std::dec; message->getReporter() << std::setfill(' ') << std::dec;
} }
sif::info << " reported " << translateEvents(message->getEvent()) sif::info << " report event with ID " << message->getEventId() << std::endl;
<< " with event ID " << std::dec << message->getEventId() << std::endl;
sif::info << std::hex << "P1 Hex: 0x" << message->getParameter1() << sif::info << std::hex << "P1 Hex: 0x" << message->getParameter1() <<
" | P1 Dec: " << std::dec << message->getParameter1() << std::hex << " | P1 Dec: " << std::dec << message->getParameter1() << std::hex <<
" | P2 Hex: 0x" << message->getParameter2() << " | P2 Dec: " << std::dec << " | P2 Hex: 0x" << message->getParameter2() << " | P2 Dec: " << std::dec <<
message->getParameter2() << std::endl; message->getParameter2() << std::endl;
#else #else
if (string != 0) { if (string != 0) {
sif::printInfo("Event Manager: %s reported %s with event ID %d\n", sif::printInfo("Event Manager: %s reported event with ID %d\n", string,
message->getReporter(), translateEvents(message->getEvent()),
message->getEventId()); message->getEventId());
} }
else { else {
sif::printInfo("Event Manager: Reporter ID 0x%08x reported %s with event ID %d\n", sif::printInfo("Event Manager: Reporter ID 0x%08x reported event with ID %d\n",
string, translateEvents(message->getEvent()), message->getEventId()); message->getReporter(), message->getEventId());
} }
sif::printInfo("P1 Hex: 0x%x | P1 Dec: %d | P2 Hex: 0x%x | P2 Dec: %d\n", sif::printInfo("P1 Hex: 0x%x | P1 Dec: %d | P2 Hex: 0x%x | P2 Dec: %d\n",
message->getParameter1(), message->getParameter1(), message->getParameter1(), message->getParameter1(),
@ -185,23 +183,22 @@ void EventManager::printUtility(sif::OutputTypes printType, EventMessage *messag
sif::debug << string; sif::debug << string;
} }
else { else {
sif::debug << "0x" << std::hex << message->getReporter() << std::dec; sif::debug << "0x" << std::hex << std::setw(8) << std::setfill('0') <<
message->getReporter() << std::setfill(' ') << std::dec;
} }
sif::debug << " reported " << translateEvents(message->getEvent()) sif::debug << " report event with ID " << message->getEventId() << std::endl;
<< " with event ID " << std::dec << message->getEventId() << std::endl;
sif::debug << std::hex << "P1 Hex: 0x" << message->getParameter1() << sif::debug << std::hex << "P1 Hex: 0x" << message->getParameter1() <<
" | P1 Dec: " << std::dec << message->getParameter1() << std::hex << " | P1 Dec: " << std::dec << message->getParameter1() << std::hex <<
" | P2 Hex: 0x" << message->getParameter2() << " | P2 Dec: " << std::dec << " | P2 Hex: 0x" << message->getParameter2() << " | P2 Dec: " << std::dec <<
message->getParameter2() << std::endl; message->getParameter2() << std::endl;
#else #else
if (string != 0) { if (string != 0) {
sif::printDebug("Event Manager: %s reported %s with event ID %d\n", sif::printDebug("Event Manager: %s reported event with ID %d\n", string,
message->getReporter(), translateEvents(message->getEvent()),
message->getEventId()); message->getEventId());
} }
else { else {
sif::printDebug("Event Manager: Reporter ID 0x%08x reported %s with event ID %d\n", sif::printDebug("Event Manager: Reporter ID 0x%08x reported event with ID %d\n",
string, translateEvents(message->getEvent()), message->getEventId()); message->getReporter(), message->getEventId());
} }
sif::printDebug("P1 Hex: 0x%x | P1 Dec: %d | P2 Hex: 0x%x | P2 Dec: %d\n", sif::printDebug("P1 Hex: 0x%x | P1 Dec: %d | P2 Hex: 0x%x | P2 Dec: %d\n",
message->getParameter1(), message->getParameter1(), message->getParameter1(), message->getParameter1(),