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

This commit is contained in:
2018-09-28 19:22:34 +00:00
parent 452350fcd9
commit 052fe86633
901 changed files with 23068 additions and 4078 deletions

View File

@@ -20,10 +20,28 @@
#include "pistreampacker.h"
#include "piiodevice.h"
/** \class PIStreamPacker
* \brief Simple packet wrap aroud any PIIODevice
*
* \section PIStreamPacker_synopsis Synopsis
* %PIStreamPacker provides simple pack/unpack logic for any data packets.
*
* When you call \a send() function data splited into several
* parts, \a packetSign() prepended to first part and \a sendRequest()
* event raised several times.
*
* When your device receive some data, call \a received() function.
* \a packetReceiveEvent() event will be raised when packet will be
* collected.
*
* Use \a assignDevice() to connect device to this %PIStreamPacker.
*
*/
PIStreamPacker::PIStreamPacker(PIIODevice * dev): PIObject() {
packet_size = -1;
max_packet_size = 1000;
max_packet_size = 1400;
packet_sign = 0xAFBE;
assignDevice(dev);
}