Pylon Logo Basler Logo
Public Member Functions | List of all members
Pylon::CEnumParameter Class Referenceabstract

CEnumParameter class used to simplify access to GenApi parameters. More...

#include <pylon/EnumParameter.h>

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

Public Member Functions

 CEnumParameter ()
 Creates an empty CEnumParameter object. More...
 
 CEnumParameter (GenApi::INode *pNode)
 Creates a CEnumParameter object and attaches it to a node, typically retrieved for a nodemap calling GetNode(). More...
 
 CEnumParameter (GenApi::IEnumeration *pEnumeration)
 Creates a CEnumParameter object and attaches it to a node of a matching type. More...
 
 CEnumParameter (GenApi::INodeMap *pNodeMap, const char *pName)
 Creates a CEnumParameter object and attaches it to a node retrieved from the provided node map. More...
 
 CEnumParameter (GenApi::INodeMap &nodeMap, const char *pName)
 Creates a CEnumParameter object and attaches it to a node retrieved from the provided node map. More...
 
 CEnumParameter (const CEnumParameter &rhs)
 Copies a CEnumParameter object. More...
 
virtual ~CEnumParameter ()
 Destroys the CEnumParameter object. More...
 
virtual bool Attach (GenApi::INodeMap *pNodeMap, const char *pName)
 Attaches a node retrieved from the provided node map. More...
 
virtual bool Attach (GenApi::INodeMap &nodeMap, const char *pName)
 Attaches a node retrieved from the provided node map. More...
 
virtual bool Attach (GenApi::INode *pNode)
 Attaches a node, typically retrieved for a nodemap calling GetNode(). More...
 
virtual bool Attach (GenApi::IEnumeration *pEnumeration)
 Assigns a node of the same type to the parameter object. More...
 
CEnumParameteroperator= (const CEnumParameter &rhs)
 Assigns a CEnumParameter object. More...
 
virtual bool Equals (const CEnumParameter &rhs) const
 Returns true if the same nodes are attached or both parameters are empty. More...
 
virtual bool Equals (const GenApi::INode *pNode) const
 Returns true if the attached node pointer is equal. More...
 
virtual bool Equals (const GenApi::IEnumeration *pEnumeration) const
 Returns true if the attached node pointer is equal. More...
 
virtual void Release ()
 Releases the attached node. More...
 
virtual bool IsValid () const
 Indicates whether a node is attached. More...
 
virtual void GetSymbolics (GenApi::StringList_t &symbolics)
 Get list of symbolic Values.
 
virtual void GetEntries (GenApi::NodeList_t &entries)
 Get list of entry nodes.
 
virtual GenApi::IEnumerationoperator= (const GenICam::gcstring &valueStr)
 Set string node value.
 
virtual void SetIntValue (int64_t value, bool verify=true)
 Set integer node value. More...
 
virtual GenICam::gcstring operator* ()
 Get string node value.
 
virtual int64_t GetIntValue (bool verify=false, bool ignoreCache=false)
 Get integer node value. More...
 
virtual GenApi::IEnumEntryGetEntryByName (const GenICam::gcstring &symbolic)
 Get an entry node by name.
 
virtual GenApi::IEnumEntryGetEntry (const int64_t intValue)
 Get an entry node by its IntValue.
 
virtual GenApi::IEnumEntryGetCurrentEntry (bool verify=false, bool ignoreCache=false)
 Get the current entry.
 
virtual String_t GetValueOrDefault (const String_t &defaultValue)
 Gets the value of the parameter if the parameter is readable. More...
 
virtual bool TrySetValue (const String_t &value)
 Sets the value of the parameter if the parameter is writable and the value is contained in the set of settable enumeration values. More...
 
virtual void SetValue (const char **nullTerminatedList)
 Sets the value of the parameter to the first valid value in a list of values. More...
 
virtual bool TrySetValue (const char **nullTerminatedList)
 If the parameter is writable, sets the value of the parameter to the first valid value in a list of values. More...
 
virtual bool CanSetValue (const String_t &value)
 Indicates whether the given value can be set. More...
 
virtual void SetValue (const String_t &value)
 Sets the value of the parameter. More...
 
virtual String_t GetValue ()
 Gets the value of the parameter. More...
 
virtual void GetSettableValues (GenApi::StringList_t &values)
 Gets a list of all values of the enumeration that are currently settable. More...
 
