Pylon Logo Basler Logo
Public Member Functions | List of all members
Pylon::IFloatEx Struct Referenceabstract

Extends the GenApi::IFloat interface with convenience methods. More...

#include <pylon/FloatParameter.h>

Inheritance diagram for Pylon::IFloatEx:
Inheritance graph
[legend]

Public Member Functions

virtual bool TrySetValue (double value)=0
 Sets the value of the parameter if the parameter is writable. More...
 
virtual double GetValueOrDefault (double defaultValue)=0
 Gets the value of the parameter if the parameter is readable. More...
 
virtual bool TrySetValue (double value, EFloatValueCorrection correction)=0
 Sets the value of the parameter if the parameter is writable and readable. More...
 
virtual void SetValue (double value, EFloatValueCorrection correction)=0
 Sets the value of the parameter. More...
 
virtual double GetValuePercentOfRange ()=0
 Gets the value of the parameter in percent of its value range (from minimum to maximum). More...
 
virtual void SetValuePercentOfRange (double percentOfRange)=0
 Sets the value of the parameter to a value within its range, using this formula (simplified): ((max - min) * (percentOfRange / 100.0)) + min. More...
 
virtual bool TrySetValuePercentOfRange (double percentOfRange)=0
 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. More...
 
virtual void SetToMaximum ()=0
 Sets the parameter value to the maximum possible value. More...
 
virtual void SetToMinimum ()=0
 Sets the parameter value to the minimum possible value. More...
 
virtual bool TrySetToMaximum ()=0
 Sets the parameter value to the maximum possible value if the parameter is readable and writable. More...
 
virtual bool TrySetToMinimum ()=0
 Sets the parameter value to the minimum possible value if the parameter is readable and writable. More...
 
virtual void GetAlternativeIntegerRepresentation (CIntegerParameter &parameter)=0
 Gets the alternative integer representation of the float parameter, if available. More...
 
virtual void SetValue (double Value, bool Verify=true)=0
 Set node value. More...
 
virtual double GetValue (bool Verify=false, bool IgnoreCache=false)=0
 Get node value. More...
 
virtual double operator() ()=0
 Get node value.
 
virtual double operator* ()=0
 Get node value.
 
virtual double GetMin ()=0
 Get minimum value allowed.
 
virtual double GetMax ()=0
 Get maximum value allowed.
 
virtual bool HasInc ()=0
 True if the float has a constant increment.
 
virtual EIncMode GetIncMode ()=0
 Get increment mode.
 
virtual double GetInc ()=0
 Get the constant increment if there is any.
 
virtual double_autovector_t GetListOfValidValues (bool bounded=true)=0
 Get list of valid value.
 
virtual ERepresentation GetRepresentation ()=0
 Get recommended representation.
 
virtual GenICam::gcstring GetUnit () const =0
 Get the physical unit name.
 
virtual EDisplayNotation GetDisplayNotation () const =0
 Get the way the float should be converted to a string.
 
virtual int64_t GetDisplayPrecision () const =0
 Get the precision to be used when converting the float to a string.
 
virtual void ImposeMin (double Value)=0
 Restrict minimum value.
 
virtual void ImposeMax (double Value)=0
 Restrict maximum value.
 
virtual INode * GetNode ()
 Get the INode interface of the node.
 
virtual GenICam::gcstring ToString (bool Verify=false, bool IgnoreCache=false)=0
 Get content of the node as string. More...
 
virtual void FromString (const GenICam::gcstring &ValueStr, bool Verify=true)=0
 Set content of the node as string. More...
 
virtual bool IsValueCacheValid () const =0
 Checks if the value comes from cache or is requested from another node.
 
virtual EAccessMode GetAccessMode () const =0
 Get the access mode of the node.
 
virtual bool IsReadable () const =0
 Indicates whether the parameter is readable. More...
 
virtual bool IsWritable () const =0
 Indicates whether the parameter is writable. More...
 
