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());
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Sending message to listener failed with result " << std::hex << std::setw(4)
|
||||
<< result << std::endl;
|
||||
sif::error << std::hex << "EventManager::notifyListeners: MSG to " << std::setw(8)
|
||||
<< std::setfill('0') << "0x" << listener.first << " failed with result "
|
||||
<< std::setw(4) << "0x" << result << std::setfill(' ') << std::endl;
|
||||
#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
|
||||
}
|
||||
}
|
||||
@ -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 */
|
||||
|
@ -42,6 +42,7 @@ class EventManager : public EventManagerIF, public ExecutableObjectIF, public Sy
|
||||
object_id_t reporterFrom = 0, object_id_t reporterTo = 0,
|
||||
bool reporterInverted = false);
|
||||
ReturnValue_t performOperation(uint8_t opCode);
|
||||
void printListeners();
|
||||
|
||||
protected:
|
||||
MessageQueueIF* eventReportQueue = nullptr;
|
||||
|
@ -240,9 +240,9 @@ ReturnValue_t MessageQueue::sendMessageFromMessageQueue(MessageQueueId_t sendTo,
|
||||
bool ignoreFault) {
|
||||
if (message == nullptr) {
|
||||
#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
|
||||
sif::printError("MessageQueue::sendMessageFromMessageQueue: Message is nullptr!\n");
|
||||
sif::printError("MessageQueue::sendMessageFromMessageQueue: Message is nullptr\n");
|
||||
#endif
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ Service5EventReporting::Service5EventReporting(object_id_t objectId, uint16_t ap
|
||||
: PusServiceBase(objectId, apid, serviceId),
|
||||
maxNumberReportsPerCycle(maxNumberReportsPerCycle) {
|
||||
eventQueue = QueueFactory::instance()->createMessageQueue(messageQueueDepth);
|
||||
sif::info << eventQueue->getId() << std::endl;
|
||||
}
|
||||
|
||||
Service5EventReporting::~Service5EventReporting() {
|
||||
|
@ -77,9 +77,9 @@ class RMAPChannelIF {
|
||||
* command; command was not sent
|
||||
* - @c COMMAND_BUFFER_FULL no receiver buffer available for
|
||||
* expected len; command was not sent
|
||||
* - @c COMMAND_TOO_BIG the data that was to be sent was too long for
|
||||
* the hw to handle (write command) or the expected len was bigger than maximal expected len (read
|
||||
* command) command was not sent
|
||||
* - @c COMMAND_TOO_BIG the data that was to be sent was too
|
||||
* long for the hw to handle (write command) or the expected len was bigger than maximal expected
|
||||
* len (read command) command was not sent
|
||||
* - @c COMMAND_CHANNEL_DEACTIVATED the channel has no port set
|
||||
* - @c NOT_SUPPORTED if you dont feel like
|
||||
* implementing something...
|
||||
|
Loading…
Reference in New Issue
Block a user