Table of Contents

Class Setup

Namespace
Csra.Services
Assembly
Csra.dll

Services.Setup - centralized test configuration management.

[Serializable]
public class Setup : ISetupService, IServiceBase
Inheritance
Setup
Implements
Inherited Members

Constructors

Setup()

protected Setup()

Properties

AuditMode

Reads or sets audit mode (performs hardware reads to confirm cached data is correct).

public bool AuditMode { get; set; }

Property Value

bool

Count

Gets the number of setups contained in the SetupService.

public int Count { get; }

Property Value

int

Instance

public static ISetupService Instance { get; }

Property Value

ISetupService

RespectSettlingTimeDefault

Reads or sets the global default for respecting settling times when applying settings.

public bool RespectSettlingTimeDefault { get; set; }

Property Value

bool

SettleWaitTimeOut

Reads or sets the global default for settling time-out.

public double SettleWaitTimeOut { get; set; }

Property Value

double

VerboseMode

Reads or sets verbose mode (prints detailed information to log output target).

public bool VerboseMode { get; set; }

Property Value

bool

Methods

Add(Setup)

Adds the specified setup to the SetupService.

public void Add(Setup setup)

Parameters

setup Setup

The setup to add.

Apply(string)

Applies one or multiple named setups from the SetupService. If more than one is specified, the requested sequence is maintained. Does nothing if the name is null or empty.

public void Apply(string setupNames)

Parameters

setupNames string

The setup(s) to be applied (CSV).

Diff(string)

Performs a diff of the specified setups against current hardware state and logs the differences to the output window.

public void Diff(string setupNames)

Parameters

setupNames string

Dump()

Dumps all setups to the log output target.

public void Dump()

EnqueueExportData(string, bool)

public static void EnqueueExportData(string line, bool newLine = true)

Parameters

line string
newLine bool

Export(string, string)

Exports the specified setups to a file at the specified path. The file format is JSON. If the file already exists, it will be overwritten. If the path is null or empty, the setups will not be exported. An empty parameter setupNames will export all setups in the SetupService.

public void Export(string path, string setupNames)

Parameters

path string

The file system path where the setups will be exported.

setupNames string

The setup(s) to be exported (CSV).

Import(string, bool)

Imports setups from a file at the specified path. If overwrite is true, setups with the same name are overwritten.

public void Import(string path, bool overwrite = true)

Parameters

path string

The file system path from where the setups will be imported.

overwrite bool

Optional. If set to true, existing setups will be overwritten.

Init(SetupResetTrigger)

Performs the specified initialization to all setups in the SetupService.

public void Init(SetupResetTrigger setupResetTrigger)

Parameters

setupResetTrigger SetupResetTrigger

The init mode.

Log(string, int, int)

Logs a message with a specified severity level and color.

public void Log(string message, int level, int rgb)

Parameters

message string

The message to be logged. Cannot be null or empty.

level int

The level of indentation for the message.

rgb int

The RGB color value used to display the message. Must be a valid RGB integer.

Remove(string)

Removes the setup with the specified setupName from the SetupService.

public bool Remove(string setupName)

Parameters

setupName string

The setup to be removed.

Returns

bool

true if the setup is successfully found and removed; otherwise, false.

Reset()

Initialize the service. This is called by the API when the service is first used.

public void Reset()