git-svn-id: svn://db.shs.com.ru/pip@561 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-11-27 08:49:22 +00:00
parent 1e1f0e9778
commit 6cd7c12d66
3 changed files with 6 additions and 6 deletions

View File

@@ -383,7 +383,7 @@ endif()
# Test program # Test program
add_executable(pip_test "main.cpp" "1.cpp") add_executable(pip_test "main.cpp")
target_link_libraries(pip_test pip pip_compress) target_link_libraries(pip_test pip pip_compress)

View File

@@ -53,8 +53,8 @@ class B: public PIObject {
PIOBJECT(B) PIOBJECT(B)
public: public:
B() {} B() {}
EVENT1(eventB1, float, f); EVENT1(eventB1, float, f)
EVENT1(eventB2, PIString, s); EVENT1(eventB2, PIString, s)
//uchar _[0x20]; //uchar _[0x20];
}; };

View File

@@ -1,7 +1,7 @@
#include "pip.h" #include "pip.h"
class Client: public PIObject { class Client: public PIObject {
PIOBJECT(Client); PIOBJECT(Client)
public: public:
Client(PIEthernet * eth_) { Client(PIEthernet * eth_) {
eth = eth_; eth = eth_;
@@ -12,7 +12,7 @@ public:
} }
~Client() {} ~Client() {}
EVENT_HANDLER2(void, readed, uchar * , data, int, size) { EVENT_HANDLER2(void, readed, uchar * , data, int, size) {
PIByteArray ba(data, size) PIByteArray ba(data, size);
piCoutObj << uint(eth) << "readed" << size << "bytes" << Hex << ba; piCoutObj << uint(eth) << "readed" << size << "bytes" << Hex << ba;
eth->write(ba); eth->write(ba);
} }
@@ -32,7 +32,7 @@ public:
}; };
class Server: public PIObject { class Server: public PIObject {
PIOBJECT(Server); PIOBJECT(Server)
public: public:
Server(int port) { Server(int port) {
eth = new PIEthernet(PIEthernet::TCP_Server); eth = new PIEthernet(PIEthernet::TCP_Server);