Impact Acquire SDK .NET
|
A base class for properties. More...
Public Member Functions | |
String | flagsAsString () |
Returns the flags associated with this component as a string. | |
String | flagsAsString (String separator) |
Returns the flags associated with this component as a string. | |
Property () | |
Constructs a new unbound mv.impact.acquire.Property object. | |
Property (int hProp) | |
Constructs a new mv.impact.acquire.Property object. | |
String | readS () |
Reads data from this property as a string. | |
String | readS (int index) |
Reads data from this property as a string. | |
String | readS (int index, String format) |
Reads data from this property as a string. | |
String | readS (TPropertyLimits limit) |
Reads a defined limit from this property as a string. | |
String | readSArray () |
Reads data from this property as a string. | |
String | readSArray (String format) |
Reads data from this property as a string. | |
String | readSArray (String format, String delimiter) |
Reads data from this property as a string. | |
String | readSArray (String format, String delimiter, int startIndex) |
Reads data from this property as a string. | |
String | readSArray (String format, String delimiter, int startIndex, int endIndex) |
Reads data from this property as a string. | |
String | readSArray (String format, String delimiter, int startIndex, int endIndex, int mode) |
Reads data from this property as a string. | |
Property | removeValue () |
Removes a certain value from the property's data. | |
Property | removeValue (int index) |
Removes a certain value from the property's data. | |
String | representationAsString () |
Returns the recommended representation of the referenced component as a string. | |
Property | resizeValArray (uint newSize) |
Resizes the property's data array. | |
Component | restoreDefault () |
Restores the default for the referenced component. | |
Component | selectedFeature (int index) |
Retrieves a component that is selected by the current one. | |
Component | selectingFeature (int index) |
Retrieves a component that is selecting the current one. | |
override String | ToString () |
Reads data from this property as a string. | |
String | visibilityAsString () |
Returns the recommended visibility of the referenced component as a string. | |
Property | writeS (List< String > sequence) |
Assigns new values to this property. | |
Property | writeS (List< String > sequence, int index) |
Assigns new values to this property. | |
Property | writeS (String value) |
Assigns a new value to this property. | |
Property | writeS (String value, int index) |
Assigns a new value to this property. | |
Static Public Member Functions | |
static Component | factory (int hObj) |
Creates a new Component from a valid handle. | |
static Component | operator++ (Component ci) |
Moves to the next sibling of the current mv.impact.acquire.Component instance. | |
static String | representationAsString (TComponentRepresentation representation) |
Returns the recommended representation converted to a string. | |
static String | visibilityAsString (TComponentVisibility visibility) |
Returns the recommended visibility converted to a string. | |
Properties | |
bool | allowsValueCombinations [get] |
Checks if this enumerated property allows the combination of enum values. | |
uint | changedCounter [get] |
Returns the current changed counter for the component referenced by this object. | |
uint | changedCounterAttr [get] |
Returns the current attribute changed counter for the component referenced by this object. | |
int | dictSize [get] |
Returns the size of the properties translation dictionary. | |
String | displayName [get] |
Returns the display name of the component referenced by this object. | |
String | docString [get] |
Returns a string containing general information about the component referenced by this object. | |
Component | firstChild [get] |
Moves to the first child of this component(moves down one level). | |
Component | firstSibling [get] |
Moves to the first sibling(the first feature in the current list of features). | |
TComponentFlag | flags [get] |
Returns the flags associated with this component. | |
bool | hasDict [get] |
Returns whether this property defines a translation dictionary or not. | |
bool | hasMaxValue [get] |
Checks if a maximum value is defined for this property. | |
bool | hasMinValue [get] |
Checks if a minimum value is defined for this property. | |
bool | hasStepWidth [get] |
Checks if a step width is defined for this property. | |
int | hObj [get] |
Returns a unique identifier for the component referenced by this object. | |
bool | isDefault [get] |
Checks if this component is currently referencing the default for this component. | |
bool | isList [get] |
Checks if this component is of type mv.impact.acquire.ComponentList. | |
bool | isMeth [get] |
Checks if this component is of type mv.impact.acquire.Method. | |
bool | isProp [get] |
Checks if this component is of type mv.impact.acquire.Property or a derived type. | |
bool | isValid [get] |
Checks if the internal component referenced by this object is still valid. | |
bool | isVisible [get] |
Checks if the component is currently shadowed due to a settings made elsewhere or not. | |
bool | isWriteable [get] |
Checks if the caller has write/modify access to the component. | |
Component | lastSibling [get] |
Moves to the last sibling(the last feature in the current list of features). | |
uint | maxValCount [get] |
Returns maximum number of values that can be managed by this property. | |
String | name [get] |
Returns the name of the component referenced by this object. | |
Component | nextSibling [get] |
Moves to the next sibling(the next feature in the current list of features). | |
Component | parent [get] |
Moves to the parent of this component(moves up one level). | |
TComponentRepresentation | representation [get] |
Returns the recommended representation for this component. | |
uint | selectedFeatureCount [get] |
Returns the number of features selected by the current one. | |
ReadOnlyCollection< Component > | selectedFeatures [get] |
Retrieves the list of components that are selected by the current one. | |
uint | selectingFeatureCount [get] |
Returns the number of features selecting the current one. | |
ReadOnlyCollection< Component > | selectingFeatures [get] |
Retrieves the list of components that are selecting the current one. | |
String | stringFormatString [get] |
Returns the internal format string this property uses to convert data to strings. | |
TComponentType | type [get] |
Returns the type of the component referenced by hObj. | |
String | typeAsString [get] |
Returns the type of the referenced component as a string. | |
uint | valCount [get] |
Returns the current number of values managed by this property. | |
TComponentVisibility | visibility [get] |
Returns the recommended visibility for this component. | |
A base class for properties.
A property can be used to represent certain values like e.g. the input channel of a device. Depending on the way the property has been created it is either possible to read and write data to it or ( when the mv.impact.acquire.TComponentFlag.cfWriteAccess flag is NOT set ) just to read the data. In rare cases it might also be possible that the user is is not allowed to read the data of a property. To find out what you are allowed to do with a property or any other component the function mv.impact.acquire.Component.flags can be called.
A property can contain either a single value or an array of values of the same type (e.g. 4 integer values could be used to represent a property call 'Rectangle'. It can even (if the mv.impact.acquire.TComponentFlag.cfFixedSize flag is not set) contain a different number of values all the time its data is queried. E.g. for a property 'searchresults' each time some function is called which writes its results to this property the property could contain a different number of integer values afterwards.
Every properties value can be read and written either as string or by it actual value type. So you can either assign the value of an integer property by using the standard 'write' function that accepts the value to be the type of the property or the function mv.impact.acquire.Property.writeS can be used to set the property via a string containing the new value.
In addition to that float and int Properties might define a translation dictionary. This cannot be done by the user, but the user can work with the dictionary afterwards. A translation dictionary is a table which maps strings to certain values (e.g. integers).
The translation dictionary serves two purposes: Once it has been defined this property can only be assigned values ( which can either be passed as a string or as the actual value ) which are contained in the translation table. Thus this makes it very easy to restrict a certain property to a fixed number of values, which can be assigned to it. Properties that have a translation dictionary will typically be defined by declaring a template instance with the type of the enumeration.
The second benefit of a translation dictionary is that certain values can be assigned a meaningful description via its translation. When a translation table has been defined either the string translation can be used to assign its value or its actual data type. A float property e.g. might define a translation table like this: 'Auto -> 0', 'auto -> 1', 'OnLowLevel -> 2'. Now to set this property to use the 'on low level' trigger mode this can be done by calling one of the 'write' functions.
This can also be extremely useful to populate combo boxes for GUI applications.
Float and int properties can also define certain constants like a max. value or a min. value. If a property does define such values it can't be assigned values which do not lie within the defined range. To find out if constants are defined The user can call the functions mv.impact.acquire.Property.hasMaxValue, mv.impact.acquire.Property.hasMinValue and mv.impact.acquire.Property.hasStepWidth. To query to actual value of the max, min or step width the properties maxValue, minValue and stepWidth of the classes mv.impact.acquire.EnumPropertyF<T>, mv.impact.acquire.EnumPropertyI<T> and mv.impact.acquire.EnumPropertyI64<T> can be called.
When reading the value of a property as a string the user can define a format string telling the property module how to format the returned string. This works pretty much like when working e.g. with the printf function.
|
inline |
Constructs a new unbound mv.impact.acquire.Property object.
Properties constructed this way can't be used for anything unless they are bound to a internal driver property with a mv.impact.acquire.ComponentLocator object.
Constructs a new mv.impact.acquire.Property object.
Properties successfully constructed this way can be worked with directly. If hObj does not reference an internal driver property a mv.impact.acquire.ENotAProperty exception will be thrown.
[in] | hProp | A valid handle to a property |
Creates a new Component from a valid handle.
[in] | hObj | A valid handle to a component. |
|
inlineinherited |
Returns the flags associated with this component as a string.
Returns the flags associated with this component as a string.
[in] | separator | A user definable string to separate the individual flags. The default value is ' | ' resulting in the string to look e.g. like this: 'cfWriteAccess | cfReadAccess' |
Moves to the next sibling of the current mv.impact.acquire.Component instance.
This does the same as calling mv.impact.acquire.Component.nextSibling.
[in] | ci | A valid component. |
|
inline |
Reads data from this property as a string.
Reads data from this property as a string.
[in] | index | The index of the desired value(only necessary for properties containing more than one value) |
Reads data from this property as a string.
[in] | index | The index of the desired value(only necessary for properties containing more than one value) |
[in] | format | The format string telling the function how to format the result. If left empty the property uses its standard way of converting its data into a string |
|
inline |
Reads a defined limit from this property as a string.
[in] | limit | The limit that shall be queried |
|
inline |
Reads data from this property as a string.
This function can be used to query a set of values if this property stores more than a single value which might be useful for GUI applications.
Example
Reads data from this property as a string.
This function can be used to query a set of values if this property stores more than a single value which might be useful for GUI applications.
Example
[in] | format | The format string telling the function how to format the result. If left empty the property uses its standard way of converting its data into a string |
Reads data from this property as a string.
This function can be used to query a set of values if this property stores more than a single value which might be useful for GUI applications.
Example
[in] | format | The format string telling the function how to format the result. If left empty the property uses its standard way of converting its data into a string |
[in] | delimiter | This string is used to separate the individual values from one another. If left empty, a single blank will separate the data. |
Reads data from this property as a string.
This function can be used to query a set of values if this property stores more than a single value which might be useful for GUI applications.
Example
[in] | format | The format string telling the function how to format the result. If left empty the property uses its standard way of converting its data into a string |
[in] | delimiter | This string is used to separate the individual values from one another. If left empty, a single blank will separate the data. |
[in] | startIndex | The index of the first of the desired values |
Reads data from this property as a string.
This function can be used to query a set of values if this property stores more than a single value which might be useful for GUI applications.
Example
[in] | format | The format string telling the function how to format the result. If left empty the property uses its standard way of converting its data into a string |
[in] | delimiter | This string is used to separate the individual values from one another. If left empty, a single blank will separate the data. |
[in] | startIndex | The index of the first of the desired values |
[in] | endIndex | The index of the last of the desired values. If INT_MAX is passed, every from startIndex to the last value stored by the property will be returned. |
|
inline |
Reads data from this property as a string.
This function can be used to query a set of values if this property stores more than a single value which might be useful for GUI applications.
Example
[in] | format | The format string telling the function how to format the result. If left empty the property uses its standard way of converting its data into a string |
[in] | delimiter | This string is used to separate the individual values from one another. If left empty, a single blank will separate the data. |
[in] | startIndex | The index of the first of the desired values |
[in] | endIndex | The index of the last of the desired values. If INT_MAX is passed, every from startIndex to the last value stored by the property will be returned. |
[in] | mode | Specifies the mode this function operates in. Currently only the LSB affects the behaviour of this function. When the LSB is set, the translation dictionary (if defined) will be ignored for this call. |
|
inline |
Removes a certain value from the property's data.
Removes a certain value from the property's data.
[in] | index | The index of the value to be removed |
|
inlineinherited |
Returns the recommended representation of the referenced component as a string.
|
inlinestaticinherited |
Returns the recommended representation converted to a string.
[in] | representation | The representation to query the string representation for |
Resizes the property's data array.
This function resizes the internal data array of this property. The size of this array represents the number of values, which can be stored within the property. This function will only succeed, if the mv.impact.acquire.TComponentFlag.cfFixedSize is NOT set for this property and the user has "write rights" for this property. Otherwise an exception will be thrown. Whenever the user successfully writes an array of values to a property and this array contains more elements than the current internal data array can accommodate at the desired offset the internal data array will be increased automatically.
[in] | newSize | The new number of values this property shall be allowed to store. |
|
inlineinherited |
Restores the default for the referenced component.
Calling this function will restore the default value for the component referenced by this object.
If this function is called for an object of type mv.impact.acquire.ComponentList every component in that list is restored to the default value.
Retrieves a component that is selected by the current one.
This function retrieves a component that is selected by the current one. This information is mainly useful for GUI applications that want to arrange features in a way that dependencies between features can easily been spotted.
When a component 'selects' other components, this indicates that selected components may change whenever the selecting component changes. An example for a selector might be a property defining the index within a LUT while the value of a particular LUT entry could be a selected feature. Assuming 2 properties LUTIndex and LUTValue then changing LUTIndex will invalidate and possibly change LUTValue.
To find out how many mv.impact.acquire.Component objects are selected by the current one call mv.impact.acquire.Component.selectedFeatureCount. This value minus 1 will also be the max. value for index.
[in] | index | The index for the component to query. |
Retrieves a component that is selecting the current one.
This function retrieves a component that is selecting the current one. This information is mainly useful for GUI applications that want to arrange features in a way that dependencies between features can easily been spotted.
When a component 'selects' other components, this indicates that selected components may change whenever the selecting component changes. An example for a selector might be a property defining the index within a LUT while the value of a particular LUT entry could be a selected feature. Assuming 2 properties LUTIndex and LUTValue then changing LUTIndex will invalidate and possibly change LUTValue.
To find out how many mv.impact.acquire.Component objects are selecting the current one call mv.impact.acquire.Component.selectingFeatureCount. This value minus 1 will also be the max. value for index.
[in] | index | The index for the component to query. |
Reads data from this property as a string.
This is the same as calling mv.impact.acquire.Property.readS for properties storing a single value or mv.impact.acquire.Property.readSArray for properties storing multiple values.
|
inlineinherited |
Returns the recommended visibility of the referenced component as a string.
|
inlinestaticinherited |
Returns the recommended visibility converted to a string.
[in] | visibility | The visibility to query the string representation for |
Assigns new values to this property.
The user must have "write rights" for this property in order to be able to modify its values. Also if index is greater than the current internal data array size of this property the user must be allowed to change to size of the properties internal data array (the mv.impact.acquire.TComponentFlag.cfFixedSize flag must NOT be set). This function behaves exactly like mv.impact.acquire.Property.writeS except that is can be used to assign more than one value at the same time. The parameter index here serves as an offset. If for example a property holds 3 values 'one', 'two' and 'three' before this call and the function is then called with an array containing the string 'orange' and 'blue' and index = 2 then after a successful call to this function the property will hold the data 'one', 'two', 'orange' and 'blue'.
[in] | sequence | A constant reference to an array containing the strings to be assigned to the property |
Assigns new values to this property.
The user must have "write rights" for this property in order to be able to modify its values. Also if index is greater than the current internal data array size of this property the user must be allowed to change to size of the properties internal data array (the mv.impact.acquire.TComponentFlag.cfFixedSize flag must NOT be set). This function behaves exactly like mv.impact.acquire.Property.writeS except that is can be used to assign more than one value at the same time. The parameter index here serves as an offset. If for example a property holds 3 values 'one', 'two' and 'three' before this call and the function is then called with an array containing the string 'orange' and 'blue' and index = 2 then after a successful call to this function the property will hold the data 'one', 'two', 'orange' and 'blue'.
[in] | sequence | A constant reference to an array containing the strings to be assigned to the property |
[in] | index | The offset from where to start to assign the values |
Assigns a new value to this property.
The user caller have "write rights" for this property in order to be able to modify its value. Also if index is greater than the current internal data array size of this property the user must be allowed to change to size of the properties internal data array (the mv.impact.acquire.TComponentFlag.cfFixedSize flag must NOT be set).
[in] | value | The new value for this property at the given index. |
Assigns a new value to this property.
The user caller have "write rights" for this property in order to be able to modify its value. Also if index is greater than the current internal data array size of this property the user must be allowed to change to size of the properties internal data array (the mv.impact.acquire.TComponentFlag.cfFixedSize flag must NOT be set).
[in] | value | The new value for this property at the given index. |
[in] | index | The index of the value to modify. |
|
get |
Checks if this enumerated property allows the combination of enum values.
If this function returns true, the enum constants can be 'ored' together. This works for the enum constants as well as for the string representations returned in the properties translation dictionary.
if a property e.g. defines a dictionary (('1', "one"), ('2', "two")) the following write operations will be valid:
If this function returns true code like this will be valid:
|
getinherited |
Returns the current changed counter for the component referenced by this object.
This changed counter is incremented internally each time the component is modified. To check if this component has been modified since the last time, this check has been performed, keep track of the last return value of this function and compare it with the new value. This can be helpful e.g. to keep a GUI up to date. The value returned by this function will always be larger than or equal to the value returned by mv.impact.acquire.ComponentAccess.changedCounterAttr (except in case of a wrap around) when called at the same time for the same object as it's always incremented when the component has been modified in any way while the latter one will only be incremented if the attributes (e.g. the flags) but NOT if e.g. the value(s) of a property has been modified.
Example
|
getinherited |
Returns the current attribute changed counter for the component referenced by this object.
This changed counter is incremented internally each time the components attributes have been modified. To check if this components attributes have been modified since the last time, this check has been performed, keep track of the last return value of this function and compare it with the new value. This can be helpful e.g. to keep a GUI up to date.
|
get |
Returns the size of the properties translation dictionary.
If the property does define a translation dictionary this function returns the number of elements contained in this dictionary.
|
getinherited |
Returns the display name of the component referenced by this object.
|
getinherited |
Returns a string containing general information about the component referenced by this object.
|
getinherited |
Moves to the first child of this component(moves down one level).
Calling this function will only succeed, if the current mv.impact.acquire.Component references a list.
|
getinherited |
Moves to the first sibling(the first feature in the current list of features).
|
getinherited |
Returns the flags associated with this component.
|
get |
Returns whether this property defines a translation dictionary or not.
|
get |
Checks if a maximum value is defined for this property.
|
get |
Checks if a minimum value is defined for this property.
|
get |
Checks if a step width is defined for this property.
|
getinherited |
Returns a unique identifier for the component referenced by this object.
|
getinherited |
Checks if this component is currently referencing the default for this component.
This function will return true only for derived components that have not been modified.
|
getinherited |
Checks if this component is of type mv.impact.acquire.ComponentList.
|
getinherited |
Checks if this component is of type mv.impact.acquire.Method.
|
getinherited |
Checks if this component is of type mv.impact.acquire.Property or a derived type.
|
getinherited |
Checks if the internal component referenced by this object is still valid.
This function can be used to verify whether a referenced component is still valid or not. When e.g. referencing a driver property after mv.impact.acquire.Device.close has been called this function would return false. Calling any other function that tries to access the referenced component in that case would raise an exception.
|
getinherited |
Checks if the component is currently shadowed due to a settings made elsewhere or not.
Settings applied to certain components might affect the behaviour of others. For example an activated automatic gain control might shadow the value written to the gain property by the user as the gain is calculated internally. In order to check if modifying the actual component will affect the behaviour of the system this function may be used. When it returns true, the mv.impact.acquire.Component will have an impact on the system, if false is returned, the feature might be modified, but this will currently NOT influence the acquisition process or the overall behaviour of the device or driver.
This is what is called visibility. The user still might modify or read the current mv.impact.acquire.Component when it's not visible however the actual data will be used only if the Component is visible (mv.impact.acquire.TComponentFlag.cfInvisible must NOT be set).
The visibility of a mv.impact.acquire.Component object will change only if other mv.impact.acquire.Component objects are modified and NEVER when a program runs but does not change any mv.impact.acquire.Component.
|
getinherited |
Checks if the caller has write/modify access to the component.
|
getinherited |
Moves to the last sibling(the last feature in the current list of features).
|
get |
Returns maximum number of values that can be managed by this property.
For the majority of properties this function will return '1', but as properties might manage more than a single value, this value might be interesting from time to time.
|
getinherited |
Returns the name of the component referenced by this object.
|
getinherited |
Moves to the next sibling(the next feature in the current list of features).
|
getinherited |
Moves to the parent of this component(moves up one level).
|
getinherited |
Returns the recommended representation for this component.
The representation can be used e.g. e.g. to develop a GUI that creates convenient controls for certain features.
Valid values for this property are defined by the enumeration mv.impact.acquire.TComponentRepresentation.
|
getinherited |
Returns the number of features selected by the current one.
|
getinherited |
Retrieves the list of components that are selected by the current one.
This function retrieves the list of components that are selected by the current one. This information is mainly useful for GUI applications that want to arrange features in a way that dependencies between features can easily been spotted.
When a component 'selects' other components, this indicates that selected components may change whenever the selecting component changes. An example for a selector might be a property defining the index within a LUT while the value of a particular LUT entry could be a selected feature. Assuming 2 properties LUTIndex and LUTValue then changing LUTIndex will invalidate and possibly change LUTValue.
|
getinherited |
Returns the number of features selecting the current one.
|
getinherited |
Retrieves the list of components that are selecting the current one.
This function retrieves the list of components that are selecting the current one. This information is mainly useful for GUI applications that want to arrange features in a way that dependencies between features can easily been spotted.
When a component 'selects' other components, this indicates that selected components may change whenever the selecting component changes. An example for a selector might be a property defining the index within a LUT while the value of a particular LUT entry could be a selected feature. Assuming 2 properties LUTIndex and LUTValue then changing LUTIndex will invalidate and possibly change LUTValue.
|
get |
Returns the internal format string this property uses to convert data to strings.
|
getinherited |
Returns the type of the component referenced by hObj.
|
getinherited |
Returns the type of the referenced component as a string.
|
get |
Returns the current number of values managed by this property.
For the majority of properties this function will return '1', but as properties might manage more than a single value, this value might be interesting from time to time.
|
getinherited |
Returns the recommended visibility for this component.
The visibility can be used e.g. to develop a GUI that displays a crucial subset of features only.