17.10.2013 - Adjusted for QNX, PIPeer release for Windows, Remote console

This commit is contained in:
peri4
2013-10-17 16:12:10 +04:00
parent 4b90f2818e
commit 0f1b528ac6
42 changed files with 585 additions and 171 deletions

View File

@@ -356,7 +356,10 @@ void PIConsole::run() {
const void * ptr = 0;
if (tv.remote) {
if (tv.type == 0) {
rstr << PIByteArray(tv.rdata);
rstr.clear();
PIByteArray tba(tv.rdata);
tba >> rstr;
rstr.trim();
ptr = &rstr;
} else
ptr = tv.rdata.data();
@@ -380,12 +383,13 @@ void PIConsole::run() {
case 14: clen = printValue(bitsValue(ptr, tv.bitFrom, tv.bitCount), tv.format); break;
}
if (clen + tv.offset < (uint)col_wid) {
PIString ts = PIString(
#if defined(QNX) || defined(FREE_BSD)
string ts = PIString(col_wid - clen - tv.offset - 1, ' ').stdString();
col_wid - clen - tv.offset - 1, ' ');
#else
string ts = PIString(col_wid - clen - tv.offset, ' ').stdString();
col_wid - clen - tv.offset, ' ');
#endif
printf("%s", ts.c_str());
printf("%s", ts.data());
}
newLine();
}
@@ -878,6 +882,7 @@ void PIConsole::peerReceived(const PIString & from, const PIByteArray & data) {
void PIConsole::peerTimer(void * data, int delim) {
if (peer == 0) return;
//piCout << "timer" << delim;
if (server_mode) {
if (delim == 20)
serverSendInfo();