Skip to content

UOperatingSystemMBB

#include <OperatingSystemSimulator/Public/Hardware/OperatingSystemMBB.h>
class UOperatingSystemMBB

Defined in OperatingSystemMBB.h:22

Inherits: UOperatingSystemBaseHardware

---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemMBB["UOperatingSystemMBB"]
  class UOperatingSystemBaseHardware["UOperatingSystemBaseHardware"]
  UOperatingSystemBaseHardware <|-- UOperatingSystemMBB
---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemMBB["UOperatingSystemMBB"]
  class UOperatingSystemBIOS["UOperatingSystemBIOS"]
  UOperatingSystemMBB *-- UOperatingSystemBIOS
  class EOperatingSystemCommonSizes["EOperatingSystemCommonSizes"]
  UOperatingSystemMBB ..> EOperatingSystemCommonSizes
  class UOperatingSystemBaseDevice["UOperatingSystemBaseDevice"]
  UOperatingSystemMBB *-- UOperatingSystemBaseDevice
---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemMBB {
    +UOperatingSystemMBB()
    +ClockTick() const
    +TryOpenBIOS() bool
    +GetParentDevice() const UOperatingSystemBaseDevice() &
    +GetBIOS() const UOperatingSystemBIOS() &
    +IsCpuSocketSupported(const FGameplayTag &CpuSocketTag) const bool
    +CanOpenBIOS() const bool
    +GetMaxCpuSpeed() const float
    +IsRamSizeSupported(const EOperatingSystemCommonSizes TestSize) bool
    +CreateMotherboard(UOperatingSystemBaseDevice *OwningDevice, F UOperatingSystemMBB() *
    +BiosClass : TSoftClassPtr< UOperatingSystemBIOS() >
    +MaxCpuSpeed : float
    +SupportedCpuSockets : FGameplayTagContainer
    +MaxSupportedRamSize : EOperatingSystemCommonSizes()
    +SupportedDevices : FGameplayTagContainer
    +BIOS : TObjectPtr< UOperatingSystemBIOS() >
    +ParentDevice : TWeakObjectPtr< UOperatingSystemBaseDevi
    +OnValidate(FGenericError &OutError) const override bool
    +Internal_Initialize(FGenericError &OutError) bool
    +Internal_OnDeviceStateChanged(const EOperatingSystemDeviceState &Previous
  }

Documented call sites inside the plugin (4):

flowchart LR
  UOperatingSystemMBB__GetParentDevice["UOperatingSystemMBB::GetParentDevice"]
  UOperatingSystemCPU__CreateCPU["UOperatingSystemCPU::CreateCPU"]
  UOperatingSystemCPU__CreateCPU --> UOperatingSystemMBB__GetParentDevice
  UOperatingSystemGPU__CreateGPU["UOperatingSystemGPU::CreateGPU"]
  UOperatingSystemGPU__CreateGPU --> UOperatingSystemMBB__GetParentDevice
  UOperatingSystemHDD__CreateHDD["UOperatingSystemHDD::CreateHDD"]
  UOperatingSystemHDD__CreateHDD --> UOperatingSystemMBB__GetParentDevice
  UOperatingSystemRAM__CreateRAM["UOperatingSystemRAM::CreateRAM"]
  UOperatingSystemRAM__CreateRAM --> UOperatingSystemMBB__GetParentDevice

Represents the operating system motherboard.

The UOperatingSystemMBB class is a child class of UOperatingSystemBaseHardware and represents the operating system motherboard. It provides functionality to manage the BIOS, supported CPU sockets, supported devices, clock tick, validation, and more.

ReturnNameDescription
UOperatingSystemMBB
voidClockTick constPerforms a clock tick on the operating system motherboard.
boolTryOpenBIOSThis method is used to try opening the BIOS. If it is possible to open the BIOS, it will call the OpenBIOS method and return true. Otherwise, it will return false.
UOperatingSystemBaseDevice &GetParentDevice constRetrieves the parent device actor associated with this operating system motherboard.
UOperatingSystemBIOS &GetBIOS constReturns the BIOS of the operating system motherboard. This method retrieves and returns the BIOS of the operating system motherboard.
boolIsCpuSocketSupported constChecks if the provided CPU socket tag is supported by the operating system motherboard. The IsCpuSocketSupported method checks if the provided CPU socket tag is supported by the operating system motherboard. It returns true if the tag is supported, false otherwise.
boolCanOpenBIOS constDetermines whether the BIOS can be opened. This function returns a boolean value indicating whether the BIOS can be opened. It checks if the BIOS is valid and if the current state of the parent device is either “Starting” or “BIOS”.
floatGetMaxCpuSpeed const inlineGet the maximum CPU speed of the operating system motherboard.
boolIsRamSizeSupported const inlineCheck if a given RAM size is supported by the operating system motherboard.

UOperatingSystemMBB()

Defined in OperatingSystemMBB.h:57


const

void ClockTick() const

Defined in OperatingSystemMBB.h:85 Performs a clock tick on the operating system motherboard.

The ClockTick method performs a clock tick on the operating system motherboard. It calls the ClockTick method of the parent device, which propagates the clock tick to the appropriate components. This method is const and does not modify the state of the object.

See also: UOperatingSystemBaseDevice::ClockTick


bool TryOpenBIOS()

Defined in OperatingSystemMBB.h:139 This method is used to try opening the BIOS. If it is possible to open the BIOS, it will call the OpenBIOS method and return true. Otherwise, it will return false.

True if the BIOS was successfully opened, false otherwise. @See CanOpenBIOS, OpenBIOS


const

UOperatingSystemBaseDevice & GetParentDevice() const

Defined in OperatingSystemMBB.h:147 Retrieves the parent device actor associated with this operating system motherboard.

The parent device actor, or nullptr if no parent device actor is set.

See also: UOperatingSystemBaseDevice, ParentDevice


const

UOperatingSystemBIOS & GetBIOS() const

Defined in OperatingSystemMBB.h:155 Returns the BIOS of the operating system motherboard. This method retrieves and returns the BIOS of the operating system motherboard.

A reference to an instance of UOperatingSystemBIOS representing the BIOS of the operating system motherboard.


const

bool IsCpuSocketSupported(const FGameplayTag & CpuSocketTag) const

Defined in OperatingSystemMBB.h:168 Checks if the provided CPU socket tag is supported by the operating system motherboard. The IsCpuSocketSupported method checks if the provided CPU socket tag is supported by the operating system motherboard. It returns true if the tag is supported, false otherwise.

  • CpuSocketTag The CPU socket tag to check.

True if the CPU socket tag is supported, false otherwise.

See also: SupportedCpuSockets

See also: InvalidTag


const

bool CanOpenBIOS() const

Defined in OperatingSystemMBB.h:177 Determines whether the BIOS can be opened. This function returns a boolean value indicating whether the BIOS can be opened. It checks if the BIOS is valid and if the current state of the parent device is either “Starting” or “BIOS”.

True if the BIOS can be opened, false otherwise.


const inline

inline float GetMaxCpuSpeed() const

Defined in OperatingSystemMBB.h:186 Get the maximum CPU speed of the operating system motherboard.

This method returns the maximum CPU speed supported by the operating system motherboard.

The maximum CPU speed.


const inline

inline bool IsRamSizeSupported(const EOperatingSystemCommonSizes TestSize) const

Defined in OperatingSystemMBB.h:198 Check if a given RAM size is supported by the operating system motherboard.

This method checks if a given RAM size is supported by the operating system motherboard. The supported RAM size is determined by the MaxSupportedRamSize property.

  • TestSize The RAM size to be tested. It should be one of the values defined in the EOperatingSystemCommonSizes enumeration.

true if the given RAM size is supported, false otherwise.

  • None
ReturnNameDescription
UOperatingSystemMBB *CreateMotherboard staticCreates a motherboard for the given owning device.

static

static UOperatingSystemMBB * CreateMotherboard(UOperatingSystemBaseDevice * OwningDevice, FGenericError & OutError)

Defined in OperatingSystemMBB.h:74 Creates a motherboard for the given owning device.

This method creates a motherboard object for the given owning device. It checks if the owning device has a valid motherboard class, and if not, sets the error message in OutError and returns nullptr. If the owning device has a valid motherboard class, the method creates the motherboard object, performs validation, and initializes it. If any validation or initialization steps fail, the error message is set in OutError and the motherboard object is marked as garbage and returned as nullptr. On success, the created motherboard object is returned.

  • OwningDevice The owning device for which to create the motherboard.

  • OutError A reference to a FGenericError object that will hold the error message if an error occurs.

A pointer to the created motherboard object, or nullptr if an error occurs.

See also: UOperatingSystemMBB, UOperatingSystemBaseDevice

  • MAKE_ERROR
  • NEW_SOFT_OBJ
ReturnNameDescription
TSoftClassPtr< UOperatingSystemBIOS >BiosClassBios that belongs to this Motherboard.
floatMaxCpuSpeedMaximum speed the CPU can have on this motherboard. If the CPU speed is higher than this one, device won’t start.
FGameplayTagContainerSupportedCpuSocketsSupported cpu sockets. If empty, it is assumed all CPU sockets are supported.
EOperatingSystemCommonSizesMaxSupportedRamSizeIndicates the maximum supported RAM size for the operating system motherboard.
FGameplayTagContainerSupportedDevicesList of devices this Motherboard supports. If empty, it is assumed all devices are supported.
TObjectPtr< UOperatingSystemBIOS >BIOS
TWeakObjectPtr< UOperatingSystemBaseDevice >ParentDeviceThe device that owns this motherboard

TSoftClassPtr< UOperatingSystemBIOS > BiosClass

Defined in OperatingSystemMBB.h:30 Bios that belongs to this Motherboard.


float MaxCpuSpeed

Defined in OperatingSystemMBB.h:34 Maximum speed the CPU can have on this motherboard. If the CPU speed is higher than this one, device won’t start.


FGameplayTagContainer SupportedCpuSockets

Defined in OperatingSystemMBB.h:38 Supported cpu sockets. If empty, it is assumed all CPU sockets are supported.


EOperatingSystemCommonSizes MaxSupportedRamSize

Defined in OperatingSystemMBB.h:42 Indicates the maximum supported RAM size for the operating system motherboard.


FGameplayTagContainer SupportedDevices

Defined in OperatingSystemMBB.h:46 List of devices this Motherboard supports. If empty, it is assumed all devices are supported.


TObjectPtr< UOperatingSystemBIOS > BIOS

Defined in OperatingSystemMBB.h:49


TWeakObjectPtr< UOperatingSystemBaseDevice > ParentDevice

Defined in OperatingSystemMBB.h:53 The device that owns this motherboard

ReturnNameDescription
boolOnValidate virtual const overrideValidates the operating system motherboard.

virtual const override

virtual bool OnValidate(FGenericError & OutError) const override

Defined in OperatingSystemMBB.h:99 Validates the operating system motherboard.

The OnValidate method validates the operating system motherboard by checking various conditions. If any validation step fails, an error message is set in the OutError parameter and the method returns false. If all validation steps pass, the method returns true, indicating that the operating system motherboard is valid.

  • OutError A reference to a FGenericError object that will hold the error message if validation fails.

True if the operating system motherboard is valid, false otherwise.

ReturnNameDescription
boolInternal_InitializePerforms the internal initialization of the operating system motherboard.
voidInternal_OnDeviceStateChangedInternal function that is called when the state of a device changes.

bool Internal_Initialize(FGenericError & OutError)

Defined in OperatingSystemMBB.h:114 Performs the internal initialization of the operating system motherboard.

The Internal_Initialize method performs the internal initialization of the operating system motherboard. It creates the BIOS object, initializes it, and checks if the initialization is successful. If the initialization fails, the BIOS object is marked as garbage and set to nullptr. It also adds a dynamic delegate to the OnDeviceStateChanged event of the parent device.

  • OutError A reference to a FGenericError object that will hold the error message if the initialization fails.

True if the initialization is successful, false otherwise.

See also: UOperatingSystemMBB::InitBIOS, UOperatingSystemBIOS::InitBIOS, UOperatingSystemMBB::Internal_OnDeviceStateChanged


void Internal_OnDeviceStateChanged(const EOperatingSystemDeviceState & PreviousState, const EOperatingSystemDeviceState & CurrentState)

Defined in OperatingSystemMBB.h:128 Internal function that is called when the state of a device changes.

This function is called internally by the operating system motherboard (UOperatingSystemMBB) class whenever the state of a device changes. It is responsible for handling the device state change and performing any necessary actions.

  • PreviousState The previous state of the device.

  • CurrentState The current state of the device.