Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvGenStateStack Class Reference

Performs changes to a GenICam node map, tracks them and restores the previous state on destruction. More...

Public Member Functions

 PvGenStateStack (PvGenParameterArray *aParameters)
 Constructor. More...
 
virtual ~PvGenStateStack ()
 Destructor.
 
PvResult SetIntegerValue (const PvString &aName, int64_t aValue)
 Changes the value of an integer parameter. More...
 
PvResult SetFloatValue (const PvString &aName, double aValue)
 Changes the value of a float parameter. More...
 
PvResult SetEnumValue (const PvString &aName, const PvString &aValue)
 Changes the value of an enum parameter. More...
 
PvResult SetEnumValue (const PvString &aName, int64_t aValue)
 Changes the value of an enum parameter. More...
 
PvResult SetBooleanValue (const PvString &aName, bool aValue)
 Changes the value of a boolean parameter. More...
 
PvResult SetStringValue (const PvString &aName, const PvString &aValue)
 Changes the value of a string parameter. More...
 

Detailed Description

Performs changes to a GenICam node map, tracks them and restores the previous state on destruction.

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.

Constructor & Destructor Documentation

◆ PvGenStateStack()

PvGenStateStack::PvGenStateStack ( PvGenParameterArray aParameters)

Constructor.

Parameters
[in]aParametersThe GenICam parameter array to operate on.

Member Function Documentation

◆ SetBooleanValue()

PvResult PvGenStateStack::SetBooleanValue ( const PvString aName,
bool  aValue 
)

Changes the value of a boolean parameter.

Parameters
[in]aNameThe name of the parameter to change.
[in]aValueThe new value of the parameter.
Returns
Includes:

◆ SetEnumValue() [1/2]

PvResult PvGenStateStack::SetEnumValue ( const PvString aName,
const PvString aValue 
)

Changes the value of an enum parameter.

Parameters
[in]aNameThe name of the parameter to change.
[in]aValueThe new symbolic (string) value of the parameter.
Returns
Includes:

◆ SetEnumValue() [2/2]

PvResult PvGenStateStack::SetEnumValue ( const PvString aName,
int64_t  aValue 
)

Changes the value of an enum parameter.

Parameters
[in]aNameThe name of the parameter to change.
[in]aValueThe new integer value of the parameter.
Returns
Includes:

◆ SetFloatValue()

PvResult PvGenStateStack::SetFloatValue ( const PvString aName,
double  aValue 
)

Changes the value of a float parameter.

Parameters
[in]aNameThe name of the parameter to change.
[in]aValueThe new value of the parameter.
Returns
Includes:

◆ SetIntegerValue()

PvResult PvGenStateStack::SetIntegerValue ( const PvString aName,
int64_t  aValue 
)

Changes the value of an integer parameter.

Parameters
[in]aNameThe name of the parameter to change.
[in]aValueThe new value of the parameter.
Returns
Includes:

◆ SetStringValue()

PvResult PvGenStateStack::SetStringValue ( const PvString aName,
const PvString aValue 
)

Changes the value of a string parameter.

Parameters
[in]aNameThe name of the parameter to change.
[in]aValueThe new value of the parameter.
Returns
Includes:

The documentation for this class was generated from the following files:

Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com