You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.
Power Reading:
Current Power Reading (Watts): 120
Min Power Reading (Watts): 87
Max Power Reading (Watts): 22
Average Power Reading (Watts): 112
Reading Time Stamp: Fri Aug 24 06:00:27 2012
Reporting Period (seconds): 80729
The text was updated successfully, but these errors were encountered:
I find sample->max is samller than sample->min when i call function getSample(); but not every time.
Testcode code as follows:
nmprk::translation::sample_t* sample;
try {
sample = nmprk::translation::getSample(&d,nmprk::translation::samplePower,nmprk::translation::domainSystem,NULL);
}catch(nmprk::nmprkException* e) {
std::cout << "Failed!\nCaught Exception getSample(power): Code[" << e->errorCode << "] MSG[" << e->errorMsg << "]\n";
return -1;
}
if(sample != NULL) {
std::cout << "Power Reading:\n";
std::cout << "\tCurrent Power Reading (Watts): " << sample->cur << std::endl;
std::cout << "\tMin Power Reading (Watts): " << sample->min << std::endl;
std::cout << "\tMax Power Reading (Watts): " << sample->max << std::endl;
std::cout << "\tAverage Power Reading (Watts): " << sample->avg << std::endl;
std::cout << "\tReading Time Stamp: " << asctime(&sample->timestamp) << std::endl;
std::cout << "\tReporting Period (seconds): " << sample->statReportingPeriod << std::endl;
}else{
std::cout << "Unable to sample power reading!\n";
return -1;
}
Print message as follows:
Power Reading:
Current Power Reading (Watts): 120
Min Power Reading (Watts): 87
Max Power Reading (Watts): 22
Average Power Reading (Watts): 112
Reading Time Stamp: Fri Aug 24 06:00:27 2012
Reporting Period (seconds): 80729
The text was updated successfully, but these errors were encountered: