Skip to content

UOperatingSystemPSU

#include <OperatingSystemSimulator/Public/Hardware/OperatingSystemPSU.h>
class UOperatingSystemPSU

Defined in OperatingSystemPSU.h:19

Inherits: UOperatingSystemBaseHardware

---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemPSU["UOperatingSystemPSU"]
  class UOperatingSystemBaseHardware["UOperatingSystemBaseHardware"]
  UOperatingSystemBaseHardware <|-- UOperatingSystemPSU
---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemPSU["UOperatingSystemPSU"]
  class UOperatingSystemBaseDevice["UOperatingSystemBaseDevice"]
  UOperatingSystemPSU *-- UOperatingSystemBaseDevice
---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemPSU {
    +UOperatingSystemPSU()
    +CreatePSU(UOperatingSystemBaseDevice *OwningDevice, F UOperatingSystemPSU() *
    +OnValidate(FGenericError &OutError) const override bool
    +ParentDevice : TWeakObjectPtr< UOperatingSystemBaseDevi
  }

Represents a Power Supply Unit (PSU) in the operating system simulator.

This class is a blueprintable and blueprint type that inherits from UOperatingSystemBaseHardware. It represents a power supply unit in the operating system simulator. It contains a weak pointer to the parent device and provides a static method to create an instance of the PSU.

ReturnNameDescription
UOperatingSystemPSU

UOperatingSystemPSU()

Defined in OperatingSystemPSU.h:33

ReturnNameDescription
UOperatingSystemPSU *CreatePSU staticCreates an instance of UOperatingSystemPSU.

static

static UOperatingSystemPSU * CreatePSU(UOperatingSystemBaseDevice * OwningDevice, FGenericError & OutError)

Defined in OperatingSystemPSU.h:49 Creates an instance of UOperatingSystemPSU.

This method creates and returns an instance of UOperatingSystemPSU. It takes an OwningDevice pointer and an OutError reference as input parameters. The OwningDevice pointer is used to get the PSU class of the parent device. If the parent device does not have a PSU class, the method sets the OutError parameter to an error message and returns nullptr. If the parent device has a PSU class, the method creates a new instance of UOperatingSystemPSU and sets the ParentDevice pointer to the OwningDevice. It then calls the Validate method of the instance to ensure its validity. If the instance is not valid, the method marks it as garbage, sets ProxyPsu to nullptr, and returns nullptr. Otherwise, it returns the instance.

  • OwningDevice A pointer to the parent device.

  • OutError A reference to a FGenericError object that will be set with an error message if an error occurs.

An instance of UOperatingSystemPSU if successful, nullptr otherwise.

  • MAKE_ERROR
  • NEW_SOFT_OBJ
ReturnNameDescription
boolOnValidate virtual const overrideValidates the Power Supply Unit (PSU).

virtual const override

virtual bool OnValidate(FGenericError & OutError) const override

Defined in OperatingSystemPSU.h:63 Validates the Power Supply Unit (PSU).

This method validates the Power Supply Unit (PSU). It checks if the HardwareTag is equal to the PsuTag. If they are not equal, an error message is created and assigned to the OutError parameter. The method returns false to indicate that the validation failed. If the HardwareTag is equal to the PsuTag, the method returns true to indicate that the validation passed.

  • OutError A reference to a FGenericError object that will be set with an error message if the validation fails.

true if the validation passed, false otherwise.

ReturnNameDescription
TWeakObjectPtr< UOperatingSystemBaseDevice >ParentDeviceRepresents the parent device of a specific operating system base device.

TWeakObjectPtr< UOperatingSystemBaseDevice > ParentDevice

Defined in OperatingSystemPSU.h:29 Represents the parent device of a specific operating system base device.

See also: UOperatingSystemBaseDevice