Skip to content

Pylon::CIntegerParameter#

CIntegerParameter class used to simplify access to GenApi parameters.

#include <pylon/IntegerParameter.h>

Inherits from Pylon::IIntegerEx, Pylon::CParameter, GenApi::IInteger, Pylon::IValueEx, GenApi::IValue, GenApi::IBase

Public Functions#

Name
CIntegerParameter()
Creates an empty CIntegerParameter object.
CIntegerParameter(GenApi::INode * pNode)
Creates a CIntegerParameter object and attaches it to a node, typically retrieved for a nodemap calling GetNode().
CIntegerParameter(GenApi::IInteger * pInteger)
Creates a CIntegerParameter object and attaches it to a node of a matching type.
CIntegerParameter(GenApi::INodeMap * pNodeMap, const char * pName)
Creates a CIntegerParameter object and attaches it to a node retrieved from the provided node map.
CIntegerParameter(GenApi::INodeMap & nodeMap, const char * pName)
Creates a CIntegerParameter object and attaches it to a node retrieved from the provided node map.
CIntegerParameter(const CIntegerParameter & rhs)
Copies a CIntegerParameter object.
virtual ~CIntegerParameter()
Destroys the CIntegerParameter object.
virtual bool Attach(GenApi::INodeMap * pNodeMap, const char * pName)
Attaches a node retrieved from the provided node map.
virtual bool Attach(GenApi::INodeMap & nodeMap, const char * pName)
Attaches a node retrieved from the provided node map.
virtual bool Attach(GenApi::INode * pNode)
Attaches a node, typically retrieved for a nodemap calling GetNode().
virtual bool Attach(GenApi::IInteger * pInteger)
Assigns a node of the same type to the parameter object.
CIntegerParameter & operator=(const CIntegerParameter & rhs)
Assigns a CIntegerParameter object.
virtual bool Equals(const CIntegerParameter & rhs) const
Returns true if the same nodes are attached or both parameters are empty.
virtual bool Equals(const GenApi::INode * pNode) const
Returns true if the attached node pointer is equal.
virtual bool Equals(const GenApi::IInteger * pInteger) const
Returns true if the attached node pointer is equal.
virtual void Release()
Releases the attached node.
virtual bool IsValid() const
Indicates whether a node is attached.
virtual void SetValue(int64_t Value, bool Verify =true)
Set node value.
virtual GenApi::IInteger & operator=(int64_t Value)
Set node value.
virtual int64_t GetValue(bool Verify =false, bool IgnoreCache =false)
Get node value.
virtual int64_t operator()()
Get node value.
virtual int64_t operator*()
Get node value.
virtual int64_t GetMin()
Get minimum value allowed.
virtual int64_t GetMax()
Get maximum value allowed.
virtual GenApi::EIncMode GetIncMode()
Get increment mode.
virtual int64_t GetInc()
Get increment.
virtual GenApi::int64_autovector_t GetListOfValidValues(bool bounded =true)
Get list of valid value.
virtual GenApi::ERepresentation GetRepresentation()
Get recommended representation.
virtual GenICam::gcstring GetUnit()
Get the physical unit name.
virtual void ImposeMin(int64_t Value)
Restrict minimum value.
virtual void ImposeMax(int64_t Value)
Restrict maximum value.
virtual bool TrySetValue(int64_t value)
Sets the value of the parameter if the parameter is writable.
virtual int64_t GetValueOrDefault(int64_t defaultValue)
Gets the value of the parameter if the parameter is readable.
virtual bool TrySetValue(int64_t value, EIntegerValueCorrection correction)
Sets the value of the parameter if the parameter is writable and readable.
virtual void SetValue(int64_t value, EIntegerValueCorrection correction)
Sets the value of the parameter.
virtual double GetValuePercentOfRange()
Gets the value of the parameter in percent of its value range (from minimum to maximum).
virtual void SetValuePercentOfRange(double percentOfRange)
Sets the value of the parameter to a value within its range, using this formula (simplified): ((max - min) * (percentOfRange / 100.0)) + min.
virtual bool TrySetValuePercentOfRange(double percentOfRange)
If the parameter is writable and readable, sets the value of the parameter to a value within its range, using this formula (simplified): ((max - min) * (percentOfRange / 100.0)) + min.
virtual void SetToMaximum()
Sets the value of the parameter to the maximum possible value.
virtual void SetToMinimum()
Sets the value of the parameter to the minimum possible value.
virtual bool TrySetToMaximum()
Sets the value of the parameter to the maximum possible value if the parameter is readable and writable.
virtual bool TrySetToMinimum()
Sets the value of the parameter to the minimum possible value if the parameter is readable and writable.
virtual INode * GetNode()
Get the INode interface of the node.
virtual GenICam::gcstring ToString(bool Verify =false, bool IgnoreCache =false)
Get content of the node as string.
virtual void FromString(const GenICam::gcstring & ValueStr, bool Verify =true)
Set content of the node as string.
virtual bool IsValueCacheValid() const
Checks if the value comes from cache or is requested from another node.
virtual EAccessMode GetAccessMode() const
Get the access mode of the node.
virtual bool IsReadable() const
Indicates whether the parameter is readable.
virtual bool IsWritable() const
Indicates whether the parameter is writable.
virtual String_t GetInfo(EParameterInfo info)
Gets the parameter information.
virtual String_t GetInfoOrDefault(EParameterInfo info, const String_t defaultInfo)
Gets the parameter information if the parameter is attached to a node.
virtual String_t ToStringOrDefault(const String_t & defaultValue)
Gets the parameter value as string if the parameter is readable.
virtual bool Attach(GenApi::IValue * pValue)
Assigns a node of the same type to the parameter object.
virtual bool Equals(const CParameter & rhs) const
Returns true if the same nodes are attached or both parameters are empty.
virtual bool Equals(const GenApi::IValue * pValue) const
Returns true if the attached node pointer is equal.
virtual GenApi::EAccessMode GetAccessMode() const
Get the access mode of the node.
virtual GenApi::INode * GetNode()
Get the INode interface of the node.
virtual GenICam::gcstring ToString(bool Verify =false, bool IgnoreCache =false)
Get content of the node as string.
virtual void FromString(const GenICam::gcstring & ValueStr, bool Verify =true)
Set content of the node as string.
virtual bool IsValueCacheValid() const
Checks if the value comes from cache or is requested from another node.
virtual bool IsReadable() const
Indicates whether the parameter is readable.
virtual bool IsWritable() const
Indicates whether the parameter is writable.
virtual String_t GetInfo(EParameterInfo info)
Gets the parameter information.
virtual String_t GetInfoOrDefault(EParameterInfo info, const String_t defaultInfo)
Gets the parameter information if the parameter is attached to a node.
virtual String_t ToStringOrDefault(const String_t & defaultValue)
Gets the parameter value as string if the parameter is readable.

