diff --git a/Makefile b/Makefile index 601649d..5b83757 100644 --- a/Makefile +++ b/Makefile @@ -78,12 +78,10 @@ dep: buildwindows: clean make configcross make $(TARGET) -j 9 - make test-fc15 - make test-fc16 mkdir TestModbus-Client-$(VERSION) cp *.exe TestModbus-Client-$(VERSION)/ - cp testmodbus-server.ui TestModbus-Client-$(VERSION)/ - cp testmodbus-server.png TestModbus-Client-$(VERSION)/ + cp testmodbus-client.ui TestModbus-Client-$(VERSION)/ + cp testmodbus-client.png TestModbus-Client-$(VERSION)/ cp README.md TestModbus-Client-$(VERSION)/ cp Changelog TestModbus-Client-$(VERSION)/ cp LICENSE TestModbus-Client-$(VERSION)/ diff --git a/modbus.cc b/modbus.cc index 12c127c..ae113bf 100644 --- a/modbus.cc +++ b/modbus.cc @@ -4,11 +4,18 @@ // ///////////////////////////////////////////////////////////////////////////////// +#include "tcp.h" +#include "modbus.h" + #include #include #include #include -#include "modbus.h" + +#if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__) +#else + #include /* close() */ +#endif #define PACK_INT8(__dstptr, __srci8) \ memcpy(__dstptr, &__srci8, 1); \ diff --git a/modbus.h b/modbus.h index cbe776a..70eba7f 100644 --- a/modbus.h +++ b/modbus.h @@ -9,7 +9,6 @@ #include #include -#include /* * this file will only contain the encoding and decoding functions diff --git a/nwthread.cc b/nwthread.cc index 08927d2..4b0b816 100644 --- a/nwthread.cc +++ b/nwthread.cc @@ -4,19 +4,20 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include -#include -#include - -#include -#include - +#include "tcp.h" +#include #if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__) #else #include /* close() */ #endif +#include +#include /* memset() */ +#include +#include +#include +#include +#include -#include "tcp.h" #include "nwthread.h" #include "client.h" diff --git a/tcp.h b/tcp.h index 52b6914..6535e1c 100644 --- a/tcp.h +++ b/tcp.h @@ -50,6 +50,10 @@ #include +#if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__) +#define usleep(_us_) Sleep(_us_/1000) +#endif + using namespace std; #define SOCKET int diff --git a/testmodbus-client.png b/testmodbus-client.png new file mode 100644 index 0000000..464642d Binary files /dev/null and b/testmodbus-client.png differ diff --git a/testmodbus-client.ui b/testmodbus-client.ui index b456f24..95083a9 100644 --- a/testmodbus-client.ui +++ b/testmodbus-client.ui @@ -11,6 +11,7 @@ False + testmodbus-client.png