Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
VdrCommunicationController.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_COMMS_NMEA_VDRCOMMUNICATIONCONTROLLER_HPP_
2#define IV_SRC_COMMS_NMEA_VDRCOMMUNICATIONCONTROLLER_HPP_
3
4#include "alarms/structs.hpp"
8#include "structs.hpp"
9
10namespace iv::channels
11{
12class AbstractChannel;
13}
14
15namespace iv::comms::vdr
16{
17
19 public std::enable_shared_from_this<VdrCommunicationController>
20{
22
23public:
24 VdrCommunicationController(const std::shared_ptr<ICommunicationDriver> &driver,
25 const std::shared_ptr<iv::model::comms::NetworkData> &networkData);
26
27 void addChannel(const std::shared_ptr<iv::channels::AbstractChannel> &channel) override;
28
29 void initialize() override;
30
31 bool frame() override;
32
37 std::unique_ptr<iv::containers::CircularQueue<std::shared_ptr<iv::alarms::Event>, 5000>> m_vdrAlarmQueue;
38
39private:
40 std::map<iv::types::channelId, VdrChannelInfo> m_channelsInVdr;
41 std::shared_ptr<iv::comms::serial::SerialCommunicationsDriver> m_serialDriver;
42};
43
44}// namespace iv::comms::vdr
45
46#endif//IV_SRC_COMMS_NMEA_VDRCOMMUNICATIONCONTROLLER_HPP_
Definition ICommunicationController.hpp:23
Definition VdrCommunicationController.cpp:9
Definition VdrCommunicationController.hpp:20
void addChannel(const std::shared_ptr< iv::channels::AbstractChannel > &channel) override
Definition VdrCommunicationController.cpp:46
std::map< iv::types::channelId, VdrChannelInfo > m_channelsInVdr
Definition VdrCommunicationController.hpp:40
void initialize() override
Initialize the thread for VDR communication.
Definition VdrCommunicationController.cpp:62
VdrCommunicationController(const std::shared_ptr< ICommunicationDriver > &driver, const std::shared_ptr< iv::model::comms::NetworkData > &networkData)
Definition VdrCommunicationController.cpp:30
std::shared_ptr< iv::comms::serial::SerialCommunicationsDriver > m_serialDriver
Definition VdrCommunicationController.hpp:41
std::unique_ptr< iv::containers::CircularQueue< std::shared_ptr< iv::alarms::Event >, 5000 > > m_vdrAlarmQueue
Queue that contains all events processed by the alarmManager.
Definition VdrCommunicationController.hpp:37
bool frame() override
This functions is called periodically to send the events contained in the alarmQueue through the seri...
Definition VdrCommunicationController.cpp:82
Definition AlarmsManager.hpp:17
Definition structs.hpp:34