virtual void GetAllValues (GenApi::StringList_t &values)
 Gets a list of all values of the enumeration including the values that are currently not settable. More...
 
virtual CParameter GetEntryByNameAsParameter (const GenICam::gcstring &value)
 Gets an enumeration entry by its symbolic name. More...
 
virtual CParameter GetCurrentEntryAsParameter ()
 Gets the currently selected entry of an enumeration. More...
 
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 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...
 
virtual bool Attach (GenApi::IValue *pValue)
 Assigns a node of the same type to the parameter object. More...
 
virtual bool Equals (const CParameter &rhs) const
 Returns true if the same nodes are attached or both parameters are empty. More...
 
virtual bool Equals (const GenApi::IValue *pValue) const
 Returns true if the attached node pointer is equal. More...
 
virtual GenApi::EAccessMode GetAccessMode () const
 Get the access mode of the node.
 
virtual GenApi::INodeGetNode ()
 Get the INode interface of the node.
 
virtual GenICam::gcstring ToString (bool verify=false, bool ignoreCache=false)
 Get content of the node as string. More...
 
virtual void FromString (const GenICam::gcstring &valueStr, bool verify=true)
 Set content of the node as string. More...
 
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. More...
 
virtual bool IsWritable () const
 Indicates whether the parameter is writable. More...
 
virtual String_t GetInfo (EParameterInfo info)
 Gets the parameter information. More...
 
virtual String_t GetInfoOrDefault (EParameterInfo info, const String_t defaultInfo)
 Gets the parameter information if the parameter is attached to a node. More...
 
virtual String_t ToStringOrDefault (const String_t &defaultValue)
 Gets the parameter value as string if the parameter is readable. More...
 

Detailed Description

CEnumParameter class used to simplify access to GenApi parameters.

Constructor & Destructor Documentation

Pylon::CEnumParameter::CEnumParameter ( )

Creates an empty CEnumParameter object.

Error Safety:
Does not throw C++ exceptions.
Pylon::CEnumParameter::CEnumParameter ( GenApi::INode pNode)
explicit

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

Parameters
[in]pNodeThe 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.
Pylon::CEnumParameter::CEnumParameter ( GenApi::IEnumeration pEnumeration)
explicit

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

Parameters
[in]pEnumerationThe node to attach.
Postcondition
The parameter object must not be used to access the node's functionality if the source of the attached pEnumeration has been destroyed. In this case, call Release() or attach a new node.
Error Safety:
Does not throw C++ exceptions.
Pylon::CEnumParameter::CEnumParameter ( GenApi::INodeMap pNodeMap,
const char *  pName 
)

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

Parameters
[in]pNodeMapThe node map. The source of the parameter.
[in]pNameThe 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.
Pylon::CEnumParameter::CEnumParameter ( GenApi::INodeMap nodeMap,
const char *  pName 
)

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

Parameters
[in]nodeMapThe node map. The source of the parameter.
[in]pNameThe 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.
Pylon::CEnumParameter::CEnumParameter ( const CEnumParameter rhs)

Copies a CEnumParameter object.

Parameters
[in]rhsThe object to copy.
Error Safety:
Does not throw C++ exceptions.
virtual Pylon::CEnumParameter::~CEnumParameter ( )
virtual

Destroys the CEnumParameter object.

Does not access the attached node.

Error Safety:
Does not throw C++ exceptions.

Member Function Documentation

virtual bool Pylon::CParameter::Attach ( GenApi::IValue pValue)
virtualinherited

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

Parameters
[in]pValueThe node to assign.
Returns
Returns true if the node has been attached.
Error Safety:
Does not throw C++ exceptions.
virtual bool Pylon::CEnumParameter::Attach ( GenApi::INodeMap pNodeMap,
const char *  pName 
)
virtual

Attaches a node retrieved from the provided node map.

Parameters
[in]pNodeMapThe node map. The source of the parameter.
[in]pNameThe name of the parameter to attach.
Returns
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.

Reimplemented from Pylon::CParameter.

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

Attaches a node retrieved from the provided node map.

Parameters
[in]nodeMapThe node map. The source of the parameter.
[in]pNameThe name of the parameter to attach.
Returns
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.

Reimplemented from Pylon::CParameter.

