Version FC

Dependencies:   DmTftLibrary eeprom SX1280Lib filesystem mbed

Fork of MSNV2-Terminal_V1-5 by Francis CHATAIN

Component.hpp

Committer:
patrick_duc
Date:
2018-08-30
Revision:
19:4b147d8f9164
Parent:
13:5414193da1de
Child:
20:b0281e8a375a

File content as of revision 19:4b147d8f9164:

#ifndef __COMPONENT_HPP__
#define __COMPONENT_HPP__

#include <vector>
#include "Service.hpp"

class Component {

    public:
        enum COMPONENT_ID {
            HTS221    = 1, 
            LPS22HB   = 2, 
            LSM303A   = 3, 
            LSM6DSL   = 4, 
            BME280    = 5, 
            DS18B20   = 6 
        } ;

        Component(COMPONENT_ID id, std::vector<Service*>& channels) {
            this->id = id;
            this->channels = channels;
        }

        std::vector<Service*>& getServices() {
            return this->channels;
        }

        COMPONENT_ID getId() {
            return this->id;
        }

        friend std::ostream& operator<<(std::ostream&, const Component &);


    private:
        COMPONENT_ID            id;
        std::vector<Service*>   channels;
};

#endif // __COMPONENT_HPP__