many changes, need testing

rewrite PIDiagnostics, but not fully testing
change PIQueue to PIDeque
many fixes in PIBaseTransfer, it will be threadsafe and stable


git-svn-id: svn://db.shs.com.ru/pip@187 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2016-04-12 04:24:57 +00:00
parent 741615b9d3
commit b93205f175
10 changed files with 462 additions and 202 deletions

View File

@@ -121,8 +121,11 @@ private:
PITimeMeasurer send_tm, pause_tm;
PacketHeader header;
CRC_16 crc;
int replies_cnt, send_queue;
int send_queue;
PIDiagnostics diag;
PIMutex mutex_session;
PIMutex mutex_send;
PIMutex mutex_header;
void processData(int id, PIByteArray &data);
PIByteArray build_packet(int id);
@@ -132,7 +135,6 @@ private:
bool getStartRequest();
bool finish_send(bool ok);
void finish_receive(bool ok, bool quet = false);
EVENT_HANDLER2(void, diagChanged, PIDiagnostics::Quality, new_quality, PIDiagnostics::Quality, old_quality);
};
inline PIByteArray & operator <<(PIByteArray & s, const PIBaseTransfer::PacketHeader & v) {s << v.sig << v.type << v.session_id << v.id << v.crc; return s;}