You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
testmodbus-server/mbsconfig.h

48 lines
841 B

/////////////////////////////////////////////////////////////////////////////////
//
// mbsconfig.h is part of TestModbus-Server.
//
/////////////////////////////////////////////////////////////////////////////////
/*
modbusserver configuration
*/
#ifndef _MBSCONFIG_H_
#define _MBDCONFIG_H_
#include "config.h"
#include "modbus.h"
#include <string>
// maybe soon internationalisation
#define _(__s) __s
class Config {
private:
std::string filename;
int port;
public:
Config ();
~Config();
void SetPort (int p);
int GetPort () { return port; };
void SetFilename(std::string f);
std::string GetFilename() { return filename; };
int Save(); // RETURN 0 on error
int Read(); // first set filename RETURN 0 on errro
};
//
// declared in main.cc
//
extern Config config;
extern Modbus modbus;
#endif