-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
31 lines (27 loc) · 663 Bytes
/
Copy pathmain.cpp
File metadata and controls
31 lines (27 loc) · 663 Bytes
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
/**
* @file main.cpp
* @brief Main file
*
* Main file application. A network manager using MQTT bus.
*
* @author Amine BAGGA (2025)
*/
#include <iostream>
#include "MqttProxy.h"
#include "Network.h"
using namespace std;
int main() {
MqttProxy* p_mqttProxy = new MqttProxy();
Network* p_network = new Network(p_mqttProxy);;
if (p_mqttProxy == nullptr) {
cout << "Unable to instantiate MqttProxy" << endl;
return 0;
}
if (p_mqttProxy == nullptr) {
cout << "Unable to instantiate Network" << endl;
return 0;
}
p_mqttProxy->setNetwork(p_network);
p_mqttProxy->start();
return 0;
}