TestEventNotifier is working now
This commit is contained in:
@@ -14,13 +14,12 @@
|
||||
namespace Input
|
||||
{
|
||||
|
||||
EventNotifier::EventNotifier() :
|
||||
is_running(true)
|
||||
EventNotifier::EventNotifier(IBlockingQueue<Event>* queue) :
|
||||
is_running(true),
|
||||
event_queue(queue)
|
||||
{
|
||||
this->notify_thread = std::thread(&EventNotifier::notify, this);
|
||||
|
||||
this->event_queue = new BlockingQueue<Event>();
|
||||
|
||||
CLOG(INFO, INPUT_LOGGER) << "Created EventNotifier and started thread";
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class EventNotifier : public IEventNotifier
|
||||
{
|
||||
|
||||
public:
|
||||
EventNotifier();
|
||||
EventNotifier(IBlockingQueue<Event>* queue);
|
||||
~EventNotifier();
|
||||
|
||||
void register_event_handler(IEventHandler* handler);
|
||||
|
||||
@@ -22,7 +22,9 @@ std::shared_ptr<InputDriver> InputDriverFactory::get_InputDriver(std::istream& i
|
||||
{
|
||||
ConfigureLogger();
|
||||
|
||||
std::shared_ptr<IEventNotifier> event_notifier = std::make_shared<EventNotifier>();
|
||||
IBlockingQueue<Event>* event_queue = new BlockingQueue<Event>;
|
||||
|
||||
std::shared_ptr<IEventNotifier> event_notifier = std::make_shared<EventNotifier>(event_queue);
|
||||
|
||||
std::unique_ptr<IInputGPIOInterface> input_gpio_interface = std::make_unique<InputGPIOInterface>(input_config_stream);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user