API Call Example
A simple example of how to initialize and run a predefined calibration is given below. There are 2 steps required to initialize the library and initiate a calibration.
First: Initialize the library with a call to the static class method AteSystems.InCal.API.Initialize. This function returns the initialized interface which can be used to call the Calibrate method
Second: Use the interface returned by the call to Initialize and call the method Calibrate to run a calibration that is defined by the configuration file.
using System;
namespace Example
{
/// <summary>
/// An simple example of how to utilize the API and get a reference to it
/// </summary>
public class ExampleClass
{
/// <summary>
/// Run a calibration
/// </summary>
public static bool Calibrate(string calName, string pnaName)
{
// Get a reference to the API interface
AteSystems.InCal.IApi api = AteSystems.InCal.API.Initialize(@"C:\Temp\MyConfig.ini", catchExceptions:true);
// Call the API function
return api.Calibrate(calName, pnaName);
}
}
}