Table of Contents

Class OpnEnvironment

Namespace
Opticon
Assembly
Opticon.csp2.dll

Provides access to global configuration, initialization, and runtime information for the underlying CSP2 library.

public static class OpnEnvironment
Inheritance
OpnEnvironment
Inherited Members

Properties

DebugMode

Sets the debug mode of the underlying CSP2 library.

public static OpnEnvironment.OpnDebugMode DebugMode { set; }

Property Value

OpnEnvironment.OpnDebugMode

The desired debug mode.

Remarks

Requires a debug build of csp2.dll.

  • Off: Debugging disabled.
  • Basic: Enables basic debug output.
  • Verbose: Enables all debug output.

Exceptions

OpnException

Thrown when the underlying CSP2 call fails.

RetryCount

Gets or sets the number of retry attempts used by the underlying CSP2 communication layer.

public static int RetryCount { get; set; }

Property Value

int

Remarks

This setting controls how many times the library will retry a failed communication attempt before returning an error. Increasing this value may improve reliability in unstable connections but can also increase latency.

Exceptions

OpnException

Thrown when the underlying CSP2 call fails.

Methods

GetDllVersion()

Tries to initialize the CSP2 library and retrieves the DLL version.

public static string GetDllVersion()

Returns

string

Returns the version of the CSP2 DLL. Fail when the version cannot be retrieved and/or dll could not be loaded.

Exceptions

OpnException

Thrown when there's an issue loading the csp2.dll.