-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHeliosHermes.cpp
34 lines (26 loc) · 1.38 KB
/
HeliosHermes.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "HeliosHermes.h"
#include "SerialReciever/SerialReciever.h"
#include "Config/ConfigManager.h"
#include "StreamProcessor/StreamProcessor.h"
#include "PacketFactory/PacketFactory.h"
#include "MessageTransmitter/MessageTransmitter.h"
#include "MessageAggregator/MessageAggregator.h"
#include <QDebug>
HeliosHermes::HeliosHermes(int& argc, char** argv) :
QCoreApplication(argc, argv)
{
qDebug() << "Firing 'er up";
//load in settings and initialize Packet factory
ConfigManager& config = ConfigManager::instance();
PacketFactory* packetFactory = new PacketFactory();
//initialize SerialReciever which will begin to listen to serial port for incoming data
SerialReciever* serialReciever = new SerialReciever();
//initialize StreamProcessor which will process incoming data via signal/slot connected to serialReciever
StreamProcessor* streamProcessor = new StreamProcessor(serialReciever, packetFactory);
//initialize MessageTransmitter which will transmit data every period of time deinifed in config.ini
MessageTransmitter* messageTransmitter = new MessageTransmitter();
//initialize MessageAggregator which will aggregate all packets into one json message and transmit
MessageAggregator* messageAggregator = new MessageAggregator(messageTransmitter, packetFactory);
messageAggregator->startTransmission();
}
HeliosHermes::~HeliosHermes(){}