Protected Attributes#

Name
GenApi::IInteger * m_pFeature
GenApi::IValue * m_pValue

Additional inherited members#

Public Functions inherited from Pylon::CParameter

Name
CParameter()
Creates an empty CParameter object.
CParameter(GenApi::INode * pNode)
Creates a CParameter object and attaches it to a node, typically retrieved for a nodemap calling GetNode().
CParameter(GenApi::IValue * pValue)
Creates a CParameter object and attaches it to a node of a matching type.
CParameter(GenApi::INodeMap * pNodeMap, const char * pName)
Creates a CParameter object and attaches it to a node retrieved from the provided node map.
CParameter(GenApi::INodeMap & nodeMap, const char * pName)
Creates a CParameter object and attaches it to a node retrieved from the provided node map.
CParameter(const CParameter & rhs)
Copies a CParameter object.
virtual ~CParameter()
Destroys the CParameter object.

Public Functions inherited from GenApi::IBase

Name
virtual ~IBase()
Virtual destructor enforcing virtual destructor on all derived classes.

Public Functions Documentation#

CIntegerParameter#

CIntegerParameter()

Creates an empty CIntegerParameter object.

Error Safety:

Does not throw C++ exceptions.

CIntegerParameter#

explicit CIntegerParameter(
    GenApi::INode * pNode
)

Creates a CIntegerParameter object and attaches it to a node, typically retrieved for a nodemap calling GetNode().