virtual bool IsValid () const =0
 Indicates whether a node is attached. More...
 
virtual String_t GetInfo (EParameterInfo info)=0
 Gets the parameter information. More...
 
virtual String_t GetInfoOrDefault (EParameterInfo info, const String_t defaultInfo)=0
 Gets the parameter information if the parameter is attached to a node. More...
 
virtual String_t ToStringOrDefault (const String_t &defaultValue)=0
 Gets the parameter value as string if the parameter is readable. More...
 

Detailed Description

Extends the GenApi::IFloat interface with convenience methods.

Member Function Documentation

virtual void GenApi::IValue::FromString ( const GenICam::gcstring ValueStr,
bool  Verify = true 
)
pure virtualinherited

Set content of the node as string.

Parameters
ValueStrThe value to set
VerifyEnables AccessMode and Range verification (default = true)

Implemented in Pylon::CParameter.

virtual void Pylon::IFloatEx::GetAlternativeIntegerRepresentation ( CIntegerParameter parameter)
pure virtual

Gets the alternative integer representation of the float parameter, if available.

The alternative integer representation is typically used if a parameter is represented as a float value in the node map, but as an integer register in the camera device.

Parameters
[out]parameterThe integer representation returned. The returned value will be empty if no alternative representation is available.
Thread Safety:
The method accesses the parameter multiple times. These accesses are not synchronized by a lock.
Error Safety:
Can throw exceptions.

Implemented in Pylon::CFloatParameter.

virtual String_t Pylon::IValueEx::GetInfo ( EParameterInfo  info)
pure virtualinherited

Gets the parameter information.

Parameters
[in]infoThe type information to return.
Returns
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.

Implemented in Pylon::CParameter.

virtual String_t Pylon::IValueEx::GetInfoOrDefault ( EParameterInfo  info,
const String_t  defaultInfo 
)
pure virtualinherited

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

See IsValid().

Parameters
[in]infoThe 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.
Returns
Returns the parameter information if the parameter is attached to a node. Otherwise returns the default information.
Parameters
[in]defaultInfoThe default information returned if the parameter is not attached to a node.
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.

Implemented in Pylon::CParameter.

virtual double GenApi::IFloat::GetValue ( bool  Verify = false,
bool  IgnoreCache = false 
)
pure virtualinherited

Get node value.

Parameters
VerifyEnables Range verification (default = false). The AccessMode is always checked
IgnoreCacheIf true the value is read ignoring any caches (default = false)
Returns
The value read

Implemented in Pylon::CFloatParameter.

virtual double Pylon::IFloatEx::GetValueOrDefault ( double  defaultValue)
pure virtual

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

Otherwise returns the default value.

Returns
Returns the parameter value if the parameter is readable. Otherwise returns the default value.
Parameters
[in]defaultValueThe default value returned if the parameter is not readable.
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.

Implemented in Pylon::CFloatParameter.

virtual double Pylon::IFloatEx::GetValuePercentOfRange ( )
pure virtual

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

Returns
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.

Implemented in Pylon::CFloatParameter.

virtual bool Pylon::IValueEx::IsReadable ( ) const
pure virtualinherited

Indicates whether the parameter is readable.

Error Safety:
Does not throw C++ exceptions.
Returns
Returns true if the parameter is readable.

Implemented in Pylon::CParameter.

virtual bool Pylon::IValueEx::IsValid ( ) const
pure virtualinherited

Indicates whether a node is attached.

Returns
Returns true if a node is attached.
Error Safety:
Does not throw C++ exceptions.

Implemented in Pylon::CFloatParameter, Pylon::CIntegerParameter, Pylon::CEnumParameter, Pylon::CParameter, Pylon::CStringParameter, Pylon::CBooleanParameter, Pylon::CCommandParameter, and Pylon::CArrayParameter.

virtual bool Pylon::IValueEx::IsWritable ( ) const
pure virtualinherited

