Files
Jonas Zeunert 6a403d2218 Remove Andi
2022-02-24 20:50:31 +01:00

45 lines
773 B
C++

/*
* InputEvent.h
*
* Created on: Apr 5, 2018
* Author: Johannes Wendel, Jonas Zeunert
*/
#ifndef INPUTEVENT_H_
#define INPUTEVENT_H_
#include <set>
#include <string>
#include <chrono>
namespace flippR_driver {
namespace input {
class Event {
public:
Event(uint8_t address, int priority, std::string name);
std::string getJsonString();
friend bool operator==(const Event &left, const Event &right);
friend bool operator<(const Event &left, const Event &right) {
return left.priority < right.priority;
}
public:
std::string name;
uint8_t address;
int priority;
std::chrono::time_point<std::chrono::high_resolution_clock> last_activation;
};
bool operator==(const Event &left, const Event &right);
}
}
#endif /* INPUTEVENT_H_ */