Parameters:

  • pNode The node to attach.

Postcondition:

  • If the passed node does not match the parameter type, the parameter will be empty, see IsValid().
  • If the passed node does match the parameter type, it is attached and the parameter object can be used to access the node's functionality.
  • The parameter object must not be used to access the node's functionality if the source of the attached pNode has been destroyed. In this case, call Release() or attach a new node.

Error Safety:

Does not throw C++ exceptions.

CIntegerParameter#

explicit CIntegerParameter(
    GenApi::IInteger * pInteger
)

Creates a CIntegerParameter object and attaches it to a node of a matching type.

Parameters:

  • pInteger The node to attach.

Postcondition: The parameter object must not be used to access the node's functionality if the source of the attached pInteger has been destroyed. In this case, call Release() or attach a new node.

Error Safety:

Does not throw C++ exceptions.

CIntegerParameter#

CIntegerParameter(
    GenApi::INodeMap * pNodeMap,
    const char * pName
)

Creates a CIntegerParameter object and attaches it to a node retrieved from the provided node map.

Parameters:

  • pNodeMap The node map. The source of the parameter.
  • pName The name of the parameter to attach.

Postcondition:

  • If pNodeMap or name is NULL, the parameter will be empty, see IsValid().
  • If the node does not match the parameter type, the parameter will be empty, see IsValid().
  • If the node does match the parameter type, it is attached and the parameter object can be used to access the node's functionality.
  • The parameter object must not be used to access the node's functionality if the provided node map has been destroyed. In this case, call Release() or attach a new node.

Error Safety:

The call to GenApi::INodeMap::GetNode can throw C++ exceptions.

CIntegerParameter#

CIntegerParameter(
    GenApi::INodeMap & nodeMap,
    const char * pName
)

Creates a CIntegerParameter object and attaches it to a node retrieved from the provided node map.

Parameters:

  • nodeMap The node map. The source of the parameter.
  • pName The name of the parameter to attach.

Postcondition:

  • If name is NULL, the parameter will be empty, see IsValid().
  • If the node does not match the parameter type, the parameter will be empty, see IsValid().
  • If the node does match the parameter type, it is attached and the parameter object can be used to access the node's functionality.
  • The parameter object must not be used to access the node's functionality if the provided node map has been destroyed. In this case, call Release() or attach a new node.

Error Safety:

The call to GenApi::INodeMap::GetNode can throw C++ exceptions.

CIntegerParameter#

CIntegerParameter(
    const CIntegerParameter & rhs
)

Copies a CIntegerParameter object.

Parameters:

  • rhs The object to copy.

Error Safety:

Does not throw C++ exceptions.

~CIntegerParameter#

virtual ~CIntegerParameter()

Destroys the CIntegerParameter object.

Error Safety:

Does not throw C++ exceptions.

Does not access the attached node.

Attach#

virtual bool Attach(
    GenApi::INodeMap * pNodeMap,
    const char * pName
)

Attaches a node retrieved from the provided node map.

Parameters:

  • pNodeMap The node map. The source of the parameter.
  • pName The name of the parameter to attach.

Return: Returns true if the node has been attached.

Postcondition:

  • If pNodeMap or name is NULL, the parameter will be empty, see IsValid().
  • If the node does not match the parameter type, the parameter will be empty, see IsValid().
  • If the node does match the parameter type, it is attached and the parameter object can be used to access the node's functionality.
  • The parameter object must not be used to access the node's functionality if the provided node map has been destroyed. In this case, call Release() or attach a new node.

Error Safety:

The call to GenApi::INodeMap::GetNode can throw C++ exceptions.

Reimplements: Pylon::CParameter::Attach

Attach#

virtual bool Attach(
    GenApi::INodeMap & nodeMap,
    const char * pName
)

Attaches a node retrieved from the provided node map.

Parameters:

  • nodeMap The node map. The source of the parameter.
  • pName The name of the parameter to attach.

Return: Returns true if the node has been attached.

Postcondition:

  • If name is NULL the parameter will be empty, see IsValid().
  • If the node does not match the parameter type, the parameter will be empty, see IsValid().
  • If the node does match the parameter type, it is attached and the parameter object can be used to access the node's functionality.
  • The parameter object must not be used to access the node's functionality if the provided node map has been destroyed. In this case, call Release() or attach a new node.

