Version FC
Dependencies: DmTftLibrary eeprom SX1280Lib filesystem mbed
Fork of MSNV2-Terminal_V1-5 by
Diff: ExtMemory.cpp
- Revision:
- 19:4b147d8f9164
- Parent:
- 18:d5e7e56b0a0d
- Child:
- 20:b0281e8a375a
--- a/ExtMemory.cpp Thu Aug 30 08:40:16 2018 +0000 +++ b/ExtMemory.cpp Thu Aug 30 08:48:19 2018 +0000 @@ -12,7 +12,7 @@ // ===================================== Includes #include "ExtMemory.h" -#include "Channel.hpp" +#include "Service.hpp" #include "Component.hpp" #include "Payload.hpp" #include "DataBase.h" @@ -49,50 +49,50 @@ LSM303A et DS18B20 ne contiennent pas les devices décrits ici, c'est juste un exemple ;-) ************************************************************************************** */ - Channel::ACCESS_PIN access_pins[6] = { 1, 2, 3, 4, 5, 6 }; + Service::ACCESS_PIN access_pins[6] = { 1, 2, 3, 4, 5, 6 }; // Construction du premier channel du premier composant // ---------------------------------------------------- - Channel* channel1 = new Channel(Channel::SENSOR, + Service* channel1 = new Service(Service::SENSOR, 102, - Channel::ENABLE_, - Channel::UART_, - Channel::IRQ_, - Channel::BY_VALUE, + Service::ENABLE_, + Service::UART_, + Service::IRQ_, + Service::BY_VALUE, access_pins, - Channel::MESSAGE, - Channel::IO, + Service::MESSAGE, + Service::IO, "Premier channel du composant BME280 sur cette payload"); // Construction du deuxieme channel du premier composant // ----------------------------------------------------- - Channel* channel2 = new Channel(Channel::SENSOR, + Service* channel2 = new Service(Service::SENSOR, 103, - Channel::ENABLE_, - Channel::UART_, - Channel::IRQ_, - Channel::BY_VALUE, + Service::ENABLE_, + Service::UART_, + Service::IRQ_, + Service::BY_VALUE, access_pins, - Channel::MESSAGE, - Channel::IO, + Service::MESSAGE, + Service::IO, "Deuxieme channel du composant BME280 sur cette payload"); // Construction du troisieme channel du premier composant // ------------------------------------------------------ - Channel* channel3 = new Channel(Channel::SENSOR, + Service* channel3 = new Service(Service::SENSOR, 104, - Channel::ENABLE_, - Channel::UART_, - Channel::IRQ_, - Channel::BY_VALUE, + Service::ENABLE_, + Service::UART_, + Service::IRQ_, + Service::BY_VALUE, access_pins, - Channel::MESSAGE, - Channel::IO, + Service::MESSAGE, + Service::IO, "Troisieme channel du composant BME280 sur cette payload"); // Construction du premier composant // --------------------------------- - std::vector<Channel*> channels = std::vector<Channel*>(); + std::vector<Service*> channels = std::vector<Service*>(); channels.push_back(channel1); channels.push_back(channel2); channels.push_back(channel3); @@ -102,28 +102,28 @@ // Construction du premier channel du deuxieme composant // ----------------------------------------------------- - Channel* channel4 = new Channel(Channel::SENSOR, + Service* channel4 = new Service(Service::SENSOR, 113, - Channel::ENABLE_, - Channel::UART_, - Channel::IRQ_, - Channel::BY_VALUE, + Service::ENABLE_, + Service::UART_, + Service::IRQ_, + Service::BY_VALUE, access_pins, - Channel::MESSAGE, - Channel::IO, + Service::MESSAGE, + Service::IO, "Premier channel du composant LSM303A sur cette payload"); // Construction du deuxieme channel du deuxieme composant // ------------------------------------------------------ - Channel* channel5 = new Channel(Channel::SENSOR, + Service* channel5 = new Service(Service::SENSOR, 115, - Channel::ENABLE_, - Channel::UART_, - Channel::IRQ_, - Channel::BY_VALUE, + Service::ENABLE_, + Service::UART_, + Service::IRQ_, + Service::BY_VALUE, access_pins, - Channel::MESSAGE, - Channel::IO, + Service::MESSAGE, + Service::IO, "Deuxieme channel du composant LSM303A sur cette payload"); // Construction du deuxieme composant @@ -137,15 +137,15 @@ // Construction du premier channel du troisieme composant // ------------------------------------------------------ - Channel* channel6 = new Channel(Channel::ACTUATOR, + Service* channel6 = new Service(Service::ACTUATOR, 139, - Channel::ENABLE_, - Channel::UART_, - Channel::IRQ_, - Channel::BY_VALUE, + Service::ENABLE_, + Service::UART_, + Service::IRQ_, + Service::BY_VALUE, access_pins, - Channel::MESSAGE, - Channel::IO, + Service::MESSAGE, + Service::IO, "Premier channel du composant DS18B20 sur cette payload"); // Construction du troisieme composant