Pylon::IEnumParameterT#
#include <pylon/EnumParameterT.h>
Inherits from Pylon::IEnumerationEx, GenApi::IEnumeration, Pylon::IValueEx, GenApi::IValue, GenApi::IBase
Inherited by Pylon::CEnumParameterT< EnumT >
Public Functions#
Name | |
---|---|
virtual void | SetValue(EnumT value, bool verify =true) =0 Sets the value passed. |
virtual IEnumParameterT< EnumT > & | operator=(EnumT value) =0 Sets the value passed. |
virtual EnumT | GetValue(bool verify =false, bool ignoreCache =false) =0 Gets the current parameter value. |
virtual EnumT | operator())() =0 Gets the current parameter value. |
virtual GenApi::IEnumEntry * | GetEntry(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. |
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. |
virtual bool | CanSetValue(EnumT value) =0 Indicates if the value passed can be set. |
virtual String_t | GetValueOrDefault(const String_t & defaultValue) =0 Gets the value of the parameter if the parameter is readable. |
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. |
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. |
virtual void | SetValue(const char ** nullTerminatedList) =0 Sets the value of the parameter to the first valid value in a list of values. |
virtual void | SetValue(const String_t & value) =0 Sets the value of the parameter. |
virtual bool | CanSetValue(const String_t & value) =0 Indicates whether the given value can be set. |
virtual String_t | GetValue() =0 Gets the value of the parameter. |
virtual void | GetSettableValues(GenApi::StringList_t & values) =0 Gets a list of all values of the enumeration that are currently settable. |
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. |
virtual CParameter | GetEntryByNameAsParameter(const GenICam::gcstring & value) =0 Gets an enumeration entry by its symbolic name. |
virtual CParameter | GetCurrentEntryAsParameter() =0 Gets the currently selected entry of an enumeration. |
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. |
virtual GenICam::gcstring | operator*() =0 Get string node value. |
virtual int64_t | GetIntValue(bool Verify =false, bool IgnoreCache =false) =0 Get integer node value. |
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. |
virtual void | FromString(const GenICam::gcstring & ValueStr, bool Verify =true) =0 Set content of the node as string. |
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. |
virtual bool | IsWritable() const =0 Indicates whether the parameter is writable. |
virtual bool | IsValid() const =0 Indicates whether a node is attached. |
virtual String_t | GetInfo(EParameterInfo info) =0 Gets the parameter information. |
virtual String_t | GetInfoOrDefault(EParameterInfo info, const String_t defaultInfo) =0 Gets the parameter information if the parameter is attached to a node. |
virtual String_t | ToStringOrDefault(const String_t & defaultValue) =0 Gets the parameter value as string if the parameter is readable. |
Additional inherited members#
Public Functions inherited from GenApi::IBase
Name | |
---|---|
virtual | ~IBase() =0 Virtual destructor enforcing virtual destructor on all derived classes. |
Detailed Description#
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.
Public Functions Documentation#
function SetValue#
Sets the value passed.
Parameters:
- value The value to set.
- verify Enables AccessMode and Range verification (default = true).
Error Safety:
Can throw exceptions if the parameter is not writable or if writing the value fails.
function operator=#
Sets the value passed.
Parameters:
- value The value to set.
Error Safety:
Can throw exceptions if the parameter is not readable or if reading the value fails.
function GetValue#
Gets the current parameter 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: Returns the current parameter value.
Error Safety:
Can throw exceptions if the parameter is not readable or if reading the value fails.
function operator()#
Gets the current parameter value.
Return: Returns the current parameter value.
Error Safety:
Can throw exceptions if the parameter is not readable or if reading the value fails.
function GetEntry#
Returns the EnumEntry object belonging to the value.
function GetValueOrDefault#
Gets the parameter value 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.
Otherwise returns the default value.
function TrySetValue#
Sets the value passed if the parameter is writable and the value is contained in the set of settable enumeration values.
Parameters:
- value The value to set.
Return: Returns false if the parameter is not writable or the value is not 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.
function CanSetValue#
Indicates if the value passed can be set.
Parameters:
- value The value to be checked.
Return: Returns true if the value can be set, otherwise false.
Thread Safety:
The method accesses the parameter multiple times. These accesses are not synchronized by a lock.
Error Safety:
Does not throw exceptions.
function GetValueOrDefault#
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 exceptions if reading the value fails.
Reimplemented by: Pylon::CEnumParameter::GetValueOrDefault
Otherwise returns the default value.
function TrySetValue#
Sets the value of the parameter if the parameter is writable and the value is contained in the set of settable enumeration values.
Parameters:
- value The value to set.
Return: Returns false if the parameter is not writable or the value is not 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.
Reimplemented by: Pylon::CEnumParameter::TrySetValue
function TrySetValue#
If the parameter is writable, sets the value of the parameter to the first valid value in a list of values.
Parameters:
- nullTerminatedList The list of possible values to set. The list is terminated by a NULL value.
Return: 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.
Reimplemented by: Pylon::CEnumParameter::TrySetValue
Example:
CEnumParameter pixelFormat(nodemap, "PixelFormat");
const char* list[] = { "BayerGR8", "BayerRG8", "BayerGB8", "BayerBG8", "Mono8", NULL };
pixelFormat.TrySetValue(list);
function SetValue#
Sets the value of the parameter to the first valid value in a list of values.
Parameters:
- nullTerminatedList The 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.
Reimplemented by: Pylon::CEnumParameter::SetValue
Example:
CEnumParameter pixelFormat(nodemap, "PixelFormat");
const char* list[] = { "BayerGR8", "BayerRG8", "BayerGB8", "BayerBG8", "Mono8", NULL };
pixelFormat.SetValue(list);
function SetValue#
Sets the value of the parameter.
Parameters:
- value The 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.
Reimplemented by: Pylon::CEnumParameter::SetValue
Calls FromString().
function CanSetValue#
Indicates whether the given value can be set.
Parameters:
- value The value to be checked.
Return: Returns true if the value can be set, otherwise false.
Thread Safety:
The method accesses the parameter multiple times. These accesses are not synchronized by a lock.
Error Safety:
Does not throw exceptions.
Reimplemented by: Pylon::CEnumParameter::CanSetValue
function GetValue#
Gets the value of the parameter.
Return: 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.
Reimplemented by: Pylon::CEnumParameter::GetValue
function GetSettableValues#
Gets a list of all values of the enumeration that are currently settable.
Parameters:
- values Returns 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.
Reimplemented by: Pylon::CEnumParameter::GetSettableValues
function GetAllValues#
Gets a list of all values of the enumeration including the values that are currently not settable.
Parameters:
- values Returns 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.
Reimplemented by: Pylon::CEnumParameter::GetAllValues
function GetEntryByNameAsParameter#
Gets an enumeration entry by its symbolic name.
Parameters:
- value The 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.
Reimplemented by: Pylon::CEnumParameter::GetEntryByNameAsParameter
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().
function GetCurrentEntryAsParameter#
Gets the currently selected entry of an enumeration.
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.
Reimplemented by: Pylon::CEnumParameter::GetCurrentEntryAsParameter
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().
function GetSymbolics#
Get list of symbolic Values.
Reimplemented by: Pylon::CEnumParameter::GetSymbolics
function GetEntries#
Get list of entry nodes.
Reimplemented by: Pylon::CEnumParameter::GetEntries
function SetIntValue#
Set integer node value.
Parameters:
- Value The value to set
- Verify Enables AccessMode and Range verification (default = true)
Reimplemented by: Pylon::CEnumParameter::SetIntValue
function operator*#
Get string node value.
Reimplemented by: Pylon::CEnumParameter::operator*
function GetIntValue#
Get integer 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
Reimplemented by: Pylon::CEnumParameter::GetIntValue
function GetEntryByName#
Get an entry node by name.
Reimplemented by: Pylon::CEnumParameter::GetEntryByName
function GetEntry#
Get an entry node by its IntValue.
Reimplemented by: Pylon::CEnumParameter::GetEntry
function GetCurrentEntry#
Get the current entry.
Reimplemented by: GenApi::IEnumerationT::GetCurrentEntry, Pylon::CEnumParameter::GetCurrentEntry
function GetNode#
Get the INode interface of the node.
Reimplemented by: Pylon::CArrayParameter::GetNode
function ToString#
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
function FromString#
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
function IsValueCacheValid#
Checks if the value comes from cache or is requested from another node.
Reimplemented by: Pylon::CArrayParameter::IsValueCacheValid
function GetAccessMode#
Get the access mode of the node.
Reimplemented by: Pylon::CArrayParameter::GetAccessMode
function IsReadable#
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
function IsWritable#
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
function IsValid#
Indicates whether a node is attached.
Return: Returns true if a node is attached.
Error Safety:
Does not throw C++ exceptions.
Reimplemented by: Pylon::CArrayParameter::IsValid, Pylon::CCommandParameter::IsValid, Pylon::CBooleanParameter::IsValid, Pylon::CStringParameter::IsValid, Pylon::CParameter::IsValid, Pylon::CEnumParameter::IsValid, Pylon::CIntegerParameter::IsValid, Pylon::CFloatParameter::IsValid
function GetInfo#
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
function GetInfoOrDefault#
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().
function ToStringOrDefault#
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.