Bachelorthesis/Modbus/include/ModbusTcpClientCommon.cin

34 lines
647 B
Text
Raw Normal View History

/*@!Encoding:1252*/
includes
{
#include "TcpCommon.cin"
2014-05-09 15:39:16 +02:00
#include "ModbusClientCommon.cin"
}
void ModbusConnectTo(char Remote_IP[], word Remote_Port)
{
TcpConnectTo(Remote_IP, Remote_Port);
}
void ModbusConnectTo(dword Remote_IP, word Remote_Port)
{
TcpConnectTo(Remote_IP, Remote_Port);
}
void ModbusSnd(byte buffer[], word length)
{
TcpSnd(buffer, length);
}
void ModbusRecv()
{
TcpRecv();
}
void OnTcpReceive(dword socket, long result, dword address, dword port, byte buffer[], dword size)
{
OnModbusReceive(socket, result, address, port, buffer, size);
if (result == 0 && size != 0)
TcpRecv();
}