virtual bool Pylon::CEnumParameter::Attach ( GenApi::INode pNode)
virtual

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

Parameters
[in]pNodeThe node to assign.
Returns
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.

Reimplemented from Pylon::CParameter.

virtual bool Pylon::CEnumParameter::Attach ( GenApi::IEnumeration pEnumeration)
virtual

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

Parameters
[in]pEnumerationThe node to assign.
Returns
Returns true if the node has been attached.
Error Safety:
Does not throw C++ exceptions.
virtual bool Pylon::CEnumParameter::CanSetValue ( const String_t value)
virtual

Indicates whether the given value can be set.

Returns
Returns true if the value can be set, otherwise false.
Parameters
[in]valueThe value to be checked.
Thread Safety:
The method accesses the parameter multiple times. These accesses are not synchronized by a lock.
Error Safety:
Does not throw exceptions.

Implements Pylon::IEnumerationEx.

virtual bool Pylon::CParameter::Equals ( const CParameter rhs) const
virtualinherited

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

Parameters
[in]rhsThe object to compare to.
Returns
Returns true if the same nodes are attached or both parameters are empty.
Error Safety:
Does not throw C++ exceptions.
virtual bool Pylon::CParameter::Equals ( const GenApi::IValue pValue) const
virtualinherited

Returns true if the attached node pointer is equal.

Parameters
[in]pValueThe node to compare to.
Returns
Returns true if the attached node pointer is equal.
Error Safety:
Does not throw C++ exceptions.
virtual bool Pylon::CEnumParameter::Equals ( const CEnumParameter rhs) const
virtual

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

Parameters
[in]rhsThe object to compare to.
Returns
Returns true if the same nodes are attached or both parameters are empty.
Error Safety:
Does not throw C++ exceptions.
virtual bool Pylon::CEnumParameter::Equals ( const GenApi::INode pNode) const
virtual

Returns true if the attached node pointer is equal.

Parameters
[in]pNodeThe node to compare to.
Returns
Returns true if the attached node pointer is equal.
Error Safety:
Does not throw C++ exceptions.

Reimplemented from Pylon::CParameter.

virtual bool Pylon::CEnumParameter::Equals ( const GenApi::IEnumeration pEnumeration) const
virtual

Returns true if the attached node pointer is equal.

Parameters
[in]pEnumerationThe node to compare to.
Returns
Returns true if the attached node pointer is equal.
Error Safety:
Does not throw C++ exceptions.
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::CParameter::FromString ( const GenICam::gcstring ValueStr,
bool  Verify = true 
)
virtualinherited

Set content of the node as string.

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

Implements GenApi::IValue.

virtual void Pylon::CEnumParameter::GetAllValues ( GenApi::StringList_t values)
virtual

Gets a list of all values of the enumeration including the values that are currently not settable.

Parameters
[out]valuesReturns a list of all values of the enumeration including the values that are currently not settable.
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.

Implements Pylon::IEnumerationEx.

virtual CParameter Pylon::CEnumParameter::GetCurrentEntryAsParameter ( )
virtual

Gets the currently selected entry of an enumeration.

The entry is returned as a CParameter. This method can be used to access information about the enumeration value represented by the entry using CParameter::GetInfo().

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.

Implements Pylon::IEnumerationEx.

virtual CParameter Pylon::CEnumParameter::GetEntryByNameAsParameter ( const GenICam::gcstring value)
virtual

Gets an enumeration entry by its symbolic name.

The entry is returned as a CParameter. This method can be used to access information about the enumeration value represented by the entry using CParameter::GetInfo().

Parameters
[in]valueThe symbolic name of the enumeration entry, e.g., "Testimage1".
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.

Implements Pylon::IEnumerationEx.

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::CParameter::GetInfo ( EParameterInfo  info)
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.

Implements Pylon::IValueEx.

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 String_t Pylon::CParameter::GetInfoOrDefault ( EParameterInfo  info,
const String_t  defaultInfo 
)
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.

Implements Pylon::IValueEx.

virtual int64_t Pylon::CEnumParameter::GetIntValue ( bool  Verify = false,
bool  IgnoreCache = false 
)
virtual

Get integer 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

Implements GenApi::IEnumeration.

virtual void Pylon::CEnumParameter::GetSettableValues ( GenApi::StringList_t values)
virtual

