Skip to content

IParameterCollection Interface#

Represents a collection of parameters that are identified by a path, a name, and a type.

Syntax#

C#

public interface IParameterCollection : IEnumerable<IParameter>

VB

Public Interface IParameterCollection
    Inherits IEnumerable(Of IParameter)

The IParameterCollection type exposes the following members.

Properties#

NameDescription
Public propertyItem(ArrayName) Looks up a parameter of type array and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
Public propertyItem(BooleanName) Looks up a parameter of type boolean and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
Public propertyItem(CommandName) Looks up a parameter of type command and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
Public propertyItem(EnumName) Looks up a parameter of type enum and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
Public propertyItem(FloatName) Looks up a parameter of type float and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
Public propertyItem(IntegerName) Looks up a parameter of type integer and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
Public propertyItem(String) Looks up a parameter of any type and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
Public propertyItem(StringName) Looks up a parameter of type string and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
 

Methods#

NameDescription
Public methodContains(ArrayName) Checks whether a parameter of type array is available.
Public methodContains(BooleanName) Checks whether a parameter of type boolean is available.
Public methodContains(CommandName) Checks whether a parameter of type command is available.
Public methodContains(EnumName) Checks whether a parameter of type enum is available.
Public methodContains(FloatName) Checks whether a parameter of type float is available.
Public methodContains(IntegerName) Checks whether a parameter of type integer is available.
Public methodContains(String) Indicates if a parameter of any type is available.
Public methodContains(StringName) Checks whether a parameter of type string is available.
Public methodGetParameterRelation Advanced: Gets the relation of one parameter to other parameters.
Public methodLoad Loads the parameters from a file.
Public methodPoll Advanced: Poll all parameters that have polling time. If the elapsed time is larger than the polling time of the parameter, fire parameter changed events.
Public methodRefresh Advanced: Invalidates all cached values for all parameters. See Refresh() for more information.
Public methodSave Saves the parameters to a file.
 

Remarks#

Every parameter collection has a main parameter path. When looking up parameters of the main path, the path can be omitted. The definition of a main parameter path depends on the source of the related parameter collection. For simplicity, a combination of path, name, and type is referred to as parameter name, analogous to file names.

Examples:
 

  • Parameter name without path: "Width"
  • Parameter name with path: "@CameraDevice/Width"
  • Parameter name with name cast for defining the parameter type: (IntegerName) "@CameraDevice/Width"
  For ease of use, several predefined lists of parameter names are available, e.g. PLCamera.

If a requested parameter does not exist, an empty parameter object will be returned to simplify handling. An empty parameter is never readable or writable.

A parameter collection is enumerable. The enumerator lists all user parameters.

IParameterCollection.Contains Method (ArrayName)#

Checks whether a parameter of type array is available.

Syntax#

C#

bool Contains(
    ArrayName name
)

VB

Function Contains ( 
    name As ArrayName
) As Boolean

Parameters#

 

name
Type: Basler.Pylon.ArrayName
The type, path and name of the parameter.

Return Value#

Type: Boolean
True if the parameter is available and the type matches.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions.

IParameterCollection.Contains Method (BooleanName)#

Checks whether a parameter of type boolean is available.

Syntax#

C#

bool Contains(
    BooleanName name
)

VB

Function Contains ( 
    name As BooleanName
) As Boolean

Parameters#

 

name
Type: Basler.Pylon.BooleanName
The type, path and name of the parameter.

Return Value#

Type: Boolean
True if the parameter is available and the type matches.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions.

IParameterCollection.Contains Method (CommandName)#

Checks whether a parameter of type command is available.

Syntax#

C#

bool Contains(
    CommandName name
)

VB

Function Contains ( 
    name As CommandName
) As Boolean

Parameters#

 

name
Type: Basler.Pylon.CommandName
The type, path and name of the parameter.

Return Value#

Type: Boolean
True if the parameter is available and the type matches.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions.

IParameterCollection.Contains Method (EnumName)#

Checks whether a parameter of type enum is available.

Syntax#

C#

bool Contains(
    EnumName name
)

VB

Function Contains ( 
    name As EnumName
) As Boolean

Parameters#

 

name
Type: Basler.Pylon.EnumName
The type, path and name of the parameter.

Return Value#

Type: Boolean
True if the parameter is available and the type matches.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions.

IParameterCollection.Contains Method (FloatName)#

Checks whether a parameter of type float is available.

Syntax#

C#

bool Contains(
    FloatName name
)

VB

Function Contains ( 
    name As FloatName
) As Boolean

Parameters#

 

name
Type: Basler.Pylon.FloatName
The type, path and name of the parameter.

Return Value#

Type: Boolean
True if the parameter is available and the type matches.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions.

