threadedRead now const uchar *
pipacketextractor Header mode now more flexible fix splitTime mode more refactoring add virtual override to functions remove piforeach replace 0 to nullptr iterate over pimap via iterators replace CONNECTU to CONNECT# with compile time check
This commit is contained in:
@@ -40,17 +40,17 @@ public:
|
||||
if (test_) {
|
||||
testt.setCRCEnabled(false);
|
||||
testt.setName("TEST");
|
||||
CONNECTU(&testt, sendRequest, this, ftsend);
|
||||
CONNECT1(void, PIByteArray &, &testt, sendRequest, this, ftsend);
|
||||
} else {
|
||||
ft.setPacketSize(65000);
|
||||
ft.setName("PIFT");
|
||||
CONNECTU(&ft, sendRequest, this, ftsend);
|
||||
CONNECT1(void, PIByteArray &, &ft, sendRequest, this, ftsend);
|
||||
CONNECTU(&ft, sendFilesStarted, this, ftevent);
|
||||
CONNECTU(&ft, receiveFilesStarted, this, ftevent);
|
||||
CONNECTU(&ft, sendFilesFinished, this, ftevent);
|
||||
CONNECTU(&ft, receiveFilesFinished, this, ftevent);
|
||||
}
|
||||
CONNECTU(ð, threadedReadEvent, this, received);
|
||||
CONNECT2(void, const uchar *, int, ð, threadedReadEvent, this, received);
|
||||
start(50);
|
||||
eth.setParameter(PIEthernet::SeparateSockets);
|
||||
eth.startThreadedRead();
|
||||
@@ -136,7 +136,7 @@ private:
|
||||
eth.send(data);
|
||||
}
|
||||
|
||||
EVENT_HANDLER2(void, received, uchar * , readed, int, size) {
|
||||
EVENT_HANDLER2(void, received, const uchar * , readed, int, size) {
|
||||
PIByteArray ba(readed, size);
|
||||
if(test_) {
|
||||
testt.received(ba);
|
||||
|
||||
Reference in New Issue
Block a user