some refactoring
This commit is contained in:
@@ -6,8 +6,8 @@
|
|||||||
#define flippR_driver_PRINTHANDLER_H
|
#define flippR_driver_PRINTHANDLER_H
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "EventHandler.h"
|
#include "input/EventHandler.h"
|
||||||
#include "IInputDriver.h"
|
#include "input/IInputDriver.h"
|
||||||
|
|
||||||
class PrintHandler : public flippR_driver::input::EventHandler
|
class PrintHandler : public flippR_driver::input::EventHandler
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#include "DriverFactory.h"
|
#include "DriverFactory.h"
|
||||||
#include "IInputDriver.h"
|
#include "input/IInputDriver.h"
|
||||||
|
|
||||||
#include "PrintHandler.h"
|
#include "PrintHandler.h"
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "IInputDriver.h"
|
#include "input/IInputDriver.h"
|
||||||
|
|
||||||
namespace flippR_driver
|
namespace flippR_driver
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
#include "IInputDriver.h"
|
#include "IInputDriver.h"
|
||||||
|
|
||||||
#include "IEventHandler.h"
|
#include "IEventHandler.h"
|
||||||
#include "Event.h"
|
#include "input/Event.h"
|
||||||
|
|
||||||
namespace flippR_driver
|
namespace flippR_driver
|
||||||
{
|
{
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
#ifndef SRC_IEVENTHANDLER_H_
|
#ifndef SRC_IEVENTHANDLER_H_
|
||||||
#define SRC_IEVENTHANDLER_H_
|
#define SRC_IEVENTHANDLER_H_
|
||||||
|
|
||||||
#include "Event.h"
|
#include "input/Event.h"
|
||||||
|
|
||||||
class IEventHandler
|
class IEventHandler
|
||||||
{
|
{
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
#ifndef SRC_INPUT_IINPUTDRIVER_H_
|
#ifndef SRC_INPUT_IINPUTDRIVER_H_
|
||||||
#define SRC_INPUT_IINPUTDRIVER_H_
|
#define SRC_INPUT_IINPUTDRIVER_H_
|
||||||
|
|
||||||
#include "IEventHandler.h"
|
#include "input/IEventHandler.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace flippR_driver
|
namespace flippR_driver
|
||||||
@@ -7,12 +7,18 @@
|
|||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
|
namespace flippr_driver
|
||||||
|
{
|
||||||
|
namespace output
|
||||||
|
{
|
||||||
|
|
||||||
class IEightDigitDisplay
|
class IEightDigitDisplay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void write_score(int score);
|
virtual void write_score(int score);
|
||||||
virtual void write_content(std::array<char, 8> content);
|
virtual void write_content(std::array<char, 8> content);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif //FLIPPR_DRIVER_IEIGHTDIGITDISPLAY_H
|
#endif //FLIPPR_DRIVER_IEIGHTDIGITDISPLAY_H
|
||||||
@@ -7,10 +7,18 @@
|
|||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
|
namespace flippr_driver
|
||||||
|
{
|
||||||
|
namespace output
|
||||||
|
{
|
||||||
|
|
||||||
class ISevenDigitDisplay
|
class ISevenDigitDisplay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void write_score(int score);
|
virtual void write_score(int score);
|
||||||
virtual void write_content(std::array<char, 7> content);
|
virtual void write_content(std::array<char, 7> content);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif //FLIPPR_DRIVER_ISEVENDIGITDISPLAY_H
|
#endif //FLIPPR_DRIVER_ISEVENDIGITDISPLAY_H
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
#ifndef flippR_driver_DISTRIBUTINGEVENT_H
|
#ifndef flippR_driver_DISTRIBUTINGEVENT_H
|
||||||
#define flippR_driver_DISTRIBUTINGEVENT_H
|
#define flippR_driver_DISTRIBUTINGEVENT_H
|
||||||
|
|
||||||
#include "Event.h"
|
#include "input/Event.h"
|
||||||
#include "IEventNotifier.h"
|
#include "IEventNotifier.h"
|
||||||
|
|
||||||
namespace flippR_driver
|
namespace flippR_driver
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#ifndef SRC_INPUT_ERROREVENT_HPP_
|
#ifndef SRC_INPUT_ERROREVENT_HPP_
|
||||||
#define SRC_INPUT_ERROREVENT_HPP_
|
#define SRC_INPUT_ERROREVENT_HPP_
|
||||||
|
|
||||||
#include "Event.h"
|
#include "input/Event.h"
|
||||||
|
|
||||||
namespace flippR_driver {
|
namespace flippR_driver {
|
||||||
namespace input {
|
namespace input {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Created on: Jun 15, 2018
|
* Created on: Jun 15, 2018
|
||||||
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
|
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
|
||||||
*/
|
*/
|
||||||
#include "Event.h"
|
#include "input/Event.h"
|
||||||
|
|
||||||
#include "utility/config.h"
|
#include "utility/config.h"
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Created on: Jun 14, 2018
|
* Created on: Jun 14, 2018
|
||||||
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
|
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
|
||||||
*/
|
*/
|
||||||
#include "EventHandler.h"
|
#include "input/EventHandler.h"
|
||||||
#include "utility/config.h"
|
#include "utility/config.h"
|
||||||
|
|
||||||
namespace flippR_driver
|
namespace flippR_driver
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
#include "utility/BlockingQueue.hpp"
|
#include "utility/BlockingQueue.hpp"
|
||||||
#include "utility/IBlockingQueue.h"
|
#include "utility/IBlockingQueue.h"
|
||||||
#include "Event.h"
|
#include "input/Event.h"
|
||||||
#include "EventHandler.h"
|
#include "input/EventHandler.h"
|
||||||
|
|
||||||
#define HANDLER_TIMEOUT 2000
|
#define HANDLER_TIMEOUT 2000
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
#ifndef SRC_INPUT_IEVENTNOTIFIER_H_
|
#ifndef SRC_INPUT_IEVENTNOTIFIER_H_
|
||||||
#define SRC_INPUT_IEVENTNOTIFIER_H_
|
#define SRC_INPUT_IEVENTNOTIFIER_H_
|
||||||
|
|
||||||
#include "Event.h"
|
#include "input/Event.h"
|
||||||
#include "IEventHandler.h"
|
#include "input/IEventHandler.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace flippR_driver
|
namespace flippR_driver
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "IEventNotifier.h"
|
#include "IEventNotifier.h"
|
||||||
#include "IInputDriver.h"
|
#include "input/IInputDriver.h"
|
||||||
#include "IDetector.h"
|
#include "IDetector.h"
|
||||||
|
|
||||||
namespace flippR_driver
|
namespace flippR_driver
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
#include "Detector.h"
|
#include "Detector.h"
|
||||||
#include "IInputDriver.h"
|
#include "input/IInputDriver.h"
|
||||||
|
|
||||||
#include "utility/InputGPIOInterface.h"
|
#include "utility/InputGPIOInterface.h"
|
||||||
#include "json/json.hpp"
|
#include "json/json.hpp"
|
||||||
|
|||||||
Reference in New Issue
Block a user