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-27
Revision:
13:5414193da1de
Child:
19:4b147d8f9164

File content as of revision 13:5414193da1de:

#ifndef __COMPONENT_HPP__
#define __COMPONENT_HPP__

#include <vector>
#include "Channel.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<Channel*>& channels) {
            this->id = id;
            this->channels = channels;
        }

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

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

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


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

#endif // __COMPONENT_HPP__