Table of Contents

Class PowerSource

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

[Nominal] A power source is a component that can be added to the power bus system and is able to provide power that can charge up a storage unit, such as a battery.


public class PowerSource : PhysicalObject
Inheritance
PowerSource
Derived

Constructors

PowerSource()

Default constructor

protected PowerSource()

Fields

Out_PowerSourceMsg

The power source message containing the current information of the storage unit.

public PowerSourceMessage? Out_PowerSourceMsg

Field Value

PowerSourceMessage

Properties

IsActive

A flag for if the source is currently active.

[Metadata(IsAdvanced = true, ContainedIn = "Out_PowerSourceMsg")]
public bool IsActive { get; set; }

Property Value

bool

NominalVoltage

The desired voltage that is produced from this source.

[Unit(UnitType.VOLT)]
[Range(0, 1.7976931348623157E+308)]
[Metadata(ContainedIn = "Out_PowerSourceMsg")]
public double NominalVoltage { get; set; }

Property Value

double

Power

Current power being produced in Watts.

[Unit(UnitType.WATT)]
[ReadOnly]
[Range(0, 1.7976931348623157E+308)]
[Metadata(ContainedIn = "Out_PowerSourceMsg")]
public double Power { get; set; }

Property Value

double

Methods

OnCreate()

Called when the 'Component' is created from the controller.

protected override void OnCreate()

OnLoad(double)

Called after all of the data has been loaded from a save state on this object. This enables any post-load operations to be performed and extra data to be loaded from the metadata.

protected override void OnLoad(double time)

Parameters

time double

[s] The current clock time of the simulation