version 4.2.0

move toStdFunction() to pibase.h
refactor PIParseHelper, now it much more abstract and useful
fix PIIODevice::createFromFullPath() when whitespaces at start or end are presence
PIStreamPacker add events for start and end packet receive
PIClientServer::ClientBase add virtual methods for start and end packet receive. also one can enable diagnostics with enableDiagnostics() method
PICout now call flush() on each end of output
add PIString::entries(const PIString & str)
This commit is contained in:
2024-10-15 12:02:18 +03:00
parent 9eecbbab6e
commit cd7e053fc5
15 changed files with 174 additions and 119 deletions

View File

@@ -56,6 +56,9 @@ public:
//! Returns packet sinature, default 0xAFBE
ushort packetSign() const { return packet_sign; }
//! Returns progress of current packet receive in bytes
int receivePacketProgress() const { return packet.size_s(); }
//! Set receive aggressive optimization. If yes then %PIStreamPacker doesn`t
//! check every byte in incoming stream but check only begin of each read()
@@ -90,6 +93,8 @@ public:
void assignDevice(PIIODevice * dev);
EVENT1(packetReceiveEvent, PIByteArray &, data);
EVENT1(startPacketReceive, int, size);
EVENT0(endPacketReceive);
EVENT1(sendRequest, PIByteArray, data);
//! \handlers
@@ -107,6 +112,12 @@ public:
//! \fn void packetReceiveEvent(PIByteArray data)
//! \brief Raise on packet successfully received
//! \fn void startPacketReceive(int size)
//! \brief Raise on start receive packet with overall size \"size\"
//! \fn void endPacketReceive()
//! \brief Raise on finish receive packet
//! \fn void sendRequest(PIByteArray data)
//! \brief Raise from \a send() function. This data should
//! be directly sended to your device. You can