Gets a list of all values of the enumeration that are currently settable.

Parameters
[out]valuesReturns a list of all values of the enumeration that are currently settable.
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.

Implements Pylon::IEnumerationEx.

virtual String_t Pylon::CEnumParameter::GetValue ( )
virtual

Gets the value of the parameter.

Returns
Returns the current parameter value.
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 the parameter is not readable or if reading the value fails.

Implements Pylon::IEnumerationEx.

virtual String_t Pylon::CEnumParameter::GetValueOrDefault ( const String_t defaultValue)
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 exceptions if reading the value fails.

Implements Pylon::IEnumerationEx.

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::CParameter::IsReadable ( ) const
virtualinherited

Indicates whether the parameter is readable.

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

Implements Pylon::IValueEx.

virtual bool Pylon::CEnumParameter::IsValid ( ) const
virtual

Indicates whether a node is attached.

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

Reimplemented from Pylon::CParameter.

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 bool Pylon::CParameter::IsWritable ( ) const
virtualinherited

Indicates whether the parameter is writable.

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

Implements Pylon::IValueEx.

CEnumParameter& Pylon::CEnumParameter::operator= ( const CEnumParameter rhs)

Assigns a CEnumParameter object.

Parameters
[in]rhsThe object to assign.
Error Safety:
Does not throw C++ exceptions.
virtual void Pylon::CEnumParameter::Release ( )
virtual

Releases the attached node.

Error Safety:
Does not throw C++ exceptions.

Reimplemented from Pylon::CParameter.

virtual void Pylon::CEnumParameter::SetIntValue ( int64_t  Value,
bool  Verify = true 
)
virtual

Set integer node value.

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

Implements GenApi::IEnumeration.

virtual void Pylon::CEnumParameter::SetValue ( const char **  nullTerminatedList)
virtual

Sets the value of the parameter to the first valid value in a list of values.

Example:

CEnumParameter pixelFormat(nodemap, "PixelFormat");
const char* list[] = { "BayerGR8", "BayerRG8", "BayerGB8", "BayerBG8", "Mono8", NULL };
pixelFormat.SetValue(list);
Parameters
[in]nullTerminatedListThe list of possible values to set. The list is terminated by a NULL value.
Precondition
  • The parameter must be writable.
  • At least one value within the list passed must be contained in the set of settable enumeration values.
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, no value nullTerminatedList is settable, or writing the value fails.

Implements Pylon::IEnumerationEx.

virtual void Pylon::CEnumParameter::SetValue ( const String_t value)
virtual

Sets the value of the parameter.

Calls FromString().

Parameters
[in]valueThe value to set.
Precondition
The value must be contained in the set of settable enumeration values.
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, no value is valid, or writing the value fails.

Implements Pylon::IEnumerationEx.

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 GenICam::gcstring Pylon::CParameter::ToString ( bool  Verify = false,
bool  IgnoreCache = false 
)
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

Implements GenApi::IValue.

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 String_t Pylon::CParameter::ToStringOrDefault ( const String_t defaultValue)
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.

Implements Pylon::IValueEx.

virtual bool Pylon::CEnumParameter::TrySetValue ( const String_t value)
virtual

Sets the value of the parameter if the parameter is writable and the value is contained in the set of settable enumeration values.

Returns
Returns false if the parameter is not writable or the value is not contained in the set of settable enumeration values.
Parameters
[in]valueThe value to set.
Precondition
The value must be contained in the set of settable enumeration values.
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.

Implements Pylon::IEnumerationEx.

virtual bool Pylon::CEnumParameter::TrySetValue ( const char **  nullTerminatedList)
virtual

If the parameter is writable, sets the value of the parameter to the first valid value in a list of values.

Example:

CEnumParameter pixelFormat(nodemap, "PixelFormat");
const char* list[] = { "BayerGR8", "BayerRG8", "BayerGB8", "BayerBG8", "Mono8", NULL };
pixelFormat.TrySetValue(list);
Parameters
[in]nullTerminatedListThe list of possible values to set. The list is terminated by a NULL value.
Returns
Returns false if the parameter is not writable.
Precondition
At least one value within the passed list must be contained in the set of settable enumeration values.
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, no value nullTerminatedList is settable, or writing the value fails.

Implements Pylon::IEnumerationEx.


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

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