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

This commit is contained in:
2016-11-23 15:10:40 +00:00
parent 8f6e7d2cae
commit e66e78ac16
29 changed files with 973 additions and 973 deletions

View File

@@ -1,20 +1,20 @@
/*
PIP - Platform Independent Primitives
Packets extractor
Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru
PIP - Platform Independent Primitives
Packets extractor
Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "pipacketextractor.h"
@@ -27,14 +27,14 @@
* This class implements packet recognition by various algorithms and custom
* validating from data stream. Stream is formed from child %PIIODevice
* passed from contructor or with function \a setDevice().
*
*
* \section PIPacketExtractor_work Principle of work
* %PIPacketExtractor works with child %PIIODevice. \a read and \a write
* functions directly call child device functions. You should start threaded
* read of \b extractor (not child device) to proper work. Extractor read data
* from child device, try to detect packet from readed data and raise
* \a packetReceived() event on success.
*
*
* \section PIPacketExtractor_algorithms Algorithms
* There are 6 algorithms: \n
* * PIPacketExtractor::None \n
@@ -63,13 +63,13 @@
* * PIPacketExtractor::Timeout \n
* Wait for first read, then read for \a timeout() milliseconds and raise
* \a packetReceived() event. \n
*
*
* \section PIPacketExtractor_control Control validating
* There are three parameters:
* * header content
* * header size
* * payload size
*
*
* Extractor can detect packet with compare your header with readed data.
* It is default implementation of function \a packetHeaderValidate().
* If header validating passed, function \a packetValidate() will be called.
@@ -77,10 +77,10 @@
* and takes next header. If both functions returns \b true extractor shifts
* by whole packet size.
* \image html packet_detection.png
*
*
* */
REGISTER_DEVICE(PIPacketExtractor);
REGISTER_DEVICE(PIPacketExtractor)
PIPacketExtractor::PIPacketExtractor(PIIODevice * device_, PIPacketExtractor::SplitMode mode) {