Table of Contents

Class PowerSwitch

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

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

public class PowerSwitch : PowerComponent, IPowerAttachment
Inheritance
PowerSwitch
Implements
Inherited Members

Constructors

PowerSwitch()

Default constructor

public PowerSwitch()

Properties

IsOpen

A flag if the switch is currently open or closed

[EditableVariable("-", true, "", "")]
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