Error Safety:

The call to GenApi::INodeMap::GetNode can throw C++ exceptions.

Reimplements: Pylon::CParameter::Attach

Attach#

virtual bool Attach(
    GenApi::INode * pNode
)

Attaches a node, typically retrieved for a nodemap calling GetNode().

Parameters:

  • pNode The node to assign.

Return: Returns true if the node has been attached.

Postcondition:

  • If the node does not match the parameter type, the parameter will be empty, see IsValid().
  • If the node does match the parameter type, it is attached and the parameter object can be used to access the node's functionality.
  • The parameter object must not be used to access the node's functionality if the source of the attached pNode has been destroyed. In this case, call Release() or attach a new node.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CParameter::Attach

Attach#

virtual bool Attach(
    GenApi::IInteger * pInteger
)

Assigns a node of the same type to the parameter object.

Parameters:

  • pInteger The node to assign.

Return: Returns true if the node has been attached.

Error Safety:

Does not throw C++ exceptions.

operator=#

CIntegerParameter & operator=(
    const CIntegerParameter & rhs
)

Assigns a CIntegerParameter object.

Parameters:

  • rhs The object to assign.

Error Safety:

Does not throw C++ exceptions.

Equals#

virtual bool Equals(
    const CIntegerParameter & rhs
) const

Returns true if the same nodes are attached or both parameters are empty.

Parameters:

  • rhs The object to compare to.

Return: Returns true if the same nodes are attached or both parameters are empty.

Error Safety:

Does not throw C++ exceptions.

Equals#

virtual bool Equals(
    const GenApi::INode * pNode
) const

Returns true if the attached node pointer is equal.

Parameters:

  • pNode The node to compare to.

Return: Returns true if the attached node pointer is equal.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CParameter::Equals

Equals#

virtual bool Equals(
    const GenApi::IInteger * pInteger
) const

Returns true if the attached node pointer is equal.

Parameters:

  • pInteger The node to compare to.

Return: Returns true if the attached node pointer is equal.

Error Safety:

Does not throw C++ exceptions.

Release#

virtual void Release()

Releases the attached node.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CParameter::Release

IsValid#

virtual bool IsValid() const

Indicates whether a node is attached.

Return: Returns true if a node is attached.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CParameter::IsValid

SetValue#

virtual void SetValue(
    int64_t Value,
    bool Verify =true
)

Set node value.

Parameters:

  • Value The value to set
  • Verify Enables AccessMode and Range verification (default = true)

Reimplements: GenApi::IInteger::SetValue

operator=#

virtual GenApi::IInteger & operator=(
    int64_t Value
)

Set node value.

Reimplements: GenApi::IInteger::operator=

GetValue#

virtual int64_t GetValue(
    bool Verify =false,
    bool IgnoreCache =false
)

Get node value.

Parameters:

  • Verify Enables Range verification (default = false). The AccessMode is always checked
  • IgnoreCache If true the value is read ignoring any caches (default = false)

Return: The value read

Reimplements: GenApi::IInteger::GetValue

operator()#

virtual int64_t operator()()

Get node value.

Reimplements: GenApi::IInteger::operator()

operator*#

virtual int64_t operator*()

Get node value.

Reimplements: GenApi::IInteger::operator*

GetMin#

virtual int64_t GetMin()

Get minimum value allowed.

Reimplements: GenApi::IInteger::GetMin

GetMax#

virtual int64_t GetMax()

Get maximum value allowed.

Reimplements: GenApi::IInteger::GetMax

GetIncMode#

virtual GenApi::EIncMode GetIncMode()

Get increment mode.

Reimplements: GenApi::IInteger::GetIncMode

GetInc#

virtual int64_t GetInc()

Get increment.

Reimplements: GenApi::IInteger::GetInc

GetListOfValidValues#

virtual GenApi::int64_autovector_t GetListOfValidValues(
    bool bounded =true
)

Get list of valid value.

Reimplements: GenApi::IInteger::GetListOfValidValues

GetRepresentation#

