Skip to content
Snippets Groups Projects
Commit 3b7f67a0 authored by Davide Mor's avatar Davide Mor Committed by Emilio Corigliano
Browse files

[RIGv2] Added EventSniffer

parent 6c203812
Branches
Tags
1 merge request!38[RIGv2] Merge RIGv2 OBSW
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
#include <diagnostic/CpuMeter/CpuMeter.h> #include <diagnostic/CpuMeter/CpuMeter.h>
#include <diagnostic/StackLogger.h> #include <diagnostic/StackLogger.h>
#include <events/EventBroker.h> #include <events/EventBroker.h>
#include <events/EventData.h>
#include <events/utils/EventSniffer.h>
// TODO(davide.mor): Remove TimestampTimer
#include <drivers/timer/TimestampTimer.h>
using namespace Boardcore; using namespace Boardcore;
using namespace Common; using namespace Common;
...@@ -54,6 +58,15 @@ int main() ...@@ -54,6 +58,15 @@ int main()
Logger &sdLogger = Logger::getInstance(); Logger &sdLogger = Logger::getInstance();
EventBroker &broker = EventBroker::getInstance(); EventBroker &broker = EventBroker::getInstance();
// Setup event sniffer
EventSniffer sniffer(
broker,
[&](uint8_t event, uint8_t topic)
{
EventData data{TimestampTimer::getTimestamp(), event, topic};
sdLogger.log(data);
});
bool initResult = true; bool initResult = true;
// Insert modules // Insert modules
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment