Commit 6735b24b authored by Pavel Vainerman's avatar Pavel Vainerman

(ModbusMaster): добавил функцию с более удобными параметрами (string)

parent f8928a26
......@@ -17,6 +17,7 @@ class ModbusTCPMaster:
ModbusTCPMaster();
virtual ~ModbusTCPMaster();
void connect( const std::string addr, int port );
void connect( ost::InetAddress addr, int port );
void disconnect();
bool isConnection();
......
......@@ -297,6 +297,12 @@ void ModbusTCPMaster::reconnect()
}
}
// -------------------------------------------------------------------------
void ModbusTCPMaster::connect( const std::string addr, int port )
{
ost::InetAddress ia(iaddr.c_str());
connect(ia,port);
}
// -------------------------------------------------------------------------
void ModbusTCPMaster::connect( ost::InetAddress addr, int port )
{
if( tcp )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment