26#ifdef JEVOIS_PLATFORM_PRO 
   29  try { freq = std::stoi(
jevois::getFileString(
"/sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq")) / 1000; }
 
   37  try { freq = std::stoi(
jevois::getFileString(
"/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq")) / 1000; }
 
   46  if (temp > 200) temp /= 1000;
 
   49  return "CPU: " + std::to_string(freq) + 
"MHz, " + std::to_string(temp) + 
"C, load: " + load;
 
 
   56  bool BothAreSpaces(
char lhs, 
char rhs) { 
return (lhs == rhs) && (lhs == 
' '); }
 
   58  void cleanSpaces(std::string & str)
 
   60    std::string::iterator new_end = std::unique(str.begin(), str.end(), BothAreSpaces);
 
   61    str.erase(new_end, str.end());   
 
   70  return memtotal + 
", " + memfree;
 
 
   79  size_t pos = ver.find(
' ');
 
   80  pos = ver.find(
' ', pos + 1);
 
   81  pos = ver.find(
' ', pos + 1);
 
   83  return ver.substr(0, pos);
 
 
   95    catch (...) { 
break; }
 
  104  try { n += std::stoi(
jevois::system(
"/usr/bin/lsusb | /usr/bin/grep 1a6e:089a | /usr/bin/wc -l")); } 
catch (...) { }
 
  106  try { n += std::stoi(
jevois::system(
"/usr/bin/lsusb | /usr/bin/grep 18d1:9302 | /usr/bin/wc -l")); } 
catch (...) { }
 
 
  119  try { n += std::stoi(
jevois::system(
"/usr/bin/lsusb | /usr/bin/grep 03e7:2485 | /usr/bin/wc -l")); } 
catch (...) { }
 
  121  try { n += std::stoi(
jevois::system(
"/usr/bin/lsusb | /usr/bin/grep 03e7:f63b | /usr/bin/wc -l")); } 
catch (...) { }
 
 
  130#ifdef JEVOIS_PLATFORM_PRO 
 
  144    try { 
jevois::getFileString((
"/sys/class/hailo_chardev/hailo" + std::to_string(n) + 
"/device_id").c_str()); }
 
  145    catch (...) { 
break; }
 
 
  155#ifdef JEVOIS_PLATFORM_PRO 
  160    if (period == 0) 
return 100;
 
  161    return 100 * duty / period;
 
 
std::string getSysInfoCPU()
Get CPU info: frequency, thermal, load.
std::string getSysInfoMem()
Get memory info.
std::string getSysInfoVersion()
Get O.S. version info.
std::string getFileString(char const *fname, int skip=0)
Read one line from a file and return it as a string.
std::string system(std::string const &cmd, bool errtoo=true)
Execute a command and grab stdout output to a string.
size_t getNumInstalledVPUs()
Get the number of Myriad-X VPUs present on this system.
int getFanSpeed()
Get fan speed in percent, only meaningful on JeVois-Pro Platform, all others return 0.
size_t getNumInstalledNPUs()
Get the number of JeVois-Pro NPUs present on this system.
size_t getNumInstalledTPUs()
Get the number of Coral TPUs present on this system.
size_t getNumInstalledSPUs()
Get the number of Hailo8 SPUs present on this system.