version 4.0.0_alpha

in almost all methods removed timeouts in milliseconds, replaced to PISystemTime
PITimer rewrite, remove internal impl, now only thread implementation, API similar to PIThread
PITimer API no longer pass void*
PIPeer, PIConnection improved stability on reinit and exit
PISystemTime new methods
pisd now exit without hanging
This commit is contained in:
2024-07-30 14:18:02 +03:00
parent f07c9cbce8
commit 1c7fc39b6c
58 changed files with 677 additions and 1191 deletions

View File

@@ -53,7 +53,7 @@ public:
Footer /** Detect packets with \a footer() and leading \a payloadSize() */,
HeaderAndFooter /** Detect packets with \a header() and \a footer() without \a payloadSize() */,
Size /** Detect packets with \a packetSize() */,
Timeout /** Wait for first read, then read for \a timeout() milliseconds */
Timeout /** Wait for first read, then read for \a timeout() */
};
//! Contructs extractor with child device "device_" and extract algorithm "mode"
@@ -87,8 +87,8 @@ public:
//! Set footer data, used for PIPacketExtractor::Footer and PIPacketExtractor::HeaderAndFooter algorithms
void setFooter(const PIByteArray & data);
//! Set timeout in milliseconds, used for PIPacketExtractor::Timeout algorithm
void setTimeout(double msecs) { setProperty("timeout", msecs); }
//! Set timeout, used for PIPacketExtractor::Timeout algorithm
void setTimeout(PISystemTime tm) { setProperty("timeout", tm); }
//! Returns current extract algorithm
@@ -105,7 +105,7 @@ public:
PIByteArray footer() const { return src_footer; }
//! Returns current timeout in milliseconds, used for PIPacketExtractor::Timeout algorithm
double timeout() const { return time_; }
PISystemTime timeout() const { return time_; }
//! Returns missed by validating functions bytes count
ullong missedBytes() const { return missed; }
@@ -165,7 +165,7 @@ private:
PacketExtractorFooterFunc func_footer;
SplitMode mode_;
int dataSize, packetSize_pending, footerInd;
double time_;
PISystemTime time_;
bool header_found;
ullong missed;
};