Table of Contents

Struct Wire

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

[Nominal] This structure defines a wire that connects two nodes in a power circuit.


public struct Wire

Constructors

Wire()

The default constructor for a wire

public Wire()

Wire(Guid, Guid, TerminalType, TerminalType)

Constructs a new wire with the given nodes and terminals

public Wire(Guid nodeFrom, Guid nodeTo, TerminalType terminalFrom = TerminalType.Positive, TerminalType terminalTo = TerminalType.Negative)

Parameters

nodeFrom Guid

The from node for the wire

nodeTo Guid

The to node for the wire

terminalFrom TerminalType

The terminal type for the from node

terminalTo TerminalType

The terminal type for the to node

Fields

NodeFrom

The pointer to the from node for the wire.

public Guid NodeFrom

Field Value

Guid

NodeTo

The pointer to the to node for the wire.

public Guid NodeTo

Field Value

Guid

TerminalFrom

The terminal type for the from node.

public TerminalType TerminalFrom

Field Value

TerminalType

TerminalTo

The terminal type for the to node.

public TerminalType TerminalTo

Field Value

TerminalType

Methods

Equals(object)

Returns whether the wire is equal to another wire

public override bool Equals(object obj)

Parameters

obj object

The object to check

Returns

bool

A success flag

FromJSON(JObject)

Converts a JSON object to a wire

public static Wire FromJSON(JObject json)

Parameters

json JObject

The JSON object storing the data

Returns

Wire

The JSON object based on a wire

GetHashCode()

Returns the hash code for the wire

public override int GetHashCode()

Returns

int

ToJSON(Wire)

Converts a wire to a JSON object

public static JObject ToJSON(Wire wire)

Parameters

wire Wire

The wire to convert

Returns

JObject

The JSON object based on a wire