|
1234567891011121314151617181920212223242526272829303132333435363738 |
- #pragma once
- #include "DataModel.h"
- #include "PublisherInterface.h"
- #include <memory>
- #include <vector>
- #include <thread>
- #include "ts_queue.h"
- #include "modbus_interface_lib.h"
-
- class DataAcquisition
- {
- private:
- std::unique_ptr<DataModel>& dataModel;
-
- //Modbus Connections for POC and Bender, can be serial or IP
- std::vector<std::unique_ptr<PublisherInterface>> publishers;
-
- //Modbus thread
- std::vector<std::thread> modbusThread;
-
- ts_queue<ParameterSpecification> modbusAccessQueue;
-
-
- public:
- DataAcquisition();
- ~DataAcquisition();
-
-
- void startModbusThread();
- ts_queue<ParameterSpecification>& getModbusQueue() { return modbusAccessQueue; }
-
- //void registerPublisher(Publisher* publisher);
- void registerPublisher(std::unique_ptr<PublisherInterface> publisher);
-
- std::vector<std::unique_ptr<PublisherInterface>>& getPublishers() { return publishers; }
-
- void enqueuePublisherRegister();
- };
|