Skip to content

Library Class#

Library provides some basic information on the PylonNET library, such as its version and the available transport layers.

Inheritance Hierarchy#

System.Object
  Basler.Pylon.Library

Syntax#

C#

public class Library : IDisposable

VB

Public Class Library
    Implements IDisposable

The Library type exposes the following members.

Constructors#

NameDescription
Public methodLibrary A Library object can be created to make sure that internal resources used by the Pylon library are not freed. This is only needed when AllowAutoRelease is set to true or if multiple assemblies use the pylonNET library.
 

Properties#

NameDescription
Public propertyStatic memberVersionInfo The current version of the library.
 

Methods#

NameDescription
Public methodDispose Releases a reference to the library.
Public methodStatic memberEnumerateTransportLayers Searches for information about available transport layers.
Public methodSetProperty Sets a property in pylon.
 

Remarks#

The library is initialized implicitly by using an object of the library, e.g. by creating a Camera object, or by calling one of its static methods, e.g. CameraFinder.Enumerate(). The internal resources of the library are freed when the application domain is unloaded.

Library.Dispose Method#

Releases a reference to the library.

Syntax#

C#

public void Dispose()

VB

Public Sub Dispose

Implements#

IDisposable.Dispose()

Remarks#

Thread Safety: This method is thread-safe.

Error Safety: Does not throw exceptions.

Library.EnumerateTransportLayers Method#

Searches for information about available transport layers.

Syntax#

C#

public static List<ITransportLayerInfo> EnumerateTransportLayers()

VB

Public Shared Function EnumerateTransportLayers As List(Of ITransportLayerInfo)

Return Value#

Type: List(ITransportLayerInfo)
Returns a list transport layer info objects, one per transport layer.

Remarks#

The term 'transport layer' is used as an abstraction for a physical interface such as IEEE 1394, GigE or USB 3.0. For each of these interfaces, there are drivers providing access to camera devices. Thread Safety: This method is thread-safe.

Error Safety: Does not throw exceptions.

Library.SetProperty Method#

Sets a property in pylon.

Syntax#

C#

public void SetProperty(
    int propertyId,
    byte[] data
)

VB

Public Sub SetProperty ( 
    propertyId As Integer,
    data As Byte()
)

Parameters#

 

propertyId
Type: System.Int32
Identifier of the property.
data
Type: System.Byte[]
Array with the value of the property.

Remarks#

Call this function to set the value of a property. Thread Safety: This method is thread-safe.

Error Safety: Can throw exceptions if the property could not be set.

Library Constructor#

A Library object can be created to make sure that internal resources used by the Pylon library are not freed. This is only needed when AllowAutoRelease is set to true or if multiple assemblies use the pylonNET library.

Syntax#

C#

public Library()

VB

Public Sub New

Remarks#

Thread Safety: This method is thread-safe.

Error Safety: Does not throw exceptions.

Library.VersionInfo Property#

The current version of the library.

Syntax#

C#

public static Version VersionInfo { get; }

VB

Public Shared ReadOnly Property VersionInfo As Version
    Get

Return Value#

Type: Version
Returns the current version of the Pylon library.

Remarks#

Thread Safety: This property is thread-safe.

Error Safety: Does not throw exceptions.