virtual GenApi::ERepresentation GetRepresentation()

Get recommended representation.

Reimplements: GenApi::IInteger::GetRepresentation

GetUnit#

virtual GenICam::gcstring GetUnit()

Get the physical unit name.

Reimplements: GenApi::IInteger::GetUnit

ImposeMin#

virtual void ImposeMin(
    int64_t Value
)

Restrict minimum value.

Reimplements: GenApi::IInteger::ImposeMin

ImposeMax#

virtual void ImposeMax(
    int64_t Value
)

Restrict maximum value.

Reimplements: GenApi::IInteger::ImposeMax

TrySetValue#

virtual bool TrySetValue(
    int64_t value
)

Sets the value of the parameter if the parameter is writable.

Parameters:

  • value The value to set.

Return: Returns false if the parameter is not writable.

Precondition:

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exceptions if the preconditions are not met or if writing the value fails.

Reimplements: Pylon::IIntegerEx::TrySetValue

The value must be in the valid range and the increment must be correct.

GetValueOrDefault#

virtual int64_t GetValueOrDefault(
    int64_t defaultValue
)

Gets the value of the parameter if the parameter is readable.

Parameters:

  • defaultValue The default value returned if the parameter is not readable.

Return: Returns the parameter value if the parameter is readable. Otherwise returns the default value.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exception if reading the value fails.

Reimplements: Pylon::IIntegerEx::GetValueOrDefault

Otherwise returns the default value.

TrySetValue#

virtual bool TrySetValue(
    int64_t value,
    EIntegerValueCorrection correction
)

Sets the value of the parameter if the parameter is writable and readable.

Parameters:

  • value The value to set.
  • correction The correction method.

Return: Returns false if the parameter is not readable or not writable.

Note: Calls TrySetValue(GenApi::IInteger*, int64_t) if correction equals IntegerValueCorrection_None.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exceptions if writing the value fails.

Reimplements: Pylon::IIntegerEx::TrySetValue

The value is automatically corrected if needed.

SetValue#

virtual void SetValue(
    int64_t value,
    EIntegerValueCorrection correction
)

Sets the value of the parameter.

Parameters:

  • value The value to set.
  • correction The correction method.

Note: Calls GenApi::IInteger::SetValue(int64_t) if correction equals IntegerValueCorrection_None.

Precondition:

  • The parameter must be writable.
  • The parameter must be readable.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exceptions if the preconditions are not met or if writing the value fails.

Reimplements: Pylon::IIntegerEx::SetValue

The value is automatically corrected if needed.

GetValuePercentOfRange#

virtual double GetValuePercentOfRange()

Gets the value of the parameter in percent of its value range (from minimum to maximum).

Return: Returns the parameter value in percent of its value range. Returns 100 if minimum equals maximum.

Precondition: The parameter must be readable.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exceptions if writing the value fails.

Reimplements: Pylon::IIntegerEx::GetValuePercentOfRange

SetValuePercentOfRange#

virtual void SetValuePercentOfRange(
    double percentOfRange
)

Sets the value of the parameter to a value within its range, using this formula (simplified): ((max - min) * (percentOfRange / 100.0)) + min.

Parameters:

  • percentOfRange The percentage of the range to be used in the calculation.

Precondition:

  • The parameter must be writable.
  • The parameter must be readable.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exceptions if writing the value fails.

Reimplements: Pylon::IIntegerEx::SetValuePercentOfRange

The value is always corrected to the nearest valid value.

The parameter must be writable.

TrySetValuePercentOfRange#

virtual bool TrySetValuePercentOfRange(
    double percentOfRange
)

If the parameter is writable and readable, sets the value of the parameter to a value within its range, using this formula (simplified): ((max - min) * (percentOfRange / 100.0)) + min.

Parameters:

  • percentOfRange The percentage of the range to be used in the calculation.

Return: Returns true if the a value has been set.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exceptions if writing the value fails.

Reimplements: Pylon::IIntegerEx::TrySetValuePercentOfRange

The value is always corrected to the nearest valid value.

SetToMaximum#

virtual void SetToMaximum()

Sets the value of the parameter to the maximum possible value.

