Pylon Logo Basler Logo
Public Member Functions | List of all members
Pylon::IEnumParameterT< EnumT > Struct Template Referenceabstract

A template class that is used to create classes derived from CEnumParameter. More...

#include <pylon/EnumParameterT.h>

Inheritance diagram for Pylon::IEnumParameterT< EnumT >:
Inheritance graph
[legend]

Public Member Functions

virtual void SetValue (EnumT value, bool verify=true)=0
 Sets the value passed. More...
 
virtual IEnumParameterT< EnumT > & operator= (EnumT value)=0
 Sets the value passed. More...
 
virtual EnumT GetValue (bool verify=false, bool ignoreCache=false)=0
 Gets the current parameter value. More...
 
virtual EnumT operator() ()=0
 Gets the current parameter value. More...
 
virtual GenApi::IEnumEntryGetEntry (const EnumT value)=0
 Returns the EnumEntry object belonging to the value.
 
virtual EnumT GetValueOrDefault (EnumT defaultValue)=0
 Gets the parameter value if the parameter is readable. More...
 
virtual bool TrySetValue (EnumT value)=0
 Sets the value passed if the parameter is writable and the value is contained in the set of settable enumeration values. More...
 
virtual bool CanSetValue (EnumT value)=0
 Indicates if the value passed can be set. More...
 
virtual String_t GetValueOrDefault (const String_t &defaultValue)=0
 Gets the value of the parameter if the parameter is readable. More...
 
virtual bool TrySetValue (const String_t &value)=0
 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 bool TrySetValue (const char **nullTerminatedList)=0
 If the parameter is writable, sets the value of the parameter to the first valid value in a list of values. More...
 
virtual void SetValue (const char **nullTerminatedList)=0
 Sets the value of the parameter to the first valid value in a list of values. More...
 
virtual void SetValue (const String_t &value)=0
 Sets the value of the parameter. More...
 
virtual bool CanSetValue (const String_t &value)=0
 Indicates whether the given value can be set. More...
 
virtual String_t GetValue ()=0
 Gets the value of the parameter. More...
 
virtual void GetSettableValues (GenApi::StringList_t &values)=0
 Gets a list of all values of the enumeration that are currently settable. More...
 
virtual void GetAllValues (GenApi::StringList_t &values)=0
 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)=0
 Gets an enumeration entry by its symbolic name. More...
 
virtual CParameter GetCurrentEntryAsParameter ()=0
 Gets the currently selected entry of an enumeration. More...
 
virtual void GetSymbolics (StringList_t &Symbolics)=0
 Get list of symbolic Values.
 
virtual void GetEntries (NodeList_t &Entries)=0
 Get list of entry nodes.
 
virtual void SetIntValue (int64_t Value, bool Verify=true)=0
 Set integer node value. More...
 
virtual GenICam::gcstring operator* ()=0
 Get string node value.
 
virtual int64_t GetIntValue (bool Verify=false, bool IgnoreCache=false)=0
 Get integer node value. More...
 
virtual IEnumEntry * GetEntryByName (const GenICam::gcstring &Symbolic)=0
 Get an entry node by name.
 
virtual IEnumEntry * GetEntry (const int64_t IntValue)=0
 Get an entry node by its IntValue.
 
virtual IEnumEntry * GetCurrentEntry (bool Verify=false, bool IgnoreCache=false)=0
 Get the current entry.
 
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

template<typename EnumT>
struct Pylon::IEnumParameterT< EnumT >

A template class that is used to create classes derived from CEnumParameter.

The derived classes use C++ enums instead of strings as enumeration values. They are used for native parameter access.

Member Function Documentation

virtual bool Pylon::IEnumerationEx::CanSetValue ( const String_t value)
pure virtualinherited

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.

Implemented in Pylon::CEnumParameter.

template<typename EnumT>
virtual bool Pylon::IEnumParameterT< EnumT >::CanSetValue ( EnumT  value)
pure virtual

