TSDuck v3.38-3696
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::SysInfo Class Reference

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

#include <tsSysInfo.h>

Public Member Functions

UString cpuName () const
 Get the name of the CPU architecure.
 
bool crcInstructions () const
 Check if the CPU supports accelerated instructions for CRC32 computation.
 
UString hostName () const
 Get the name of the system host.
 
bool isArm32 () const
 Check if the CPU is Arm-32.
 
bool isArm64 () const
 Check if the CPU is Arm-64, also known as aarch64.
 
bool isBSD () const
 Check if the running operating system is a BSD system (FreeBSD, NetBSD, OpenBSD, DragonFlyBSD).
 
bool isDebian () const
 Check if the running operating system is Linux Debian.
 
bool isDragonFlyBSD () const
 Check if the running operating system is DragonFlyBSD.
 
bool isFedora () const
 Check if the running operating system is Fedora Linux.
 
bool isFreeBSD () const
 Check if the running operating system is FreeBSD.
 
bool isIntel32 () const
 Check if the CPU is Intel IA-32, also known as x86.
 
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.
 
bool isLinux () const
 Check if the running operating system is Linux.
 
bool isMacOS () const
 Check if the running operating system is macOS.
 
bool isMIPS32 () const
 Check if the CPU is 32-bit MIPS.
 
bool isMIPS64 () const
 Check if the CPU is 64-bit MIPS.
 
bool isNetBSD () const
 Check if the running operating system is NetBSD.
 
bool isOpenBSD () const
 Check if the running operating system is OpenBSD.
 
bool isPPC32 () const
 Check if the CPU is 32-bit PowerPC.
 
bool isPPC64 () const
 Check if the CPU is 64-bit PowerPC.
 
bool isRaspbian () const
 Check if the running operating system is Linux Raspbian (Debian derivative on Raspberry Pi).
 
bool isRedHat () const
 Check if the running operating system is RedHat Entreprise Linux or one of its clone such as AlmaLinux.
 
bool isRISCV64 () const
 Check if the CPU is 64-bit RISC-V.
 
bool isS390x () const
 Check if the CPU is 64-bit IBM s390x.
 
bool isUbuntu () const
 Check if the running operating system is Linux Ubuntu.
 
bool isWindows () const
 Check if the running operating system is Windows.
 
size_t memoryPageSize () const
 Get system memory page size.
 
int systemMajorVersion () const
 Get the operating system major version as an integer.
 
UString systemName () const
 Get the operating system name.
 
UString systemVersion () const
 Get the operating system version.
 

Static Public Member Functions

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

Detailed Description

A singleton holding information on the current operating system.

Member Function Documentation

◆ Instance()

static SysInfo & ts::SysInfo::Instance ( )
inlinestatic

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.

◆ isBSD()

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

Check if the running operating system is a BSD system (FreeBSD, NetBSD, OpenBSD, DragonFlyBSD).

Returns
True if the running operating system is FreeBSD.

◆ isFreeBSD()

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

Check if the running operating system is FreeBSD.

Returns
True if the running operating system is FreeBSD.

◆ isNetBSD()

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

Check if the running operating system is NetBSD.

Returns
True if the running operating system is NetBSD.

◆ isOpenBSD()

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

Check if the running operating system is OpenBSD.

Returns
True if the running operating system is OpenBSD.

◆ isDragonFlyBSD()

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

Check if the running operating system is DragonFlyBSD.

Returns
True if the running operating system is DragonFlyBSD.

◆ 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.

On Windows, this describes the actual CPU. The compiled code can be 32-bit, running on a 64-bit system.

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

◆ isArm32()

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

Check if the CPU is Arm-32.

Returns
True if the CPU is Arm-32.

◆ isArm64()

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

Check if the CPU is Arm-64, also known as aarch64.

Returns
True if the CPU is Arm-64.

◆ isRISCV64()

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

Check if the CPU is 64-bit RISC-V.

Returns
True if the CPU is 64-bit RISC-V.

◆ isS390x()

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

Check if the CPU is 64-bit IBM s390x.

Returns
True if the CPU is 64-bit IBM s390x.

◆ isPPC32()

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

Check if the CPU is 32-bit PowerPC.

Returns
True if the CPU is 32-bit PowerPC.

◆ isPPC64()

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

Check if the CPU is 64-bit PowerPC.

Returns
True if the CPU is 64-bit PowerPC.

◆ isMIPS32()

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

Check if the CPU is 32-bit MIPS.

Returns
True if the CPU is 32-bit MIPS.

◆ isMIPS64()

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

Check if the CPU is 64-bit MIPS.

Returns
True if the CPU is 64-bit MIPS.

◆ crcInstructions()

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

Check if the CPU supports accelerated instructions for CRC32 computation.

Returns
True if the CPU supports CRC32 instructions.

◆ systemVersion()

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

Get the operating system version.

Returns
The operating system version.

◆ systemMajorVersion()

int ts::SysInfo::systemMajorVersion ( ) const
inline

Get the operating system major version as an integer.

The exact meaning of this number is system dependent.

Returns
The operating system major version or -1 if unknown.

◆ 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: