Table of Contents

Class PowerSwitch

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

[Nominal] A power switch is able to control the circuit it is connected to based on user input.


public class PowerSwitch : PowerComponent
Inheritance
PowerSwitch

Constructors

PowerSwitch()

Default constructor

protected PowerSwitch()

Properties

IsOpen

A flag if the switch is currently open or closed

[ReadOnly]
[Metadata(ContainedIn = "PowerModel")]
public bool IsOpen { get; }

Property Value

bool

Methods

SetClose()

Closes the circuit that the switch is on

public void SetClose()

SetOpen()

Opens the circuit that the switch is on

public void SetOpen()

SetState(bool)

Sets the open state of the switch if it is on

public void SetState(bool isOpen)

Parameters

isOpen bool

An open state of the switch

Toggle()

Toggles the state of the switch

public bool Toggle()

Returns

bool

A flag if the state is open