TSDuck Version 3.32-2769 (TSDuck - The MPEG Transport Stream Toolkit)
ts::SysInfo Class Reference

A singleton holding information on the current operating system. More...

Public Member Functions

UString cpuName () const
 Get the name of the CPU architecure. More...
 
UString hostName () const
 Get the name of the system host. More...
 
bool isDebian () const
 Check if the running operating system is Linux Debian. More...
 
bool isFedora () const
 Check if the running operating system is Fedora Linux. More...
 
bool isIntel32 () const
 Check if the CPU is Intel IA-32, also known as x86. More...
 
bool isIntel64 () const
 Check if the CPU is the 64-bit extension of the IA-32 architecture, also known as AMD-64 or Intel x86-64. More...
 
bool isLinux () const
 Check if the running operating system is Linux. More...
 
bool isMacOS () const
 Check if the running operating system is macOS. More...
 
bool isRaspbian () const
 Check if the running operating system is Linux Raspbian (Debian derivative on Raspberry Pi). More...
 
bool isRedHat () const
 Check if the running operating system is RedHat Entreprise Linux or one of its clone such as AlmaLinux. More...
 
bool isUbuntu () const
 Check if the running operating system is Linux Ubuntu. More...
 
bool isWindows () const
 Check if the running operating system is Windows. More...
 
size_t memoryPageSize () const
 Get system memory page size. More...
 
UString systemName () const
 Get the operating system name. More...
 
UString systemVersion () const
 Get the operating system version. More...
 

Static Public Member Functions

static SysInfoInstance ()
 Get the instance of the singleton of this class. More...
 

Detailed Description

A singleton holding information on the current operating system.

Member Function Documentation

◆ Instance()

static SysInfo* ts::SysInfo::Instance ( )
static

Get the instance of the singleton of this class.

Returns
The instance of the singleton of this class.

◆ isLinux()

bool ts::SysInfo::isLinux ( ) const
inline

Check if the running operating system is Linux.

Returns
True if the running operating system is Linux.

◆ isFedora()

bool ts::SysInfo::isFedora ( ) const
inline

Check if the running operating system is Fedora Linux.

Returns
True if the running operating system is Fedora Linux.

◆ isRedHat()

bool ts::SysInfo::isRedHat ( ) const
inline

Check if the running operating system is RedHat Entreprise Linux or one of its clone such as AlmaLinux.

Returns
True if the running operating system is RedHat.

◆ isUbuntu()

bool ts::SysInfo::isUbuntu ( ) const
inline

Check if the running operating system is Linux Ubuntu.

Returns
True if the running operating system is Linux Ubuntu.

◆ isDebian()

bool ts::SysInfo::isDebian ( ) const
inline

Check if the running operating system is Linux Debian.

Note that Ubuntu is not considered a real Debian.

Returns
True if the running operating system is Linux Debian.

◆ isRaspbian()

bool ts::SysInfo::isRaspbian ( ) const
inline

Check if the running operating system is Linux Raspbian (Debian derivative on Raspberry Pi).

Returns
True if the running operating system is Linux Debian.

◆ isMacOS()

bool ts::SysInfo::isMacOS ( ) const
inline

Check if the running operating system is macOS.

Returns
True if the running operating system is macOS.

◆ isWindows()

bool ts::SysInfo::isWindows ( ) const
inline

Check if the running operating system is Windows.

Returns
True if the running operating system is Windows.

◆ isIntel32()

bool ts::SysInfo::isIntel32 ( ) const
inline

Check if the CPU is Intel IA-32, also known as x86.

Returns
True if the CPU is Intel IA-32.

◆ isIntel64()

bool ts::SysInfo::isIntel64 ( ) const
inline

Check if the CPU is the 64-bit extension of the IA-32 architecture, also known as AMD-64 or Intel x86-64.

Returns
True if the CPU is the 64-bit extension of IA-32.

◆ systemVersion()

UString ts::SysInfo::systemVersion ( ) const
inline

Get the operating system version.

Returns
The operating system version.

◆ systemName()

UString ts::SysInfo::systemName ( ) const
inline

Get the operating system name.

Returns
The operating system name.

◆ hostName()

UString ts::SysInfo::hostName ( ) const
inline

Get the name of the system host.

Returns
The name of the system host.

◆ cpuName()

UString ts::SysInfo::cpuName ( ) const
inline

Get the name of the CPU architecure.

Returns
The name of the CPU architecure.

◆ memoryPageSize()

size_t ts::SysInfo::memoryPageSize ( ) const
inline

Get system memory page size.

Returns
The system memory page size in bytes.

The documentation for this class was generated from the following file: