CVB.Net 14.0
SystemInfo Class Reference

Provides information about the CVB installation on your System. More...

Static Public Member Functions

static LicenseInfo[] GetLicenseInfo ()
 Get information about available licenses. More...
 
static WaitStatus WaitForLicense (TimeSpan timeout)
 Waits until at least one license was found. More...
 
static Task< WaitStatusWaitForLicenseAsync (TimeSpan timeout)
 Waits asynchronously until at least one license was found. More...
 
static MagicNumberEntry[] GetMagicNumberEntries ()
 Query the set of currently available Magic Numbers. More...
 
static void ThrowLastError (bool force)
 Throw the last CVB error that was cached (if any). More...
 
static void ThrowLastError ()
 Throw the last CVB error that was cached (if any).
 

Properties

static Version Version [get]
 Version number of your CVB installation. More...
 
static string InstallPath [get]
 Directory Common Vision Blox has been installed to. More...
 
static string DataPath [get]
 Directory where Common Vision Blox stores its settings. More...
 
static UsTimeSpan DefaultTimeout [get, set]
 Default timeout setting to be used by drivers. More...
 
static string DeviceFileLoadFormatFilter [get]
 Returns a filter string with all formats that may be used with the DeviceFactory.Open(string, AcquisitionStack) method.
 
static string ImageFileLoadFormatFilter [get]
 Returns a filter string retrieved from the CVCFile.dll containing the different file types loadable by Common Vision Blox. This string is ready for use in the System.Windows.Forms dialog boxes' Filter property.
 
static string ImageFileSaveFormatFilter [get]
 Returns a filter string retrieved from the CVCFile.dll containing the different file types savable by Common Vision Blox. This string is ready for use in the System.Windows.Forms dialog boxes' Filter property.
 

Detailed Description

Provides information about the CVB installation on your System.

Member Function Documentation

◆ GetLicenseInfo()

static LicenseInfo[] GetLicenseInfo ( )
static

Get information about available licenses.

In theory, the collection of available licenses can change any time. However, it is fairly unlikely that during runtime someone unplugs a dongle or removes a Node Locked license, so Common Vision Blox does not implement a costly push/event model for notifying clients during runtime about the presence of new licenses or the loss of a license. Instead, the license information can and needs to be queried using this method.

Returns
An array containing the currently available licenses.

◆ GetMagicNumberEntries()

static MagicNumberEntry[] GetMagicNumberEntries ( )
static

Query the set of currently available Magic Numbers.

In theory, the collection of available Magic Numbers can change any time. However, it is fairly unlikely that during runtime someone unplugs a dongle or removes a Node Locked license, so Common Vision Blox does not implement a costly push/event model for notifying clients during runtime about the presence of new Magic Numbers or the loss of a Magic Number. Instead, the Magic Number information can and needs to be queried using this method.

Returns
An array containing the currently available magic number entries.

◆ ThrowLastError()

static void ThrowLastError ( bool  force)
static

Throw the last CVB error that was cached (if any).

Parameters
forcewhen set to true, this function will throw a nondescript error if no error was cached

◆ WaitForLicense()

static WaitStatus WaitForLicense ( TimeSpan  timeout)
static

Waits until at least one license was found.

Parameters
timeoutMaximum amount of time to wait.
Returns
WaitStatus.Ok when licenses could be acquired, WaitStatus.Timeout when the timeout was exceeded.

◆ WaitForLicenseAsync()

static Task< WaitStatus > WaitForLicenseAsync ( TimeSpan  timeout)
static

Waits asynchronously until at least one license was found.

Parameters
timeoutMaximum amount of time to wait.
Returns
Task containing the result. WaitStatus.Ok when licenses could be acquired, WaitStatus.Timeout when the timeout was exceeded.

Property Documentation

◆ DataPath

string DataPath
staticget

Directory where Common Vision Blox stores its settings.

Exceptions
System.IO.IOExceptionIf the CVB data path could not be read from the registry

◆ DefaultTimeout

UsTimeSpan DefaultTimeout
staticgetset

Default timeout setting to be used by drivers.

Note that for setting this property administrative privileges are required, which means that the application must have been started using "Launch as Administrator" on Windows Vista or 7 if UAC is enabled, otherwise an exception will occur. A default timeout of 10 seconds will be returned in case the timeout can not be read from registry.

Exceptions
IOExceptionIf the default timeout could not be written to the registry
UnauthorizedAccessExceptionWhen trying to set this property while the application that tries to set the property does not have administrative privileges.

◆ InstallPath

string InstallPath
staticget

Directory Common Vision Blox has been installed to.

Exceptions
System.IO.IOExceptionIf the CVB path could not be read from the registry

◆ Version

Version Version
staticget

Version number of your CVB installation.

Exceptions
System.IO.IOExceptionIf the current CVB version could not be read from the registry
FormatExceptionIf the version id of your CVB installation has been corrupted