git-svn-id: svn://db.shs.com.ru/pip@561 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -383,7 +383,7 @@ endif()
|
||||
|
||||
|
||||
# Test program
|
||||
add_executable(pip_test "main.cpp" "1.cpp")
|
||||
add_executable(pip_test "main.cpp")
|
||||
target_link_libraries(pip_test pip pip_compress)
|
||||
|
||||
|
||||
|
||||
@@ -53,8 +53,8 @@ class B: public PIObject {
|
||||
PIOBJECT(B)
|
||||
public:
|
||||
B() {}
|
||||
EVENT1(eventB1, float, f);
|
||||
EVENT1(eventB2, PIString, s);
|
||||
EVENT1(eventB1, float, f)
|
||||
EVENT1(eventB2, PIString, s)
|
||||
//uchar _[0x20];
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "pip.h"
|
||||
|
||||
class Client: public PIObject {
|
||||
PIOBJECT(Client);
|
||||
PIOBJECT(Client)
|
||||
public:
|
||||
Client(PIEthernet * eth_) {
|
||||
eth = eth_;
|
||||
@@ -12,7 +12,7 @@ public:
|
||||
}
|
||||
~Client() {}
|
||||
EVENT_HANDLER2(void, readed, uchar * , data, int, size) {
|
||||
PIByteArray ba(data, size)
|
||||
PIByteArray ba(data, size);
|
||||
piCoutObj << uint(eth) << "readed" << size << "bytes" << Hex << ba;
|
||||
eth->write(ba);
|
||||
}
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
};
|
||||
|
||||
class Server: public PIObject {
|
||||
PIOBJECT(Server);
|
||||
PIOBJECT(Server)
|
||||
public:
|
||||
Server(int port) {
|
||||
eth = new PIEthernet(PIEthernet::TCP_Server);
|
||||
|
||||
Reference in New Issue
Block a user