Precondition:

  • The parameter must be writable.
  • The parameter must be readable.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exceptions if the parameter is not writable, not readable, or if reading or writing fails.

Reimplements: Pylon::IIntegerEx::SetToMaximum

SetToMinimum#

virtual void SetToMinimum()

Sets the value of the parameter to the minimum possible value.

Precondition:

  • The parameter must be writable.
  • The parameter must be readable.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exceptions if the parameter is not writable, not readable, or if reading or writing fails.

Reimplements: Pylon::IIntegerEx::SetToMinimum

TrySetToMaximum#

virtual bool TrySetToMaximum()

Sets the value of the parameter to the maximum possible value if the parameter is readable and writable.

Return: Returns true if the maximum value has been set.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exceptions if reading or writing fails.

Reimplements: Pylon::IIntegerEx::TrySetToMaximum

TrySetToMinimum#

virtual bool TrySetToMinimum()

Sets the value of the parameter to the minimum possible value if the parameter is readable and writable.

Return: Returns true if the minimum value has been set.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exceptions if reading or writing fails.

Reimplements: Pylon::IIntegerEx::TrySetToMinimum

GetNode#

inline virtual INode * GetNode()

Get the INode interface of the node.

Reimplemented by: Pylon::CArrayParameter::GetNode

ToString#

virtual GenICam::gcstring ToString(
    bool Verify =false,
    bool IgnoreCache =false
) 

Get content of the node as string.

Parameters:

  • Verify Enables Range verification (default = false). The AccessMode is always checked
  • IgnoreCache If true the value is read ignoring any caches (default = false)

Return: The value read

Reimplemented by: Pylon::CArrayParameter::ToString

FromString#

virtual void FromString(
    const GenICam::gcstring & ValueStr,
    bool Verify =true
) 

Set content of the node as string.

Parameters:

  • ValueStr The value to set
  • Verify Enables AccessMode and Range verification (default = true)

Reimplemented by: Pylon::CArrayParameter::FromString

IsValueCacheValid#

virtual bool IsValueCacheValid() const 

Checks if the value comes from cache or is requested from another node.

Reimplemented by: Pylon::CArrayParameter::IsValueCacheValid

GetAccessMode#

virtual EAccessMode GetAccessMode() const 

Get the access mode of the node.

Reimplemented by: Pylon::CArrayParameter::GetAccessMode

IsReadable#

virtual bool IsReadable() const 

Indicates whether the parameter is readable.

Return: Returns true if the parameter is readable.

Error Safety:

Does not throw C++ exceptions.

Reimplemented by: Pylon::CArrayParameter::IsReadable

IsWritable#

virtual bool IsWritable() const 

Indicates whether the parameter is writable.

Return: Returns true if the parameter is writable.

Error Safety:

Does not throw C++ exceptions.

Reimplemented by: Pylon::CArrayParameter::IsWritable

GetInfo#

virtual String_t GetInfo(
    EParameterInfo info
) 

Gets the parameter information.

Parameters:

  • info The type information to return.

Return: Returns the parameter information.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Throws an exception if no node is attached. Can throw exceptions if the retrieval of the information fails.

Reimplemented by: Pylon::CArrayParameter::GetInfo

GetInfoOrDefault#

virtual String_t GetInfoOrDefault(
    EParameterInfo info,
    const String_t defaultInfo
) 

Gets the parameter information if the parameter is attached to a node.

Parameters:

  • info The type information to return. Otherwise returns the default information. This method is useful if you want to display parameter information and handle the case that some parameters are not available for a device.
  • defaultInfo The default information returned if the parameter is not attached to a node.

Return: Returns the parameter information if the parameter is attached to a node. Otherwise returns the default information.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exceptions if the retrieval of the information fails.

Reimplemented by: Pylon::CArrayParameter::GetInfoOrDefault

See IsValid().

ToStringOrDefault#

virtual String_t ToStringOrDefault(
    const String_t & defaultValue
) 

Gets the parameter value as string if the parameter is readable.

Parameters:

  • defaultValue The default value returned if the parameter is not readable.

Return: Returns the parameter value if the parameter is readable. Otherwise returns the default value.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exceptions if reading the value fails.

