fsfw/events/Event.cpp

17 lines
349 B
C++
Raw Normal View History

2020-08-13 20:53:35 +02:00
#include "Event.h"
2020-12-01 17:44:36 +01:00
namespace EVENT {
EventId_t getEventId(Event event) {
return (event & 0xFFFF);
}
EventSeverity_t getSeverity(Event event) {
return ((event >> 16) & 0xFF);
}
2020-12-01 17:44:36 +01:00
Event makeEvent(uint8_t subsystemId, uint8_t uniqueEventId,
EventSeverity_t eventSeverity) {
return (eventSeverity << 16) + (subsystemId * 100) + uniqueEventId;
}
}