eive-obsw/unittest/rebootLogic/src/event.h
Robin Mueller 9e03f9babe
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
apply clang format to unittest folder as well
2022-03-01 15:06:59 +01:00

42 lines
952 B
C++

#pragma once
#include <cstdint>
#include <iostream>
#include "definitions.h"
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);