platform
========

.. py:module:: platform


Attributes
----------

.. autoapisummary::

   platform.KNOWLEDGE_BASE


Classes
-------

.. autoapisummary::

   platform.Platform


Module Contents
---------------

.. py:data:: KNOWLEDGE_BASE

.. py:class:: Platform

   Bases: :py:obj:`collections.namedtuple`\ (\ :py:obj:`'Platform'`\ , [\ :py:obj:`'cpu'`\ , :py:obj:`'os'`\ , :py:obj:`'is_hie'`\ , :py:obj:`'platform'`\ , :py:obj:`'triplet'`\ , :py:obj:`'machine'`\ , :py:obj:`'domain'`\ , :py:obj:`'is_host'`\ , :py:obj:`'is_default'`\ ]\ )


   Class that allow user to retrieve os/cpu specific information.

   Attributes are:

   - cpu: CPU information
   - os: Operating System information
   - is_hie: whether the system is a high integrity system
   - platform: the platform name, e.g. arm-elf-linux
   - triplet: the GCC target
   - machine: machine name
   - domain: domain name
   - is_host: True if the instance represent information for the current
       machine
   - is_default: True if the platform is the default one


   .. py:attribute:: default_arch
      :type:  Platform | None
      :value: None



   .. py:attribute:: system_info


   .. py:attribute:: __slots__
      :value: ()



   .. py:method:: get(platform_name: str | None = None, version: str | None = None, machine: str | None = None, mode: str | None = None, compute_default: bool = False, cores: int | None = None) -> Platform
      :classmethod:


      Return a Platform object.

      :param platform_name: if None or empty then automatically detect
          current platform (native). Otherwise should be a valid platform
          string.
      :param version:  if None, assume default OS version or find it
          automatically (native case only). Otherwise should be a valid
          version string.
      :param machine: name of the machine
      :param mode: an os mode (ex: rtp for vxworks)
      :param compute_default: if True compute the default Arch for the
          current machine (this parameter is for internal purpose only).
      :param cores: if not None force a number of apparent cores



   .. py:method:: to_dict(full_os_version: bool = False) -> dict[str, Any]

      Export os and cpu variables as os_{var} and cpu_{var}.

      :param full_os_version: False by default. If True, use the full os version as
          OS version (with major, minor etc...) if available. Otherwize, use a
          potential partial OS version.

      :return: a dictionary representing the current Arch instance



   .. py:method:: __str__() -> str

      Return a representation string of the object.



