Brief description of class still missing. More...
#include <SystemLink.h>
Public Member Functions | |
| void | addComment (const QString &c) |
| void | clearUsb () |
| void | comments () |
| void | diskSpace () |
| void | highRateRefresh () |
| void | powerOff () |
| void | reboot () |
| SystemLink (Station *station) | |
Protected Member Functions | |
| virtual int | bytesAvailable (const char *buffer, int bytesCount) |
Brief description of class still missing.
Full description of class still missing
| SystemLink::SystemLink | ( | Station * | station | ) |
Description of constructor still missing
References DaemonLink::setPort(), and TRACE.
: DaemonLink(station) { TRACE; setPort(2978); _refresh.setInterval(10000); // 10 s during startup QObject::connect(&_refresh, SIGNAL(timeout()), this, SLOT(refreshVariableParameters())); _refresh.start(); }
| void SystemLink::addComment | ( | const QString & | c | ) |
References DaemonLink::send(), and TRACE.
Referenced by Station::addComment().
| int SystemLink::bytesAvailable | ( | const char * | buffer, |
| int | bytesCount | ||
| ) | [protected, virtual] |
Implements DaemonLink.
References bytesAvailable(), comments(), diskSpace(), DaemonLink::match(), and TRACE.
Referenced by bytesAvailable().
{
TRACE;
int bytesRead=0;
while(bytesRead<bytesCount) {
// Scan for a line
int newBytesRead;
for(newBytesRead=bytesRead; newBytesRead<bytesCount && buffer[newBytesRead]!='\n'; newBytesRead++) {}
if(newBytesRead==bytesCount) {
return bytesRead; // partial line
}
newBytesRead=bytesRead;
switch(buffer[bytesRead]) {
case 'c':
if(match(buffer, newBytesRead, bytesCount, "comments=")) {
if(!comments(buffer, newBytesRead, bytesCount)) {
return bytesRead;
}
}
break;
case 'd':
if(match(buffer, newBytesRead, bytesCount, "diskspace=")) {
diskSpace(buffer, newBytesRead, bytesCount);
}
break;
case 'h':
if(match(buffer, newBytesRead, bytesCount, "halting")) {
halting(buffer, newBytesRead, bytesCount);
}
break;
default:
break;
}
bytesRead=newBytesRead+1;
// Skip blanks and additionnal end of line characters
while(bytesRead<bytesCount && isspace(buffer[bytesRead])) {bytesRead++;}
}
return bytesRead;
}
| void SystemLink::clearUsb | ( | ) |
References DaemonLink::send(), and TRACE.
Referenced by Station::clearUsb().
| void SystemLink::comments | ( | ) |
References DaemonLink::send(), and TRACE.
Referenced by bytesAvailable(), and Station::requestComments().
| void SystemLink::diskSpace | ( | ) |
References DaemonLink::send(), and TRACE.
Referenced by bytesAvailable().
| void SystemLink::highRateRefresh | ( | ) |
{
_refresh.setInterval(10000); // 10 s during startup
}
| void SystemLink::powerOff | ( | ) |
References DaemonLink::send(), and TRACE.
Referenced by Station::powerOff().
| void SystemLink::reboot | ( | ) |
References DaemonLink::send(), and TRACE.
Referenced by Station::reboot().