Class BodeAutomation
Start class for the Automation interface. With this class it is possible to especially search and select the desired BodeDevice device.
Inheritance
Inherited Members
Namespace: OmicronLab.VectorNetworkAnalysis.AutomationInterface
Assembly: OmicronLab.VectorNetworkAnalysis.AutomationInterface.dll (3.50.2911.0)
Syntax
[Guid("9DCCE9FC-6EFC-4A06-BB32-AD7BA6433EC7")]
[ClassInterface(ClassInterfaceType.None)]
[ComVisible(true)]
public class BodeAutomation : BodeAutomationInterface, IDisposable
Remarks
If only one device is available to connect it is easier to use the Bode100 class, this class will direct choose the first available device.
Constructors
BodeAutomation()
Initializes a new instance of the BodeAutomation class.
Declaration
public BodeAutomation()
Properties
Version
Gets the version of the Automation interface.
Declaration
public string Version { get; }
Property Value
Type | Description |
---|---|
System.String | The version. |
Methods
Connect()
Connect to a the first BodeDevice device which can be found. NOTE: This call can take up to 2 minutes if an internal calibration needs to be performed. ATTENTION: Do not call this method from GUI threads as this could cause dead-locks.
Declaration
public BodeDevice Connect()
Returns
Type | Description |
---|---|
BodeDevice | A new instance of BodeDevice class. |
Connect(Action<Double>)
Connect to a the first BodeDevice device which can be found. NOTE: This call can take up to 2 minutes if an internal calibration needs to be performed. ATTENTION: Do not call this method from GUI threads as this could cause dead-locks.
Declaration
public BodeDevice Connect(Action<double> internalCalibrationCallback)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.Double> | internalCalibrationCallback | The internal calibration callback. |
Returns
Type | Description |
---|---|
BodeDevice | A new instance of BodeDevice class. |
ConnectWithSerialNumber(String)
Connect to a BodeDevice device by serial number. NOTE: This call can take up to 2 minutes if an internal calibration needs to be performed. ATTENTION: Do not call this method from GUI threads as this could cause dead-locks.
Declaration
public BodeDevice ConnectWithSerialNumber(string serialNumber)
Parameters
Type | Name | Description |
---|---|---|
System.String | serialNumber | The serial number of the device to connect. |
Returns
Type | Description |
---|---|
BodeDevice | A new instance of BodeDevice class. |
ConnectWithSerialNumber(String, Action<Double>)
Connect to a BodeDevice device by serial number. NOTE: This call can take up to 2 minutes if an internal calibration needs to be performed. ATTENTION: Do not call this method from GUI threads as this could cause dead-locks.
Declaration
public BodeDevice ConnectWithSerialNumber(string serialNumber, Action<double> internalCalibrationCallback)
Parameters
Type | Name | Description |
---|---|---|
System.String | serialNumber | The serial number of the device to connect. |
System.Action<System.Double> | internalCalibrationCallback | The internal calibration callback. |
Returns
Type | Description |
---|---|
BodeDevice | A new instance of BodeDevice class. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposeBode)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposeBode |
|
JoinCustomerExperienceImprovementProgram(Boolean)
Sets the value for IsTelemetryEnabled inside the telemetry settings. For more information regarding the Customer Experience Improvement Program see BodeAnalyzerSuite.
Declaration
public void JoinCustomerExperienceImprovementProgram(bool isTelemetryEnabled)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isTelemetryEnabled | Indicates whether the telemetry is enabled or not. |
LogToFile(String, LogLevel)
Sets the path for the log file.
Declaration
[ComVisible(false)]
public static void LogToFile(string path, LogLevel logLevel)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path. |
LogLevel | logLevel | The log level. |
Remarks
To use the logging option you have to set a path to a file where the log messages shall be written.
ScanForAttachedDevices()
Scans for all attached devices.
Declaration
public string[] ScanForAttachedDevices()
Returns
Type | Description |
---|---|
System.String[] | An array containing the serial numbers of the found BodeDevice devices. |
ScanForFreeDevices()
Scans for free connected devices.
Declaration
public string[] ScanForFreeDevices()
Returns
Type | Description |
---|---|
System.String[] | An array containing the serial numbers of the found BodeDevice devices. |
SetLogToFile(String, LogLevel)
Sets the path for the log file.
Declaration
public void SetLogToFile(string path, LogLevel logLevel)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path. |
LogLevel | logLevel | The log level. |
Remarks
To use the logging option you have to set a path to a file where the log messages shall be written. Only for COM Use. Otherwise please use the static BodeAutomation.LogToFile method.
SetLogToUdpStream(Int32, LogLevel)
Sets the port and log level for stream logging.
Declaration
public void SetLogToUdpStream(int port, LogLevel logLevel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | port | The port. |
LogLevel | logLevel | The log level. |
Events
DeviceAdded
Occurs when a new BodeDevice device is plugged in.
Declaration
public event DeviceAddedDelegate DeviceAdded
Event Type
Type | Description |
---|---|
DeviceAddedDelegate |
DeviceRemoved
Occurs when a BodeDevice device is removed from the computer.
Declaration
public event DeviceRemovedDelegate DeviceRemoved
Event Type
Type | Description |
---|---|
DeviceRemovedDelegate |
InternalCalibrationUpdate
Occurs when when a new internal calibration progress is available.
Declaration
public event InternalCalibrationCallbackDelegate InternalCalibrationUpdate
Event Type
Type | Description |
---|---|
InternalCalibrationCallbackDelegate |