Indicates if the value passed 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.
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::IEnumerationEx::GetAllValues ( GenApi::StringList_t values)
pure virtualinherited

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.

Implemented in Pylon::CEnumParameter.

virtual CParameter Pylon::IEnumerationEx::GetCurrentEntryAsParameter ( )
pure virtualinherited

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.

Implemented in Pylon::CEnumParameter.

virtual CParameter Pylon::IEnumerationEx::GetEntryByNameAsParameter ( const GenICam::gcstring value)
pure virtualinherited

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.

Implemented in Pylon::CEnumParameter.

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 int64_t GenApi::IEnumeration::GetIntValue ( bool  Verify = false,
bool  IgnoreCache = false 
)
pure virtualinherited

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

Implemented in Pylon::CEnumParameter.

virtual void Pylon::IEnumerationEx::GetSettableValues ( GenApi::StringList_t values)
pure virtualinherited

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.

Implemented in Pylon::CEnumParameter.

template<typename EnumT>
virtual EnumT Pylon::IEnumParameterT< EnumT >::GetValue ( bool  verify = false,
bool  ignoreCache = false 
)
pure virtual

Gets the current parameter value.

Parameters
verifyEnables Range verification (default = false). The AccessMode is always checked.
ignoreCacheIf true, the value is read ignoring any caches (default = false).
Returns
Returns the current parameter value.
Error Safety:
Can throw exceptions if the parameter is not readable or if reading the value fails.
virtual String_t Pylon::IEnumerationEx::GetValue ( )
pure virtualinherited

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.

Implemented in Pylon::CEnumParameter.

virtual String_t Pylon::IEnumerationEx::GetValueOrDefault ( const String_t defaultValue)
pure virtualinherited

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.

Implemented in Pylon::CEnumParameter.

template<typename EnumT>
virtual EnumT Pylon::IEnumParameterT< EnumT >::GetValueOrDefault ( EnumT  defaultValue)
pure virtual

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

template<typename EnumT>
virtual EnumT Pylon::IEnumParameterT< EnumT >::operator() ( )
pure virtual

Gets the current parameter value.

Returns
Returns the current parameter value.
Error Safety:
Can throw exceptions if the parameter is not readable or if reading the value fails.
template<typename EnumT>
virtual IEnumParameterT<EnumT>& Pylon::IEnumParameterT< EnumT >::operator= ( EnumT  value)
pure virtual

Sets the value passed.

Parameters
[in]valueThe value to set.
Error Safety:
Can throw exceptions if the parameter is not readable or if reading the value fails.
virtual void GenApi::IEnumeration::SetIntValue ( int64_t  Value,
bool  Verify = true 
)
pure virtualinherited

Set integer node value.

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

Implemented in Pylon::CEnumParameter.

template<typename EnumT>
virtual void Pylon::IEnumParameterT< EnumT >::SetValue ( EnumT  value,
bool  verify = true 
)
pure virtual

Sets the value passed.

Parameters
[in]valueThe value to set.
[in]verifyEnables AccessMode and Range verification (default = true).
Error Safety:
Can throw exceptions if the parameter is not writable or if writing the value fails.
virtual void Pylon::IEnumerationEx::SetValue ( const char **  nullTerminatedList)
pure virtualinherited

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.

Implemented in Pylon::CEnumParameter.

virtual void Pylon::IEnumerationEx::SetValue ( const String_t value)
pure virtualinherited

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.

Implemented in Pylon::CEnumParameter.

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::IEnumerationEx::TrySetValue ( const String_t value)
pure virtualinherited

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.

Implemented in Pylon::CEnumParameter.

virtual bool Pylon::IEnumerationEx::TrySetValue ( const char **  nullTerminatedList)
pure virtualinherited

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.

Implemented in Pylon::CEnumParameter.

template<typename EnumT>
virtual bool Pylon::IEnumParameterT< EnumT >::TrySetValue ( EnumT  value)
pure virtual

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

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)