update event mngr printout
This commit is contained in:
parent
bd05afbddd
commit
a12e98d948
@ -52,10 +52,12 @@ void EventManager::notifyListeners(EventMessage* message) {
|
|||||||
MessageQueueSenderIF::sendMessage(listener.first, message, message->getSender());
|
MessageQueueSenderIF::sendMessage(listener.first, message, message->getSender());
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "Sending message to listener failed with result " << std::hex << std::setw(4)
|
sif::error << std::hex << "EventManager::notifyListeners: MSG to " << std::setw(8)
|
||||||
<< result << std::endl;
|
<< std::setfill('0') << "0x" << listener.first << " failed with result "
|
||||||
|
<< std::setw(4) << "0x" << result << std::setfill(' ') << std::endl;
|
||||||
#else
|
#else
|
||||||
sif::printError("Sending message to listener failed with result %04x\n", result);
|
sif::printError("Sending message to listener 0x%08x failed with result %04x\n",
|
||||||
|
listener.first, result);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -198,4 +200,19 @@ void EventManager::printUtility(sif::OutputTypes printType, EventMessage* messag
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EventManager::printListeners() {
|
||||||
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
sif::info << "Event manager listener MQ IDs:" << std::endl;
|
||||||
|
for (auto& listener : listenerList) {
|
||||||
|
sif::info << std::hex << std::setw(8) << std::setfill('0') << "0x" << listener.first << std::dec
|
||||||
|
<< std::setfill(' ') << std::endl;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
sif::printInfo("Event manager listener MQ IDs:\n");
|
||||||
|
for (auto& listener : listenerList) {
|
||||||
|
sif::printInfo("0x%08x\n", listener.first);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* FSFW_OBJ_EVENT_TRANSLATION == 1 */
|
#endif /* FSFW_OBJ_EVENT_TRANSLATION == 1 */
|
||||||
|
@ -42,6 +42,7 @@ class EventManager : public EventManagerIF, public ExecutableObjectIF, public Sy
|
|||||||
object_id_t reporterFrom = 0, object_id_t reporterTo = 0,
|
object_id_t reporterFrom = 0, object_id_t reporterTo = 0,
|
||||||
bool reporterInverted = false);
|
bool reporterInverted = false);
|
||||||
ReturnValue_t performOperation(uint8_t opCode);
|
ReturnValue_t performOperation(uint8_t opCode);
|
||||||
|
void printListeners();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MessageQueueIF* eventReportQueue = nullptr;
|
MessageQueueIF* eventReportQueue = nullptr;
|
||||||
|
@ -240,9 +240,9 @@ ReturnValue_t MessageQueue::sendMessageFromMessageQueue(MessageQueueId_t sendTo,
|
|||||||
bool ignoreFault) {
|
bool ignoreFault) {
|
||||||
if (message == nullptr) {
|
if (message == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "MessageQueue::sendMessageFromMessageQueue: Message is nullptr!" << std::endl;
|
sif::error << "MessageQueue::sendMessageFromMessageQueue: Message is nullptr" << std::endl;
|
||||||
#else
|
#else
|
||||||
sif::printError("MessageQueue::sendMessageFromMessageQueue: Message is nullptr!\n");
|
sif::printError("MessageQueue::sendMessageFromMessageQueue: Message is nullptr\n");
|
||||||
#endif
|
#endif
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ Service5EventReporting::Service5EventReporting(object_id_t objectId, uint16_t ap
|
|||||||
: PusServiceBase(objectId, apid, serviceId),
|
: PusServiceBase(objectId, apid, serviceId),
|
||||||
maxNumberReportsPerCycle(maxNumberReportsPerCycle) {
|
maxNumberReportsPerCycle(maxNumberReportsPerCycle) {
|
||||||
eventQueue = QueueFactory::instance()->createMessageQueue(messageQueueDepth);
|
eventQueue = QueueFactory::instance()->createMessageQueue(messageQueueDepth);
|
||||||
|
sif::info << eventQueue->getId() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Service5EventReporting::~Service5EventReporting() {
|
Service5EventReporting::~Service5EventReporting() {
|
||||||
|
@ -77,9 +77,9 @@ class RMAPChannelIF {
|
|||||||
* command; command was not sent
|
* command; command was not sent
|
||||||
* - @c COMMAND_BUFFER_FULL no receiver buffer available for
|
* - @c COMMAND_BUFFER_FULL no receiver buffer available for
|
||||||
* expected len; command was not sent
|
* expected len; command was not sent
|
||||||
* - @c COMMAND_TOO_BIG the data that was to be sent was too long for
|
* - @c COMMAND_TOO_BIG the data that was to be sent was too
|
||||||
* the hw to handle (write command) or the expected len was bigger than maximal expected len (read
|
* long for the hw to handle (write command) or the expected len was bigger than maximal expected
|
||||||
* command) command was not sent
|
* len (read command) command was not sent
|
||||||
* - @c COMMAND_CHANNEL_DEACTIVATED the channel has no port set
|
* - @c COMMAND_CHANNEL_DEACTIVATED the channel has no port set
|
||||||
* - @c NOT_SUPPORTED if you dont feel like
|
* - @c NOT_SUPPORTED if you dont feel like
|
||||||
* implementing something...
|
* implementing something...
|
||||||
|
Loading…
Reference in New Issue
Block a user