Table of Contents

Class PowerSink

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

[Nominal] A power sink is a component that can be added to the power bus system and is able to consume power.


public class PowerSink : PhysicalObject, IPowerInterface
Inheritance
PowerSink
Implements

Constructors

PowerSink()

Default constructor

protected PowerSink()

Fields

Out_PowerMsg

The power sink message containing the current information of the Power Sink.

public PowerMessage? Out_PowerMsg

Field Value

PowerMessage

Properties

IsActive

A flag for if the power source or sink is currently active.

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

Property Value

bool

NominalVoltageDrop

The desired voltage drop of the Power Sink in Volts.

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

Property Value

double

Power

The power consumed by the Power Source in Watts.

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

Property Value

double

Methods

OnBegin(double)

Called when the object is beginning ticking for the first time. This is when the simulation calls the very first tick and will run before the update call.

protected override void OnBegin(double time)

Parameters

time double

[s] Current time of the simulation before the tick

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

OnUpdate(double, double)

Called when the object should update from the simulation tick. This will take in a time and a step, where the time is the time of the clock before updating the object.

protected override void OnUpdate(double time, double step)

Parameters

time double

[s] Current time of the simulation before the update

step double

[s] The time-step to update during this tick