implemented socket handler

This commit is contained in:
Jonas Zeunert
2018-11-27 02:07:25 +01:00
parent 82ced6ec3c
commit 6b6b185f8e
9 changed files with 140 additions and 7 deletions

View File

@@ -30,6 +30,8 @@ namespace flippR_driver {
std::string name;
char address;
int priority;
std::chrono::time_point<std::chrono::high_resolution_clock> last_activation;
};
bool operator==(const Event &left, const Event &right);

View File

@@ -1,40 +0,0 @@
/*
* InputEventHandler.h
*
* This interface must be implemented to be informed about input events.
*
* Please be aware that handle must be implemented thread safe!
*
* Created on: Apr 5, 2018
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert
*/
#ifndef INPUTEVENTHANDLER_H_
#define INPUTEVENTHANDLER_H_
#include "IInputDriver.h"
#include "IEventHandler.h"
#include "input/Event.h"
namespace flippR_driver
{
namespace input
{
class EventHandler;
class EventHandler : public IEventHandler
{
public:
EventHandler(std::shared_ptr<IInputDriver> input_driver);
virtual ~EventHandler();
virtual void handle(Event& event);
private:
std::shared_ptr<IInputDriver> input_driver;
};
}
}
#endif