Skip to content

Commit 83e9036

Browse files
authored
Architecture Review (#391)
Description on #391
1 parent 01e6be3 commit 83e9036

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+9419
-8825
lines changed

.travis.yml

Lines changed: 270 additions & 187 deletions
Large diffs are not rendered by default.

MySensors_NodeManager.h

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
/*
2+
* The MySensors Arduino library handles the wireless radio link and protocol
3+
* between your home built sensors/actuators and HA controller of choice.
4+
* The sensors forms a self healing radio network with optional repeaters. Each
5+
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
6+
* network topology allowing messages to be routed to nodes.
7+
*
8+
* Created by Henrik Ekblad <[email protected]>
9+
* Copyright (C) 2013-2017 Sensnology AB
10+
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
11+
*
12+
* Documentation: http://www.mysensors.org
13+
* Support Forum: http://forum.mysensors.org
14+
*
15+
* This program is free software; you can redistribute it and/or
16+
* modify it under the terms of the GNU General Public License
17+
* version 2 as published by the Free Software Foundation.
18+
*/
19+
#ifndef MySensors_NodeManager_h
20+
#define MySensors_NodeManager_h
21+
22+
// include Arduino header file
23+
#include <Arduino.h>
24+
25+
// include NodeManager's constants
26+
#include "nodemanager/Constants.h"
27+
28+
/***********************************
29+
Include required third-party libraries
30+
*/
31+
32+
// include UDP library
33+
#ifdef MY_USE_UDP
34+
#include <WiFiUdp.h>
35+
#endif
36+
37+
// include ESP8266 library
38+
#ifdef CHIP_ESP8266
39+
#include <ESP8266WiFi.h>
40+
#endif
41+
42+
// include MySensors library
43+
#include <MySensors.h>
44+
45+
// include additional libraries based on the requested configuration
46+
#if NODEMANAGER_TIME == ON
47+
#include <TimeLib.h>
48+
#endif
49+
#if NODEMANAGER_RTC == ON
50+
#undef NODEMANAGER_TIME
51+
#define NODEMANAGER_TIME ON
52+
#include <DS3232RTC.h>
53+
#endif
54+
#if NODEMANAGER_CONDITIONAL_REPORT == ON
55+
#include <float.h>
56+
#endif
57+
#if NODEMANAGER_SD == ON
58+
#include <SD.h>
59+
#endif
60+
#if NODEMANAGER_SERIAL_INPUT == ON
61+
#include "core/MyProtocolMySensors.cpp"
62+
#endif
63+
64+
/***********************************
65+
Include NodeManager core code
66+
*/
67+
68+
// List class
69+
#include "nodemanager/List.h"
70+
71+
// PowerManager class
72+
#if NODEMANAGER_POWER_MANAGER == ON
73+
#include "nodemanager/PowerManager.cpp"
74+
#endif
75+
76+
// ConfigurationRequest class for OTA configuration
77+
#if NODEMANAGER_OTA_CONFIGURATION == ON
78+
#include "nodemanager/ConfigurationRequest.cpp"
79+
#endif
80+
81+
// NodeManager class
82+
#include "nodemanager/Node.cpp"
83+
// create the global variable nodeManager that can be called from within the sketch
84+
extern NodeManager nodeManager;
85+
NodeManager nodeManager;
86+
// Sensor class
87+
#include "nodemanager/Sensor.cpp"
88+
// Child class
89+
#include "nodemanager/Child.cpp"
90+
// Timer class
91+
#include "nodemanager/Timer.cpp"
92+
93+
#if NODEMANAGER_OTA_CONFIGURATION == ON
94+
// include SensorConfiguration if needed
95+
#include <sensors/SensorConfiguration.h>
96+
SensorConfiguration configuration;
97+
#endif
98+
99+
#endif

NodeManager.ino

Lines changed: 0 additions & 449 deletions
This file was deleted.

0 commit comments

Comments
 (0)