eive-obsw/unittest/rebootLogic/event.h
Robin Mueller 0d1ff8585c
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
various bugfixes from unittest
2022-02-28 19:52:43 +01:00

41 lines
951 B
C++

#pragma once
#include "definitions.h"
#include <cstdint>
#include <iostream>
struct EventInfo {
// That was just for testing, follow rule of 0
/*
EventInfo () {}
EventInfo (const EventInfo& other): event(other.event), p1(other.p1), p2(other.p2) {
std::cout << "Event info copy ctor called" << std::endl;
}
EventInfo &operator= (const EventInfo& other) {
std::cout << "Event info assignment ctor called" << std::endl;
this->event = other.event;
this->p1 = other.p1;
this->p2 = other.p2;
return *this;
}
EventInfo &operator= (EventInfo&& other) {
std::cout << "Event info move ctor called" << std::endl;
this->event = other.event;
this->p1 = other.p1;
this->p2 = other.p2;
return *this;
}
*/
uint32_t event = 0;
uint32_t p1 = 0;
uint32_t p2 = 0;
};
void triggerEvent(Event event, uint32_t p1, uint32_t p2);
void eventWasCalled(EventInfo& eventInfo, uint32_t& numEvents);