15.12.2011 - version 0.1.1
This commit is contained in:
@@ -253,6 +253,7 @@ void PIConsole::begin() {
|
||||
|
||||
void PIConsole::run() {
|
||||
uint cx, clen = 0;
|
||||
int j;
|
||||
#ifdef WINDOWS
|
||||
GetConsoleScreenBufferInfo(hOut, &sbi);
|
||||
width = sbi.srWindow.Right - sbi.srWindow.Left;
|
||||
@@ -275,7 +276,10 @@ void PIConsole::run() {
|
||||
cx = col_wid * i;
|
||||
toUpperLeft();
|
||||
if (my < vars()[i].size()) my = vars()[i].size();
|
||||
j = 0;
|
||||
piForeachC (Variable & tv, vars()[i]) {
|
||||
if (j > height - 3) continue;
|
||||
j++;
|
||||
moveRight(cx);
|
||||
if (tv.type == 0 && tv.s == 0) {
|
||||
newLine();
|
||||
@@ -333,6 +337,7 @@ void PIConsole::fillLabels() {
|
||||
cy = 1;
|
||||
toUpperLeft();
|
||||
for (uint j = 0; j < vars()[i].size(); ++j) {
|
||||
if (int(j) > height - 3) continue;
|
||||
if (my < j) my = j;
|
||||
moveRight(cx);
|
||||
tv = vars()[i][j];
|
||||
@@ -446,6 +451,8 @@ void PIConsole::addVariable(const PIString & name, PIProtocol * ptr, int column,
|
||||
addVariable("Immediate Frequency, Hz", ptr->immediateFrequency_ptr(), column, format);
|
||||
addVariable("Integral Frequency, Hz", ptr->integralFrequency_ptr(), column, format);
|
||||
addVariable("Disconnect Timeout, s", ptr->disconnectTimeout_ptr(), column, format);
|
||||
addVariable("Receiver history size", ptr->receiverHistorySize_ptr(), column, format);
|
||||
addVariable("Sender history size", ptr->senderHistorySize_ptr(), column, format);
|
||||
addVariable("Quality", ptr->quality_ptr(), column, format);
|
||||
}
|
||||
void PIConsole::addVariable(const PIString & name, PISystemMonitor * ptr, int column, PIFlags<PIConsole::Format> format) {
|
||||
|
||||
Reference in New Issue
Block a user