IParameterCollection.Contains Method (IntegerName)#

Checks whether a parameter of type integer is available.

Syntax#

C#

bool Contains(
    IntegerName name
)

VB

Function Contains ( 
    name As IntegerName
) As Boolean

Parameters#

 

name
Type: Basler.Pylon.IntegerName
The type, path and name of the parameter.

Return Value#

Type: Boolean
True if the parameter is available and the type matches.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions.

IParameterCollection.Contains Method (StringName)#

Checks whether a parameter of type string is available.

Syntax#

C#

bool Contains(
    StringName name
)

VB

Function Contains ( 
    name As StringName
) As Boolean

Parameters#

 

name
Type: Basler.Pylon.StringName
The type, path and name of the parameter.

Return Value#

Type: Boolean
True if the parameter is available and the type matches.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions.

IParameterCollection.Contains Method (String)#

Indicates if a parameter of any type is available.

Syntax#

C#

bool Contains(
    string name
)

VB

Function Contains ( 
    name As String
) As Boolean

Parameters#

 

name
Type: System.String
The path and name of the parameter.

Return Value#

Type: Boolean
True if the parameter is available.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions.

IParameterCollection.GetParameterRelation Method#

Advanced: Gets the relation of one parameter to other parameters.

Syntax#

C#

IEnumerable<string> GetParameterRelation(
    string name,
    ParameterRelation relation,
    bool filterInternalParameters
)

VB

Function GetParameterRelation ( 
    name As String,
    relation As ParameterRelation,
    filterInternalParameters As Boolean
) As IEnumerable(Of String)

Parameters#

 

name
Type: System.String
The name of the parameter.
relation
Type: Basler.Pylon.ParameterRelation
The type of the parameter relation.
filterInternalParameters
Type: System.Boolean
Filter parameters that are not user parameters.

Return Value#

Type: IEnumerable(String)
Returns a list of the related parameter names. Returns Enumerable.Empty() if no relation exists.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions. Triggered event handlers can throw exceptions.

IParameterCollection.Load Method#

Loads the parameters from a file.

Syntax#

C#

void Load(
    string filename,
    string parameterPath
)

VB

Sub Load ( 
    filename As String,
    parameterPath As String
)

Parameters#

 

filename
Type: System.String
Name and path of the parameter file.
parameterPath
Type: System.String
The parameter path identifying the set of parameters to load, e.g. CameraDevice.

Remarks#

The parameter source needs to be open in order for this to succeed.

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions.

IParameterCollection.Poll Method#

Advanced: Poll all parameters that have polling time. If the elapsed time is larger than the polling time of the parameter, fire parameter changed events.

Syntax#

C#

void Poll(
    long elapsedTime
)

VB

Sub Poll ( 
    elapsedTime As Long
)

Parameters#

 

elapsedTime
Type: System.Int64
The elapsed time, e.g. between two calls, in milliseconds.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions. Triggered event handlers can throw exceptions.

IParameterCollection.Refresh Method#

Advanced: Invalidates all cached values for all parameters. See Refresh() for more information.

Syntax#

C#

void Refresh()

VB

Sub Refresh

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions.

IParameterCollection.Save Method#

Saves the parameters to a file.

Syntax#

C#

void Save(
    string filename,
    string parameterPath
)

VB

Sub Save ( 
    filename As String,
    parameterPath As String
)

Parameters#

 

filename
Type: System.String
Name and path of the parameter file.
parameterPath
Type: System.String
The parameter path identifying the set of parameters to save, e.g. CameraDevice .

Remarks#

The parameter source needs to be open in order for this to succeed.

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions.

IParameterCollection.Contains Method#

Overload List#

NameDescription
Public methodContains(ArrayName) Checks whether a parameter of type array is available.
Public methodContains(BooleanName) Checks whether a parameter of type boolean is available.
Public methodContains(CommandName) Checks whether a parameter of type command is available.
Public methodContains(EnumName) Checks whether a parameter of type enum is available.
Public methodContains(FloatName) Checks whether a parameter of type float is available.
Public methodContains(IntegerName) Checks whether a parameter of type integer is available.
Public methodContains(String) Indicates if a parameter of any type is available.
Public methodContains(StringName) Checks whether a parameter of type string is available.
 

IParameterCollection.Item Property#

Overload List#

NameDescription
Public propertyItem(ArrayName) Looks up a parameter of type array and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
Public propertyItem(BooleanName) Looks up a parameter of type boolean and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
Public propertyItem(CommandName) Looks up a parameter of type command and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
Public propertyItem(EnumName) Looks up a parameter of type enum and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
Public propertyItem(FloatName) Looks up a parameter of type float and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
Public propertyItem(IntegerName) Looks up a parameter of type integer and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
Public propertyItem(String) Looks up a parameter of any type and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
Public propertyItem(StringName) Looks up a parameter of type string and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.
 

