Table of Contents

Class Computer

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

The default computer class is able to connect up software automatically and create functionality for the spacecraft.

public class Computer : PhysicalComponent, IGroundStationAttachment
Inheritance
Computer
Implements
Derived
Inherited Members

Constructors

Computer()

Default constructor

public Computer()

Fields

Out_ClockMsg

The clock message that defines the current time of the computer that is stored.

public ClockMessage Out_ClockMsg

Field Value

ClockMessage

Out_ComputerStatusMsg

The computer status message that outputs the status of the current computer.

public ComputerStatusMessage Out_ComputerStatusMsg

Field Value

ComputerStatusMessage

Properties

CurrentState

The current state of the computer based on how much power is being provided to the system

[EditableVariable("-", true, "", "")]
public ComputerStatusType CurrentState { get; }

Property Value

ComputerStatusType

Nanoseconds

[ns] The number of nanoseconds since the UNIX Epoch

[EditableVariable("ns", true, "", "")]
public ulong Nanoseconds { get; set; }

Property Value

ulong

Seconds

[s] The number of seconds since the UNIX Epoch

[EditableVariable("s", 0, false, "", "")]
public double Seconds { get; set; }

Property Value

double

Methods

IsChildTypeSupported(Type)

Returns true if 'Component' type is a supported child

protected override bool IsChildTypeSupported(Type type)

Parameters

type Type

a 'Component' type

Returns

bool

OnPreAttachChild(Component)

Called before the 'Component' attaches a component

protected override void OnPreAttachChild(Component child)

Parameters

child Component

The child component

OnPreDetachChild(Component)

Called before the 'Component' detaches a component

protected override void OnPreDetachChild(Component child)

Parameters

child Component

The child component

OnUpdate(double, double)

Called when the 'Component' should update

protected override void OnUpdate(double time, double step)

Parameters

time double

current time (seconds)

step double

the time step (seconds)

SafeMode()

Set the computer into a safe mode - ensuring that only the most important systems are running and the rest are in safety.

public virtual void SafeMode()

Shutdown()

Shut the computer down safely. Disable all software and set the status to SHUTDOWN.

public virtual void Shutdown()

Startup()

Start the computer safely. Enable all software and set the status to RUNNING.

public virtual void Startup()

SyncClock(NsDateTime)

Syncs the current clock to the datatime as provided as a parameter.

public void SyncClock(NsDateTime dateTime)

Parameters

dateTime NsDateTime

The datetime to sync to