Class Setup
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
Count
Gets the number of setups contained in the SetupService.
public int Count { get; }
Property Value
Instance
public static ISetupService Instance { get; }
Property Value
RespectSettlingTimeDefault
Reads or sets the global default for respecting settling times when applying settings.
public bool RespectSettlingTimeDefault { get; set; }
Property Value
SettleWaitTimeOut
Reads or sets the global default for settling time-out.
public double SettleWaitTimeOut { get; set; }
Property Value
VerboseMode
Reads or sets verbose mode (prints detailed information to log output target).
public bool VerboseMode { get; set; }
Property Value
Methods
Add(Setup)
Adds the specified setup to the SetupService.
public void Add(Setup setup)
Parameters
setupSetupThe 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
setupNamesstringThe 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
setupNamesstring
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
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
pathstringThe file system path where the setups will be exported.
setupNamesstringThe 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
pathstringThe file system path from where the setups will be imported.
overwriteboolOptional. 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
setupResetTriggerSetupResetTriggerThe 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
messagestringThe message to be logged. Cannot be null or empty.
levelintThe level of indentation for the message.
rgbintThe 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
setupNamestringThe setup to be removed.
Returns
Reset()
Initialize the service. This is called by the API when the service is first used.
public void Reset()