Indicates whether the parameter is writable.

Error Safety:
Does not throw C++ exceptions.
Returns
Returns true if the parameter is writable.

Implemented in Pylon::CParameter.

virtual void Pylon::IFloatEx::SetToMaximum ( )
pure virtual

Sets the parameter value 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.

Implemented in Pylon::CFloatParameter.

virtual void Pylon::IFloatEx::SetToMinimum ( )
pure virtual

Sets the parameter value 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.

Implemented in Pylon::CFloatParameter.

virtual void GenApi::IFloat::SetValue ( double  Value,
bool  Verify = true 
)
pure virtualinherited

Set node value.

Parameters
ValueThe value to set
VerifyEnables AccessMode and Range verification (default = true)

Implemented in Pylon::CFloatParameter.

virtual void Pylon::IFloatEx::SetValue ( double  value,
EFloatValueCorrection  correction 
)
pure virtual

Sets the value of the parameter.

The value is automatically corrected if needed.

Parameters
[in]valueThe value to set.
[in]correctionThe correction method.
Precondition
  • The parameter must be writable.
  • The parameter must be readable.
Note
Calls GenApi::IFloatParameter::SetValue(double) if correction equals FloatValueCorrection_None.
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.

Implemented in Pylon::CFloatParameter.

virtual void Pylon::IFloatEx::SetValuePercentOfRange ( double  percentOfRange)
pure virtual

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

Parameters
[in]percentOfRangeThe 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.

Implemented in Pylon::CFloatParameter.

virtual GenICam::gcstring GenApi::IValue::ToString ( bool  Verify = false,
bool  IgnoreCache = false 
)
pure virtualinherited

Get content of the node as string.

Parameters
VerifyEnables Range verification (default = false). The AccessMode is always checked
IgnoreCacheIf true the value is read ignoring any caches (default = false)
Returns
The value read

Implemented in Pylon::CParameter.

virtual String_t Pylon::IValueEx::ToStringOrDefault ( const String_t defaultValue)
pure virtualinherited

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

Otherwise returns the default value.

Returns
Returns the parameter value if the parameter is readable. Otherwise returns the default value.
Parameters
[in]defaultValueThe default value returned if the parameter is not readable.
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.

Implemented in Pylon::CParameter.

virtual bool Pylon::IFloatEx::TrySetToMaximum ( )
pure virtual

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

Returns
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.

Implemented in Pylon::CFloatParameter.

virtual bool Pylon::IFloatEx::TrySetToMinimum ( )
pure virtual

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

Returns
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.

Implemented in Pylon::CFloatParameter.

virtual bool Pylon::IFloatEx::TrySetValue ( double  value)
pure virtual

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

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

Returns
Returns false if the parameter is not writable.
Parameters
[in]valueThe value to set.

If the float parameter has an increment, the increment is automatically corrected.

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.

Implemented in Pylon::CFloatParameter.

virtual bool Pylon::IFloatEx::TrySetValue ( double  value,
EFloatValueCorrection  correction 
)
pure virtual

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

The value is automatically corrected if needed.

Returns
Returns false if the parameter is not readable or not writable.
Parameters
[in]valueThe value to set.
[in]correctionThe correction method.
Note
Calls TrySetValue(GenApi::IFloatParameter, double) if correction equals FloatValueCorrection_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.

Implemented in Pylon::CFloatParameter.

virtual bool Pylon::IFloatEx::TrySetValuePercentOfRange ( double  percentOfRange)
pure virtual

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.

Returns
Returns true if the value has been set.
Parameters
[in]percentOfRangeThe percentage of the range used in the calculation. Valid values are in the range of 0 to 100.
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.

Implemented in Pylon::CFloatParameter.


The documentation for this struct was generated from the following file:

pylon 6.1.0
Copyright (c) 2006-2020 Basler AG (Mon Mar 16 2020 10:57:01)