Reimplemented by: Pylon::CArrayParameter::ToStringOrDefault

Otherwise returns the default value.

Attach#

virtual bool Attach(
    GenApi::IValue * pValue
)

Assigns a node of the same type to the parameter object.

Parameters:

  • pValue The node to assign.

Return: Returns true if the node has been attached.

Error Safety:

Does not throw C++ exceptions.

Equals#

virtual bool Equals(
    const CParameter & rhs
) const

Returns true if the same nodes are attached or both parameters are empty.

Parameters:

  • rhs The object to compare to.

Return: Returns true if the same nodes are attached or both parameters are empty.

Error Safety:

Does not throw C++ exceptions.

Equals#

virtual bool Equals(
    const GenApi::IValue * pValue
) const

Returns true if the attached node pointer is equal.

Parameters:

  • pValue The node to compare to.

Return: Returns true if the attached node pointer is equal.

Error Safety:

Does not throw C++ exceptions.

GetAccessMode#

virtual GenApi::EAccessMode GetAccessMode() const

Get the access mode of the node.

Reimplements: GenApi::IBase::GetAccessMode

GetNode#

virtual GenApi::INode * GetNode()

Get the INode interface of the node.

Reimplements: GenApi::IBoolean::GetNode

ToString#

virtual GenICam::gcstring ToString(
    bool Verify =false,
    bool IgnoreCache =false
)

Get content of the node as string.

Parameters:

  • Verify Enables Range verification (default = false). The AccessMode is always checked
  • IgnoreCache If true the value is read ignoring any caches (default = false)

Return: The value read

Reimplements: GenApi::IBoolean::ToString

FromString#

virtual void FromString(
    const GenICam::gcstring & ValueStr,
    bool Verify =true
)

Set content of the node as string.

Parameters:

  • ValueStr The value to set
  • Verify Enables AccessMode and Range verification (default = true)

Reimplements: GenApi::IBoolean::FromString

IsValueCacheValid#

virtual bool IsValueCacheValid() const

Checks if the value comes from cache or is requested from another node.

Reimplements: GenApi::IBoolean::IsValueCacheValid

IsReadable#

virtual bool IsReadable() const

Indicates whether the parameter is readable.

Return: Returns true if the parameter is readable.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CArrayParameter::IsReadable

IsWritable#

virtual bool IsWritable() const

Indicates whether the parameter is writable.

Return: Returns true if the parameter is writable.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CArrayParameter::IsWritable

GetInfo#

virtual String_t GetInfo(
    EParameterInfo info
)

Gets the parameter information.

Parameters:

  • info The type information to return.

Return: Returns the parameter information.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Throws an exception if no node is attached. Can throw exceptions if the retrieval of the information fails.

Reimplements: Pylon::CArrayParameter::GetInfo

GetInfoOrDefault#

virtual String_t GetInfoOrDefault(
    EParameterInfo info,
    const String_t defaultInfo
)

Gets the parameter information if the parameter is attached to a node.

Parameters:

  • info The type information to return. Otherwise returns the default information. This method is useful if you want to display parameter information and handle the case that some parameters are not available for a device.
  • defaultInfo The default information returned if the parameter is not attached to a node.

Return: Returns the parameter information if the parameter is attached to a node. Otherwise returns the default information.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exceptions if the retrieval of the information fails.

Reimplements: Pylon::CArrayParameter::GetInfoOrDefault

See IsValid().

ToStringOrDefault#

virtual String_t ToStringOrDefault(
    const String_t & defaultValue
)

Gets the parameter value as string if the parameter is readable.

Parameters:

  • defaultValue The default value returned if the parameter is not readable.

Return: Returns the parameter value if the parameter is readable. Otherwise returns the default value.

Thread Safety:

The method accesses the parameter multiple times. These accesses are not synchronized by a lock.

Error Safety:

Can throw exceptions if reading the value fails.

Reimplements: Pylon::CArrayParameter::ToStringOrDefault

Otherwise returns the default value.

Protected Attributes Documentation#

m_pFeature#

GenApi::IInteger * m_pFeature;

m_pValue#

GenApi::IValue * m_pValue;

Updated on 5 July 2022 at 15:30:00