HostInfo.hpp 892 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. ///
  2. /// \file System/HostInfo.hpp
  3. ///
  4. /// Support for querying information about a host's configuration.
  5. ///
  6. /// \copyright
  7. /// Copyright (c) 2013-2016 Josh Blum
  8. /// SPDX-License-Identifier: BSL-1.0
  9. ///
  10. #pragma once
  11. #include <Pothos/Config.hpp>
  12. #include <cstddef>
  13. #include <string>
  14. namespace Pothos {
  15. namespace System {
  16. /*!
  17. * HostInfo contains various OS and network node identification.
  18. */
  19. class POTHOS_API HostInfo
  20. {
  21. public:
  22. /*!
  23. * Create an empty HostInfo
  24. */
  25. HostInfo(void);
  26. /*!
  27. * Query the node information.
  28. */
  29. static HostInfo get(void);
  30. std::string osName;
  31. std::string osVersion;
  32. std::string osArchitecture;
  33. std::string nodeName;
  34. std::string nodeId;
  35. //! The number of CPUs on this system
  36. size_t processorCount;
  37. //! The process id of the caller
  38. std::string pid;
  39. };
  40. } //namespace System
  41. } //namespace Pothos