2020-08-13 20:53:35 +02:00
|
|
|
#include "Event.h"
|
2020-12-01 17:44:36 +01:00
|
|
|
|
2016-06-15 23:48:41 +02: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;
|
2016-06-15 23:48:41 +02:00
|
|
|
}
|
|
|
|
}
|