Machine Vision Status TCP Server

Dependencies:   C12832 EthernetInterface mbed-rtos mbed ConfigFile

Configuration.h

Committer:
dwini
Date:
2015-06-15
Revision:
9:60ce5e733ea6

File content as of revision 9:60ce5e733ea6:

#ifndef CONFIGURATION_HEADER
#define CONFIGURATION_HEADER

#include <string>
#include "ConfigFile.h"

namespace MachineVision{
    
    class Configuration{
        
        public:
            bool use_dhcp;
            std::string ip;
            std::string netmask;
            std::string gateway;
            int tcp_port;
            
        public:
            bool useDhcp(void);
            std::string getIpAddress(void);
            std::string getNetmask(void);
            std::string getGateway(void);
            int getTcpPort(void);

        public:
            Configuration(void);
            bool readFromFile(LocalFileSystem * fs, char * configfile);
            bool writeConfiguration(LocalFileSystem * fs, char * configfile);
            
        private:
            bool readConfigParameter(ConfigFile * cfg, char * key, char * value, int buffer_size);
    };
}

#endif