IParameterCollection.Item Property (ArrayName)#

Looks up a parameter of type array and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.

Syntax#

C#

IArrayParameter this[
    ArrayName name
] { get; }

VB

ReadOnly Default Property Item ( 
    name As ArrayName
) As IArrayParameter
    Get

Parameters#

 

name
Type: Basler.Pylon.ArrayName
Defines the type, path, and name of the parameter.

Return Value#

Type: IArrayParameter
The found parameter or an empty parameter object of the given type that is never readable or writable.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions if the given type does not match the type of the parameter found.

IParameterCollection.Item Property (BooleanName)#

Looks up a parameter of type boolean and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.

Syntax#

C#

IBooleanParameter this[
    BooleanName name
] { get; }

VB

ReadOnly Default Property Item ( 
    name As BooleanName
) As IBooleanParameter
    Get

Parameters#

 

name
Type: Basler.Pylon.BooleanName
Defines the type, path, and name of the parameter.

Return Value#

Type: IBooleanParameter
The parameter found or an empty parameter object of the given type. An empty parameter is never readable or writable.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions if the given type does not match the type of the parameter found.

IParameterCollection.Item Property (CommandName)#

Looks up a parameter of type command and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.

Syntax#

C#

ICommandParameter this[
    CommandName name
] { get; }

VB

ReadOnly Default Property Item ( 
    name As CommandName
) As ICommandParameter
    Get

Parameters#

 

name
Type: Basler.Pylon.CommandName
Defines the type, path, and name of the parameter.

Return Value#

Type: ICommandParameter
The found parameter or an empty parameter object of the given type that is never readable or writable.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions if the given type does not match the type of the parameter found.

IParameterCollection.Item Property (EnumName)#

Looks up a parameter of type enum and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.

Syntax#

C#

IEnumParameter this[
    EnumName name
] { get; }

VB

ReadOnly Default Property Item ( 
    name As EnumName
) As IEnumParameter
    Get

Parameters#

 

name
Type: Basler.Pylon.EnumName
Defines the type, path, and name of the parameter.

Return Value#

Type: IEnumParameter
The found parameter or an empty parameter object of the given type that is never readable or writable.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions if the given type does not match the type of the parameter found.

IParameterCollection.Item Property (FloatName)#

Looks up a parameter of type float and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.

Syntax#

C#

IFloatParameter this[
    FloatName name
] { get; }

VB

ReadOnly Default Property Item ( 
    name As FloatName
) As IFloatParameter
    Get

Parameters#

 

name
Type: Basler.Pylon.FloatName
Defines the type, path, and name of the parameter.

Return Value#

Type: IFloatParameter
The parameter found or an empty parameter object of the given type. An empty parameter is never readable or writable.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions if the given type does not match the type of the parameter found.

IParameterCollection.Item Property (IntegerName)#

Looks up a parameter of type integer and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.

Syntax#

C#

IIntegerParameter this[
    IntegerName name
] { get; }

VB

ReadOnly Default Property Item ( 
    name As IntegerName
) As IIntegerParameter
    Get

Parameters#

 

name
Type: Basler.Pylon.IntegerName
Defines the type, path, and name of the parameter.

Return Value#

Type: IIntegerParameter
The parameter found or an empty parameter object of the given type. An empty parameter is never readable or writable.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions if the given type does not match the type of the parameter found.

IParameterCollection.Item Property (StringName)#

Looks up a parameter of type string and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.

Syntax#

C#

IStringParameter this[
    StringName name
] { get; }

VB

ReadOnly Default Property Item ( 
    name As StringName
) As IStringParameter
    Get

Parameters#

 

name
Type: Basler.Pylon.StringName
Defines the type, path, and name of the parameter.

Return Value#

Type: IStringParameter
The found parameter or an empty parameter object of the given type that is never readable or writable.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions if the given type does not match the type of the parameter found.

IParameterCollection.Item Property (String)#

Looks up a parameter of any type and returns it. If no parameter with the given name has been found, an empty parameter is returned to simplify handling.

Syntax#

C#

IParameter this[
    string name
] { get; }

VB

ReadOnly Default Property Item ( 
    name As String
) As IParameter
    Get

Parameters#

 

name
Type: System.String
Defines the path and the name of the parameter.

Return Value#

Type: IParameter
The parameter found or an empty parameter object. An empty parameter is never readable or writable. The returned parameter can be casted to its specialized type afterwards.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection.

Error Safety: Can throw exceptions if the given type does not match the type of the parameter found.