Class PvGenEnum
GenICam feature: Enumeration. A feature which can take one of many defined values.
Implements
Inherited Members
Namespace: eBUSDotNet
Assembly: eBUSDotNet.dll
Syntax
public class PvGenEnum : PvGenParameter, IDisposable
Remarks
PvGenEnum is a list of selectable values. In a UI, PvGenEnum objects are typically represented as dropdown lists.
Each list entry is a PvGenEnumEntry object.
Thus, the enumeration list might be represented as follows,
where each entry has a list position, entry value, and entry name:
- Position 0: Value 5, Name "Orange"
- Position 1: Value 4, Name "Apple"
- Position 2: Value 99, Name "Watermelon"
However, the UI presents only a selection of entry names (Orange, etc.); the list
position and entry values are hidden. The entry names are always unique.
Enumerations can't be set to any arbitrary value; they can only be set
to a value of an entry on the list.
If a user selected Orange, you could set the new value in the following ways:
- Set the entry value directly with #SetValue ( 5 ).
- Set the entry value by the name with #SetValue ( "Orange" ).
In group GenICam features.
Methods
View SourceDispose(bool)
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
Overrides
View SourceGetEntriesCount(out long)
Get the number of enumaration entries.
Declaration
public PvResult GetEntriesCount(out long aCount)
Parameters
| Type | Name | Description |
|---|---|---|
| long | aCount | The number of enumeration entries. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
GetEntryByIndex(long, out PvGenEnumEntry)
Get an enumeration entry (by list position).
Declaration
public PvResult GetEntryByIndex(long aIndex, out PvGenEnumEntry aEntry)
Parameters
| Type | Name | Description |
|---|---|---|
| long | aIndex | The zero-based index of the enumeration entry. |
| PvGenEnumEntry | aEntry | A pointer to the enumeration entry. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
GetEntryByName(string, out PvGenEnumEntry)
Get an enumeration entry (by name).
Declaration
public PvResult GetEntryByName(string aEntryName, out PvGenEnumEntry aEntry)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aEntryName | The enumeration entry's name (#PvGenEnumEntry::GetName). |
| PvGenEnumEntry | aEntry | A pointer to the enumeration entry. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
GetEntryByValue(long, out PvGenEnumEntry)
Get an enumeration entry (by value).
Declaration
public PvResult GetEntryByValue(long aValue, out PvGenEnumEntry aEntry)
Parameters
| Type | Name | Description |
|---|---|---|
| long | aValue | The enumeration entry value. |
| PvGenEnumEntry | aEntry | A pointer to the enumeration entry. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
GetValue(out long)
Get the feature's value (as an integer).
Declaration
public PvResult GetValue(out long aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| long | aValue | The feature's value (equivalent to #PvGenEnumEntry::GetValue). |
Returns
| Type | Description |
|---|---|
| PvResult | See #GetEntriesCount. |
GetValue(out string)
Get the feature's value (as a string).
Declaration
public PvResult GetValue(out string aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aValue | The feature's value (equivalent to #PvGenEnumEntry::GetName). |
Returns
| Type | Description |
|---|---|
| PvResult | See #GetEntriesCount. |
SetValue(long)
Set the feature's value.
Declaration
public PvResult SetValue(long aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| long | aValue | The enumerator entry's feature's value (#PvGenEnumEntry::GetValue). |
Returns
| Type | Description |
|---|---|
| PvResult | See #GetEntriesCount. |
SetValue(string)
Set feature's value.
Declaration
public PvResult SetValue(string aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aValue | The enumerator entry's name (#PvGenEnumEntry::GetName). |
Returns
| Type | Description |
|---|---|
| PvResult | See #GetEntriesCount. |