Class PvGenStateStack
Performs changes to a GenICam node map, tracks them and restores the previous state on destruction.
Implements
Inherited Members
Namespace: eBUSDotNet
Assembly: eBUSDotNet.dll
Syntax
public class PvGenStateStack : IDisposable
Remarks
This class can be used to perform temporary changes to a GenICam node map. Every parameter changed through this class is tracked and its original value is saved. When the object is destroyed, the original value of all parameters is restored in the reverse order.
This class is very useful when dealing with selectors. If you want to change a selected value
without affecting the current selector state of the node map, create an object of this type,
change the selector(s) using the Set methods, perform your changes and let the object go
out of scope: the selectors will go back to their original values.
Assume A is originally 1, B is 2, C is 3. If you use this class to change A 4, B to 5 and C to 6
(in that order) when the object goes out of scope C will be set back to 3, B to 2 and A to 1 (in that
order as well).
If a value cannot be set (an error occurs) the previous value is not pushed on the stack of
parameters that will be restored when the destructor is called.
If the parameter is already set to the requested value, its value IS NOT changed, and IS NOT
pushed on the stack to be eventually restored. This is done to minimize traffic to the device
and prevent too much invalidators to be fired when a selector is already set to the rigth value.
Constructors
View SourcePvGenStateStack(PvGenParameterArray)
Constructor.
Declaration
public PvGenStateStack(PvGenParameterArray aParameters)
Parameters
| Type | Name | Description |
|---|---|---|
| PvGenParameterArray | aParameters | The GenICam parameter array to operate on. |
Fields
View SourceswigCMemOwn
Determines who is responsible for deleting the underlying C++ object.
Declaration
protected bool swigCMemOwn
Field Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceDispose()
Dispose.
Declaration
public void Dispose()
Dispose(bool)
Dispose
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
~PvGenStateStack()
Destructor.
Declaration
protected ~PvGenStateStack()
SetBooleanValue(string, bool)
Changes the value of a boolean parameter.
Declaration
public PvResult SetBooleanValue(string aName, bool aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | The name of the parameter to change. |
| bool | aValue | The new value of the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
SetEnumValue(string, long)
Changes the value of an enum parameter.
Declaration
public PvResult SetEnumValue(string aName, long aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | The name of the parameter to change. |
| long | aValue | The new integer value of the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
SetEnumValue(string, string)
Changes the value of an enum parameter.
Declaration
public PvResult SetEnumValue(string aName, string aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | The name of the parameter to change. |
| string | aValue | The new symbolic (string) value of the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
SetFloatValue(string, double)
Changes the value of a float parameter.
Declaration
public PvResult SetFloatValue(string aName, double aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | The name of the parameter to change. |
| double | aValue | The new value of the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
SetIntegerValue(string, long)
Changes the value of an integer parameter.
Declaration
public PvResult SetIntegerValue(string aName, long aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | The name of the parameter to change. |
| long | aValue | The new value of the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
SetStringValue(string, string)
Changes the value of a string parameter.
Declaration
public PvResult SetStringValue(string aName, string aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aName | The name of the parameter to change. |
| string | aValue | The new value of the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|