Class PvGenParameterArray
GenICam feature array
Implements
Inherited Members
Namespace: eBUSDotNet
Assembly: eBUSDotNet.dll
Syntax
public class PvGenParameterArray : IDisposable
Remarks
Controlling features (programmatically)
<b>To control features:</b>
- Get the list of features. Use one of the following:
- PvDevice::GetParameters (Parameters used to control the GigE Vision device to which you are connected)
- PvDevice::GetCommunicationParameters (Parameters used to define how PvDevice connects to and communicates with the device - see Device Communication Parameters.
- PvStream::GetParameters (Parameters used to define how PvStream receives data from a GigE Vision transmitter - see Stream Parameters
- Get a feature. Use Get.
- Get the feature's type. Use PvGenParameter::GetType.
- Optionally:
- Get/Set the feature's value. Use the GetValue/SetValue method for the feature's type (e.g. PvGenInteger::GetValue, PvGenFloat::SetValue, etc.)
- If the feature is a command, activate it. Use PvGenCommand::Execute.
<h2 id="controllingGUI">Controlling features (using a GUI)</h2>
<b>To control features (using a GUI):</b>
- See GenICam browser dialog documentation.
<h2>Running code when a feature's value changes</h2>
In some cases, you may want to know when a feature value or attribute changes without using CPU-intensive polling
to regularly check (and re-check) the feature's value.
<b>To create a callback that runs when the feature's value changes:</b>
- Get the feature. See Controlling features.
- Create a subclass of PvGenEventSink.
- Call PvGenParameter::RegisterEventSink to be notified when that parameter is updated.
- In your new class, override PvGenEventSink::OnParameterUpdate.
Constructors
View SourcePvGenParameterArray()
Constructor.
Declaration
public PvGenParameterArray()
Fields
View SourceswigCMemOwn
Determines who is responsible for deleting the underlying C++ object.
Declaration
protected bool swigCMemOwn
Field Value
| Type | Description |
|---|---|
| bool |
Properties
View SourceCount
Gets the number of parameters in the array.
Declaration
public uint Count { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Methods
View SourceAttachDataChunks(SWIGTYPE_p_unsigned_char, uint)
Attaches a payload containing data chunks to a GenICam node map.
Declaration
public PvResult AttachDataChunks(SWIGTYPE_p_unsigned_char aBuffer, uint aBufferLength)
Parameters
| Type | Name | Description |
|---|---|---|
| SWIGTYPE_p_unsigned_char | aBuffer | Pointer to the buffer data (usually #PvBuffer::GetRawData) |
| uint | aBufferLength | Size of the buffer without padding (usually #PvBuffer::GetPayloadSize) |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
DetachDataChunks()
Detach previously attached data chunks.
Declaration
public PvResult DetachDataChunks()
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
Dispose()
Dispose.
Declaration
public void Dispose()
Dispose(bool)
Dispose
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
ExecuteCommand(string)
Helper method used to directly execute a command parameter of this parameter array.
Declaration
public PvResult ExecuteCommand(string aName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter to execute. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
~PvGenParameterArray()
Destructor.
Declaration
protected ~PvGenParameterArray()
Get(string)
Get a parameter (#PvGenParameter object) from the array (using parameter name).
Declaration
public PvGenParameter Get(string aName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | The parameter's name. See #PvGenParameter::GetName. |
Returns
| Type | Description |
|---|---|
| PvGenParameter | The parameter (#PvGenParameter object), or NULL if the name does not match any paramaters in the array. |
Get(uint)
Get a parameter (#PvGenParameter object) from the array (using array position).
Declaration
public PvGenParameter Get(uint aIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aIndex | The parameter's position in the array. The valid range for aIndex is from 0 to #GetCount. |
Returns
| Type | Description |
|---|---|
| PvGenParameter | The parameter (#PvGenParameter object), or NULL if the index is out of bounds. |
GetAccessMode()
Returns the access mode of the port of the GenICam node map.
Declaration
public PvGenAccessMode GetAccessMode()
Returns
| Type | Description |
|---|---|
| PvGenAccessMode | Includes:
|
GetBoolean(string)
Helper method returning a PvGenParameter casted as a PvGenBoolean.
Declaration
public PvGenBoolean GetBoolean(string aName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter. |
Returns
| Type | Description |
|---|---|
| PvGenBoolean | PvGenBoolean parameter pointer from the parameter array. |
Remarks
Returns NULL if the parameter does not exist in the node map or the parameter is not a Boolean.
GetBooleanValue(string, out bool)
Helper method used to directly read a boolean parameter value of this parameter array.
Declaration
public PvResult GetBooleanValue(string aName, out bool aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter to read the value from. |
| bool | aValue | Value read from the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
GetCategory(string)
Get a category (#PvGenCategory object) from the array (using category name).
Declaration
public PvGenCategory GetCategory(string aName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | The category's name. See PvGenCategory::GetName. |
Returns
| Type | Description |
|---|---|
| PvGenCategory | The category (#PvGenCategory object), or NULL if the name does not match any categories in the array. |
GetCategory(uint)
Get a category (#PvGenCategory object) from the array (using array position).
Declaration
public PvGenCategory GetCategory(uint aIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aIndex | The category's position in the array. The valid range for aIndex is from 0 to #GetCategoryCount. |
Returns
| Type | Description |
|---|---|
| PvGenCategory | The parameter (#PvGenCategory object), or NULL if the index is out of bounds. |
GetCategoryCount()
Get the number of categories (#PvGenCategory objects) in the array.
Declaration
public uint GetCategoryCount()
Returns
| Type | Description |
|---|---|
| uint | The number of categories (#PvGenCategory objects) in the array. |
GetCommand(string)
Helper method returning a PvGenParameter casted as a PvGenCommand.
Declaration
public PvGenCommand GetCommand(string aName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter. |
Returns
| Type | Description |
|---|---|
| PvGenCommand | PvGenBoolean parameter pointer from the parameter array. |
Remarks
Returns NULL if the parameter does not exist in the node map or the parameter is not a command.
GetEnum(string)
Helper method returning a PvGenParameter casted as a PvGenEnum.
Declaration
public PvGenEnum GetEnum(string aName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter. |
Returns
| Type | Description |
|---|---|
| PvGenEnum | PvGenEnum parameter pointer from the parameter array. |
Remarks
Returns NULL if the parameter does not exist in the node map or the parameter is not an enumeration.
GetEnumValue(string, out long)
Helper method used to directly read an enumeration parameter value (as an integer) of this parameter array.
Declaration
public PvResult GetEnumValue(string aName, out long aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter to read the value from. |
| long | aValue | Value read from the parameter, integer representation. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
GetEnumValue(string, out string)
Helper method used to directly read an enumeration parameter value (as a string) of this parameter array.
Declaration
public PvResult GetEnumValue(string aName, out string aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter to read the value from. |
| string | aValue | Value read from the parameter, string representation. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
GetFloat(string)
Helper method returning a PvGenParameter casted as a PvGenFloat.
Declaration
public PvGenFloat GetFloat(string aName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter. |
Returns
| Type | Description |
|---|---|
| PvGenFloat | PvGenFloat parameter pointer from the parameter array. |
Remarks
Returns NULL if the parameter does not exist in the node map or the parameter is not a float.
GetFloatRange(string, out double, out double)
Helper method used to directly retrieve the range of a float parameter.
Declaration
public PvResult GetFloatRange(string aName, out double aMin, out double aMax)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter. |
| double | aMin | Minimum. |
| double | aMax | Maximum. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
GetFloatValue(string, out double)
Helper method used to directly read a float parameter value of this parameter array.
Declaration
public PvResult GetFloatValue(string aName, out double aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter to read the value from. |
| double | aValue | Value read from the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
GetInteger(string)
Helper method returning a PvGenParameter casted as a PvGenInteger.
Declaration
public PvGenInteger GetInteger(string aName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter. |
Returns
| Type | Description |
|---|---|
| PvGenInteger | PvGenInteger parameter pointer from the parameter array. |
Remarks
Returns NULL if the parameter does not exist in the node map or the parameter is not an integer.
GetIntegerRange(string, out long, out long)
Helper method used to directly retrieve the range of an integer parameter.
Declaration
public PvResult GetIntegerRange(string aName, out long aMin, out long aMax)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter. |
| long | aMin | Minimum. |
| long | aMax | Maximum. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
GetIntegerValue(string, out long)
Helper method used to directly read an integer parameter value of this parameter array.
Declaration
public PvResult GetIntegerValue(string aName, out long aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter to read the value from. |
| long | aValue | Value read from the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
GetNodeMap()
Returns the interface of the GenApi node map wrapped by this PvGenParameterArray
Declaration
public SWIGTYPE_p_PV_GENAPI_NS__INodeMap GetNodeMap()
Returns
| Type | Description |
|---|---|
| SWIGTYPE_p_PV_GENAPI_NS__INodeMap | Interface of the GenApi node map wrapped by this PvGenPArameterArray |
GetRegister(string)
Helper method returning a PvGenParameter casted as a PvGenRegister.
Declaration
public PvGenRegister GetRegister(string aName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter. |
Returns
| Type | Description |
|---|---|
| PvGenRegister | PvGenRegister parameter pointer from the parameter array. |
GetString(string)
Helper method returning a PvGenParameter casted as a PvGenString.
Declaration
public PvGenString GetString(string aName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter. |
Returns
| Type | Description |
|---|---|
| PvGenString | PvGenString parameter pointer from the parameter array. |
Remarks
Returns NULL if the parameter does not exist in the node map or the parameter is not a string.
GetStringValue(string, out string)
Helper method used to directly read a string parameter value of this parameter array.
Declaration
public PvResult GetStringValue(string aName, out string aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter to read the value from. |
| string | aValue | Value read from the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
InvalidateCache()
Invalidates the cache of the GenICam parameter array.
Declaration
public PvResult InvalidateCache()
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
Poll()
Invalidates nodes having reach their defined polling time since last update.
Declaration
public PvResult Poll()
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
SetBooleanValue(string, bool)
Helper method used to directly write a boolean parameter value of this parameter array.
Declaration
public PvResult SetBooleanValue(string aName, bool aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter to write the value to. |
| bool | aValue | Value written to the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
SetEnumValue(string, long)
Helper method used to directly write an enumeration parameter value (as an integer) of this parameter array.
Declaration
public PvResult SetEnumValue(string aName, long aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter to write the value to. |
| long | aValue | Value written to the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
SetEnumValue(string, string)
Helper method used to directly write an enumeration parameter value (as a string) of this parameter array.
Declaration
public PvResult SetEnumValue(string aName, string aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter to write the value to. |
| string | aValue | Value written to the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
SetFloatValue(string, double)
Helper method used to directly write a float parameter value of this parameter array.
Declaration
public PvResult SetFloatValue(string aName, double aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter to write the value to. |
| double | aValue | Value written to the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
SetIntegerValue(string, long)
Helper method used to directly write an integer parameter value of this parameter array.
Declaration
public PvResult SetIntegerValue(string aName, long aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter to write the value to. |
| long | aValue | Value written to the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
SetStringValue(string, string)
Helper method used to directly write a string parameter value of this parameter array.
Declaration
public PvResult SetStringValue(string aName, string aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | Name of the parameter to write the value to. |
| string | aValue | Value written to the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|