Parameter Lists
ParameterList
- class LuxFlux.fluxEngineNET.ParameterList : IDisposable
Parameter information / list
This class contains information about available parameters that may be updated by the user. It is used in two places:
During device connection this describes the available connection parameters. The user must provide a string -> string map with the values of these parameters during the connection process.
When connected to a device this describes the parameters the device provides. Getting/setting parameters occurs via separate methods of the Device class though.
Accessor methods of this class provide information about the various parameters represented. There are no explicit method sto read or write parameter values, as these are highly context-dependent. For connection parameters there are no getters and setters, as the user must provide a list to the connect function. For device parameters there are various methods that will get or set a specific parameter value.
Note that in the case of device parameters this structure is dynamic - changing a device parameter might change the access mode of other parameters. See
ParameterList.AffectedParameters()
for details.Each accessor is available in both an indexed variant, as well as a named variant (except for the accessor that obtains the name itself), depending on the type of the argument. For example, one may call
ParameterList.ParameterAccessMode()
with an integer parameter, specifying an index into the list of parameters, starting at 0, ending at one less of the parameter count. But one may also provide the name of the parameter as a string argument to that method, to obtain the access mode of that parameter by name.Additionally there is also the
ParameterList.Parameter()
method, which returns aParameterList.ParameterInfo
structure. That structure contains all the information about a specific parameter at once, and doesn’t require the user to obtain information about parameters one accessor at a time. If only a specific piece of information is required, though, it may be more efficient to simply ask for that specific piece of information directly via an accessor.Public Types
- enum Type
The type of the parameter.
Values:
- Unknown
Unknown type
This is returned if a specific parameter does not fall into one of the other parameter types.
- Boolean
Boolean
The parameter can either be true or false.
- Integer
Integer
The parameter is an integer value. There may be additional limits imposed on the range of the integer value.
- Float
Floating Point
The parameter is a floating point value. There may be additional limits imposed on the range of the floating point value.
- Enumeration
Enumeration
The parameter can be chosen from a set of predetermined values. Each predetermined value is associated with an integer value as well as a unique name.
- String
String
The parameter is a string value. Note that strings have to be encoded as UTF-8.
- File
File
The parameter is the path to a file in the filesystem. The path can be accessed like a string.
- Command
Command
A command parameter is a parmaeter that can be used to trigger an action on the device.
- enum AccessMode
The access mode of a given parameter
The access mode describes whether a parameter may be read from or written to.
Values:
- NotAvailable
The parameter is not available
This indicates that the parameter can currently neither be read nor written.
- ReadOnly
The parameter is read-only
- WriteOnly
The parameter is write-only
This is typically only the case for
Type.Command
type parameters.
- ReadWrite
The parameter may be read from and written to
This is the case for most parameters.
Public Functions
- ParameterList Clone ()
Clone the object
- ParameterInfo Parameter (int parameterIndex)
Get all information about a specific parameter by index
This will result in multiple underlying API calls.
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The full information about a specific parameter
- ParameterInfo Parameter (string parameterName)
Get all information about a specific parameter by name
This will result in multiple underlying API calls.
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The full information about a specific parameter
- Type ParameterType (int parameterIndex)
Get the type of a parameter by index
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The type of the parameter
- Type ParameterType (string parameterName)
Get the type of the parameter by name
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The type of the parameter
- AccessMode ParameterAccessMode (int parameterIndex)
Get the access mode of the parameter by index
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The access mode of the parameter
- AccessMode ParameterAccessMode (string parameterName)
Get the access mode of the parameter by name
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The access mode of the parameter
- string ParameterDisplayName (int parameterIndex)
Get the display name of the parameter by index
A display name is an optional more human-readable name of a parameter. This will return
null
if not set.- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The display name of the parameter, or
null
if not set
- string ParameterDisplayName (string parameterName)
Get the display name of the parameter by name
A display name is an optional more human-readable name of a parameter. This will return
null
if not set.- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The display name of the parameter, or
null
if not set
- string ParameterEffectiveDisplayName (int parameterIndex)
Get the effective display name of a parameter by index
This will return the parameter’s display name, if set, or otherwise the parameter’s name. This is a convenient accessor to always obtain a name that may be shown to the user, but that will show a more human-readable name if possible.
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The effective display name of the parameter
- string ParameterEffectiveDisplayName (string parameterName)
Get the effective display name of a parameter by name
This will return the parameter’s display name, if set, or otherwise the parameter’s name. This is a convenient accessor to always obtain a name that may be shown to the user, but that will show a more human-readable name if possible.
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The effective display name of the parameter
- string ParameterShortDescription (int parameterIndex)
Get the short description of the parameter by index
If set a short description is often displayed in form of a tool-tip to the user. If not set this will be an empty string.
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The short description of the parameter, or
null
if it was not set
- string ParameterShortDescription (string parameterName)
Get the short description of the parameter by name
If set a short description is often displayed in form of a tool-tip to the user. If not set this will be an empty string.
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The short description of the parameter, or
null
if it was not set
- string ParameterLongDescription (int parameterIndex)
Get the long description of the parameter by index
If not set this will be an empty string.
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The long description of the parameter, or
null
if it was not set
- string ParameterLongDescription (string parameterName)
Get the long description of the parameter by index
If not set this will be an empty string.
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The long description of the parameter, or
null
if it was not set
- string ParameterUnit (int parameterIndex)
Get the unit of the parameter by index
Numeric parameters (
Type.Integer
andType.Float
) may have a unit assigned to them that describes the physical unit of the parameter, such as “ms” or “Hz”. If no unit is set this will be an empty string.- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The unit of a numerical parameter, or an empty string if the numerical parameter has no unit set
- string ParameterUnit (string parameterName)
Get the unit of the parameter by name
Numeric parameters (
Type.Integer
andType.Float
) may have a unit assigned to them that describes the physical unit of the parameter, such as “ms” or “Hz”. If no unit is set this will be an empty string.- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The unit of a numerical parameter, or an empty string if the numerical parameter has no unit set
- List<string> AffectedParameters (int parameterIndex)
Get the parameters affected by changes to a given parameter (by index)
Given the index of a parameter, determine the list of parameters that might change if the value of the chosen parameter changes. For example, when changing the
BinningHorizontal
parameter of a camera, the value and limits of theOffsetX
andWidth
parameters of that camera may change as a result of the change in binning. The parameters that may be affected by a change in parameter values are listed here.- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The names of the parameters that may be affected by changes to the value of the specified parameter
- List<string> AffectedParameters (string parameterName)
Get the parameters affected by changes to a given parameter (by name)
Given the index of a parameter, determine the list of parameters that might change if the value of the chosen parameter changes. For example, when changing the
BinningHorizontal
parameter of a camera, the value and limits of theOffsetX
andWidth
parameters of that camera may change as a result of the change in binning. The parameters that may be affected by a change in parameter values are listed here.- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The names of the parameters that may be affected by changes to the value of the specified parameter
- string ParameterDefaultStringValue (int parameterIndex)
Get the default value of a parameter (string type, by index)
For parameters of
Type.String
orType.File
type obtain the default value of the parameter. The default value of a string-like parameter may be an empty string.For device parameters there is no default value, there is only the currently set value. (As well as potentially the initial value after a connection to the device is established, and it would be up to the user to determine that — though it is not guaranteed that the initial value hasn’t been affected by previous connections while the device has been powered on.) In that case this method will throw an error.
For parameters describing how to connect to a specific device there may be a default value, and that will be returned by this method.
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The default value of the parameter
- string ParameterDefaultStringValue (string parameterName)
Get the default value of a parameter (string type, by name)
For parameters of
Type.String
orType.File
type obtain the default value of the parameter. The default value of a string-like parameter may be an empty string.For device parameters there is no default value, there is only the currently set value. (As well as potentially the initial value after a connection to the device is established, and it would be up to the user to determine that — though it is not guaranteed that the initial value hasn’t been affected by previous connections while the device has been powered on.) In that case this method will throw an error.
For parameters describing how to connect to a specific device there may be a default value, and that will be returned by this method.
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The default value of the parameter
- Int64 ParameterDefaultIntegerValue (int parameterIndex)
Get the default value of a parameter (integer type, by index)
For parameters of
Type.Integer
orType.Enumeration
type obtain the default value of the parameter.For device parameters there is no default value, there is only the currently set value. (As well as potentially the initial value after a connection to the device is established, and it would be up to the user to determine that — though it is not guaranteed that the initial value hasn’t been affected by previous connections while the device has been powered on.) In that case this method will throw an error.
For parameters describing how to connect to a specific device there may be a default value, and that will be returned by this method.
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The default value of the parameter
- Int64 ParameterDefaultIntegerValue (string parameterName)
Get the default value of a parameter (integer type, by name)
For parameters of
Type.Integer
orType.Enumeration
type obtain the default value of the parameter.For device parameters there is no default value, there is only the currently set value. (As well as potentially the initial value after a connection to the device is established, and it would be up to the user to determine that — though it is not guaranteed that the initial value hasn’t been affected by previous connections while the device has been powered on.) In that case this method will throw an error.
For parameters describing how to connect to a specific device there may be a default value, and that will be returned by this method.
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The default value of the parameter
- double ParameterDefaultFloatValue (int parameterIndex)
Get the default value of a parameter (float type, by index)
For parameters of
Type.Float
type obtain the default value of the parameter.For device parameters there is no default value, there is only the currently set value. (As well as potentially the initial value after a connection to the device is established, and it would be up to the user to determine that — though it is not guaranteed that the initial value hasn’t been affected by previous connections while the device has been powered on.) In that case this method will throw an error.
For parameters describing how to connect to a specific device there may be a default value, and that will be returned by this method.
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The default value of the parameter
- double ParameterDefaultFloatValue (string parameterName)
Get the default value of a parameter (float type, by name)
For parameters of
Type.Float
type obtain the default value of the parameter.For device parameters there is no default value, there is only the currently set value. (As well as potentially the initial value after a connection to the device is established, and it would be up to the user to determine that — though it is not guaranteed that the initial value hasn’t been affected by previous connections while the device has been powered on.) In that case this method will throw an error.
For parameters describing how to connect to a specific device there may be a default value, and that will be returned by this method.
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The default value of the parameter
- bool ParameterDefaultBooleanValue (int parameterIndex)
Get the default value of a parameter (bool type, by index)
For parameters of
Type.Boolean
type obtain the default value of the parameter.For device parameters there is no default value, there is only the currently set value. (As well as potentially the initial value after a connection to the device is established, and it would be up to the user to determine that — though it is not guaranteed that the initial value hasn’t been affected by previous connections while the device has been powered on.) In that case this method will throw an error.
For parameters describing how to connect to a specific device there may be a default value, and that will be returned by this method.
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The default value of the parameter
- bool ParameterDefaultBooleanValue (string parameterName)
Get the default value of a parameter (bool type, by name)
For parameters of
Type.Boolean
type obtain the default value of the parameter.For device parameters there is no default value, there is only the currently set value. (As well as potentially the initial value after a connection to the device is established, and it would be up to the user to determine that — though it is not guaranteed that the initial value hasn’t been affected by previous connections while the device has been powered on.) In that case this method will throw an error.
For parameters describing how to connect to a specific device there may be a default value, and that will be returned by this method.
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The default value of the parameter
- List<string> EnumerationEntryNames (int parameterIndex)
Get the names of all enumeration entries of an enumeration parameter (parameter by index)
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The enumeration entry names of the parameter
- List<string> EnumerationEntryNames (string parameterName)
Get the names of all enumeration entries of an enumeration parameter (parameter by name)
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The enumeration entry names of the parameter
- Int64 EnumerationEntryValue (int parameterIndex, int entryIndex)
Get the value of an enumeration entry of an enumeration parameter (parameter by index, entry by index)
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Param entryIndex:
The index of the entry, must be at least 0 and at most one less than the size of the vector returned by
enumerationEntryNames()
for the same enumeration parameter.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The value of the enumeration entry
- Int64 EnumerationEntryValue (int parameterIndex, string entryName)
Get the value of an enumeration entry of an enumeration parameter (parameter by index, entry by name)
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Param entryName:
The name of the enumeration entry
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The value of the enumeration entry
- Int64 EnumerationEntryValue (string parameterName, int entryIndex)
Get the value of an enumeration entry of an enumeration parameter (parameter by name, entry by index)
- Param parameterName:
The name of the parameter
- Param entryIndex:
The index of the entry, must be at least 0 and at most one less than the size of the vector returned by
enumerationEntryNames()
for the same enumeration parameter.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The value of the enumeration entry
- Int64 EnumerationEntryValue (string parameterName, string entryName)
Get the value of an enumeration entry of an enumeration parameter (parameter by name, entry by name)
- Param parameterName:
The name of the parameter
- Param entryName:
The name of the enumeration entry
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The value of the enumeration entry
- string EnumerationEntryDisplayName (int parameterIndex, int entryIndex)
Get the display name of an enumeration entry of an enumeration parameter (parameter by index, entry by index)
If set, an entry’s display name will be a more human-readable name for the enumeration entry. If not set this will return an empty string.
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Param entryIndex:
The index of the entry, must be at least 0 and at most one less than the size of the vector returned by
enumerationEntryNames()
for the same enumeration parameter.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
If set the display name of the enumeration entry, or
null
if not set.
- string EnumerationEntryDisplayName (int parameterIndex, string entryName)
Get the display name of an enumeration entry of an enumeration parameter (parameter by index, entry by name)
If set, an entry’s display name will be a more human-readable name for the enumeration entry. If not set this will return an empty string.
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Param entryName:
The name of the enumeration entry
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
If set the display name of the enumeration entry, or
null
if not set.
- string EnumerationEntryDisplayName (string parameterName, int entryIndex)
Get the display name of an enumeration entry of an enumeration parameter (parameter by name, entry by index)
If set, an entry’s display name will be a more human-readable name for the enumeration entry. If not set this will return an empty string.
- Param parameterName:
The name of the parameter
- Param entryIndex:
The index of the entry, must be at least 0 and at most one less than the size of the vector returned by
enumerationEntryNames()
for the same enumeration parameter.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
If set the display name of the enumeration entry, or
null
if not set.
- string EnumerationEntryDisplayName (string parameterName, string entryName)
Get the display name of an enumeration entry of an enumeration parameter (parameter by name, entry by name)
If set, an entry’s display name will be a more human-readable name for the enumeration entry. If not set this will return an empty string.
- Param parameterName:
The name of the parameter
- Param entryName:
The name of the enumeration entry
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
If set the display name of the enumeration entry, or
null
if not set.
- string EnumerationEntryEffectiveDisplayName (int parameterIndex, int entryIndex)
Get the effective display name of an enumeration entry of an enumeration parameter (parameter by index, entry by index)
If the display name of an enumeration entry is not set, this will return the entry’s name instead.
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Param entryIndex:
The index of the entry, must be at least 0 and at most one less than the size of the vector returned by
enumerationEntryNames()
for the same enumeration parameter.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The enumeration entry’s effective display name
- string EnumerationEntryEffectiveDisplayName (int parameterIndex, string entryName)
Get the effective display name of an enumeration entry of an enumeration parameter (parameter by index, entry by name)
If the display name of an enumeration entry is not set, this will return the entry’s name instead.
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Param entryName:
The name of the enumeration entry
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The enumeration entry’s effective display name
- string EnumerationEntryEffectiveDisplayName (string parameterName, int entryIndex)
Get the effective display name of an enumeration entry of an enumeration parameter (parameter by name, entry by index)
If the display name of an enumeration entry is not set, this will return the entry’s name instead.
- Param parameterName:
The name of the parameter
- Param entryIndex:
The index of the entry, must be at least 0 and at most one less than the size of the vector returned by
enumerationEntryNames()
for the same enumeration parameter.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The enumeration entry’s effective display name
- string EnumerationEntryEffectiveDisplayName (string parameterName, string entryName)
Get the effective display name of an enumeration entry of an enumeration parameter (parameter by name, entry by name)
If the display name of an enumeration entry is not set, this will return the entry’s name instead.
- Param parameterName:
The name of the parameter
- Param entryName:
The name of the enumeration entry
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The enumeration entry’s effective display name
- Int64 ParameterIntegerIncrement (int parameterIndex)
Get the integer increment of a parameter (by index)
For
Type.Integer
type parameters this will return the increment value required to obtain a valid value of this parameter. Specifically, a valid value for the given integer must take the formvalue = minimum + N * increment
, whereN
is an arbitrary positive integer.- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The increment of the integer parameter
- Int64 ParameterIntegerIncrement (string parameterName)
Get the integer increment of a parameter (by name)
For
Type.Integer
type parameters this will return the increment value required to obtain a valid value of this parameter. Specifically, a valid value for the given integer must take the formvalue = minimum + N * increment
, whereN
is an arbitrary positive integer.- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The increment of the integer parameter
- Int64 ParameterIntegerMinimum (int parameterIndex)
Get the minimum value of an integer parameter (by index)
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The minimum value of the parameter
- Int64 ParameterIntegerMinimum (string parameterName)
Get the minimum value of an integer parameter (by name)
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The minimum value of the parameter
- Int64 ParameterIntegerMaximum (int parameterIndex)
Get the maximum value of an integer parameter (by index)
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The maximum value of the parameter
- Int64 ParameterIntegerMaximum (string parameterName)
Get the maximum value of an integer parameter (by name)
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The maximum value of the parameter
- double ParameterFloatIncrement (int parameterIndex)
Get the floating point increment of a parameter (by index)
For
Type.Float
type parameters this will return an indication of the increment to use while the user is editing this parameter. If an increment is actually enforced for floating point values, it means that the supplied value will be rounded to the nearest allowed value upon write.- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The increment of the parameter
- double ParameterFloatIncrement (string parameterName)
Get the floating point increment of a parameter (by name)
For
Type.Float
type parameters this will return an indication of the increment to use while the user is editing this parameter. If an increment is actually enforced for floating point values, it means that the supplied value will be rounded to the nearest allowed value upon write.- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The increment of the parameter
- double ParameterFloatMinimum (int parameterIndex)
Get the minimum value of an float parameter (by index)
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The minimum value of the parameter
- double ParameterFloatMinimum (string parameterName)
Get the minimum value of an float parameter (by name)
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The minimum value of the parameter
- double ParameterFloatMaximum (int parameterIndex)
Get the maximum value of an float parameter (by index)
- Param parameterIndex:
The index of the parameter, must be at least 0 and at most one smaller than the result of
ParameterCount
.- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The maximum value of the parameter
- double ParameterFloatMaximum (string parameterName)
Get the maximum value of an float parameter (by name)
- Param parameterName:
The name of the parameter
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- Return:
The maximum value of the parameter
- void Dispose ()
Dispose of this object
This will free all resources associated with this object. The object should not be used anymore after a call to this method.
Properties
- int ParameterCount { get; set; }
The number of parameters
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- string > ParameterNames { get; set; }
The list of all parameter names
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- ParameterInfo > Parameters { get; set; }
A list of all parameters
This will result in many underlying API calls.
- Throws OutOfMemoryException:
- Throws ArgumentException:
- Throws Error:
- Throws ObjectNoLongerValidError:
- Throws ParameterError:
- struct EnumerationEntry
Enumeration entry
Public Members
- string Name
The name of the enumeration entry
This will be unique within the enumeration parameter.
- Int64 Value
The value of the enumeration entry
This should be unique within the enumeration parameter, but aliases for the same value may exist. (The first entry in the list is the canonical name.)
- string DisplayName
The display name of the enumeration entry
If this is available this contains a more user-friendly string that describes this entry. If this is not available for the given enumeration entry this will be an empty string.
Properties
- string EffectiveDisplayName { get; set; }
The effective display name of the enumeration entry
This will be
DisplayName
if set, andName
otherwise.
- struct ParameterInfo
Complete parameter information
This structure contains all of the information of a given parameter collected into a single structure. It is returned by both
ParameterList.Parameter()
andParameterList.Parameters()
.Public Members
- string Name
The name of the parameter
This will be unique within the parameter information structure.
- ParameterList.AccessMode AccessMode
The access mode of the parameter
The access mode determines if a parameter can be read from or written to — or, in case of commands, if it can be executed.
- string DisplayName
The display name of the parameter
If set this is a more human-readable name of the parameter. This may be
null
.
- string ShortDescription
A short description of the parameter
If set this is typically shown in form of a tool-tip when hovering over a parameter. This may be
null
.
- string LongDescription
A long description of the parameter
This may be
null
.
- List<string> AffectedParameters
A list of affected parameters
If the value of this parameter is changed by the user, this list of parameter names indicates which parameters may also change due to that write. Affected parameters may have a different value, access mode, minmum, maximum or increment when a parameter changes.
The names in this list denote the unique name of each affected parameter, not the display name.
It is not necessary that a change to this parameter actually changes one of the affected parameters, it only indicates that such a change is possible.
- dynamic DefaultValue
The default value of a parameter
For device parameters there is no default value, there is only the currently set value. (As well as potentially the initial value after a connection to the device is established, and it would be up to the user to determine that — though it is not guaranteed that the initial value hasn’t been affected by previous connections while the device has been powered on.)
For parameters describing how to connect to a specific device there may be a default value, and this field will contain that value.
If the field is
null
there is no default value present.If the field is of any other type it will contain the default value depending on the type of the parameter. String and file parameters will have default values in the form of a
string
, integer and enumeration parameters will have default values in form of anInt64
, floating point parmaeters will have default values in form of adouble
, and boolean parameters will have default values in form of abool
.
- string Unit
The unit of the value
Numeric (integer and floating point) parameters may have a unit associated with them, such as “ms” or “Hz”. If present this will contain that unit.
Note that the unit is encoded as UTF-8, and the unit prefix for “microseconds” is represented with a greek mu, which is not part of the ASCII subset of UTF-8.
This will always be
null
for parameters that do not have a unit (because it is either not set or they are of a type that doesn’t have units).
- List<EnumerationEntry> EnumerationEntries
The list of available enumeration entries
For
Type.Enumeration
type parameters this will contain the list of all entries in the given
- dynamic Minimum
The minimum value
For numeric (integer and floating point) parameters this will contain the lowest value that the parameter accepts.
In all other cases this will be
null
.
- dynamic Maximum
The maximum value
For numeric (integer and floating point) parameters this will contain the largest value that the parameter accepts.
In all other cases this will be
null
.
- dynamic Increment
The increment value
For
Type.Integer
type parameters this will contain the increment value required to obtain a valid value of this parameter. Specifically, a valid value for the given integer must take the formvalue = minimum + N * increment
, whereN
is an arbitrary positive integer.For
Type.Float
type parameters this will give an indication of the increment to use while the user is editing this parameter. If an increment is actually enforced for floating point values, it means that the supplied value will be rounded to the nearest allowed value upon write.In all other cases this will be
null
.
Properties
- string EffectiveDisplayName { get; set; }
The effective display name of the parameter
If the display name is set this will be equivalent to
DisplayName
, otherwise toName
.
- Int64? IntegerIncrement { get; set; }
The integer increment of the parameter
If the parameter is not an integer, this will be
null
.
- Int64? IntegerMinimum { get; set; }
The integer minimum of the parameter
If the parameter is not an integer, this will be
null
.
- Int64? IntegerMaximum { get; set; }
The integer maximum of the parameter
If the parameter is not an integer, this will be
null
.
- double? FloatIncrement { get; set; }
The floating point increment of the parameter
If the parameter is not a float, this will be
null
.
- double? FloatMinimum { get; set; }
The floating point minimum of the parameter
If the parameter is not a float, this will be
null
.
- double? FloatMaximum { get; set; }
The floating point maximum of the parameter
If the parameter is not a float, this will be
null
.