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.cc

33 lines
603 B

/////////////////////////////////////////////////////////////////////////////////
//
// mbsconfig.cc is part of TestModbus-Server.
//
/////////////////////////////////////////////////////////////////////////////////
#include "mbsconfig.h"
Config::Config () {
port = 502;
filename = "";
};
Config::~Config () {
};
void Config::SetPort (int p) {
if (p < 0) port = 502;
else if (p > 0xFFFF) port = 502;
else port = p;
printf ("Config::%s (%d)\n", __FUNCTION__, port);
};
void Config::SetFilename (std::string f) {
filename = f;
printf ("Config::%s (%s)\n", __FUNCTION__, f.c_str());
};