Impact Acquire SDK C++
|
A template class to represent float properties and enumerated float properties. More...
#include <mvIMPACT_acquire.h>
Public Member Functions | |
bool | allowsValueCombinations (void) const |
Checks if this enumerated property allows the combination of enum values. | |
unsigned int | changedCounter (void) const |
Returns the current changed counter for the component referenced by this object. | |
unsigned int | changedCounterAttr (void) const |
Returns the current attribute changed counter for the component referenced by this object. | |
unsigned int | dictSize (void) const |
Returns the size of the properties translation dictionary. | |
std::string | displayName (void) const |
Returns the display name of the component referenced by this object. | |
std::string | docString (void) const |
Returns a string containing general information about the component referenced by this object. | |
EnumPropertyF () | |
Constructs a new unbound mvIMPACT::acquire::EnumPropertyF object. | |
EnumPropertyF (const EnumPropertyF &src) | |
Constructs a new mvIMPACT::acquire::EnumPropertyF from an existing one. | |
EnumPropertyF (HOBJ hProp) | |
Constructs a new mvIMPACT::acquire::EnumPropertyF object. | |
Component | firstChild (void) const |
Moves to the first child of this component(moves down one level). | |
Component | firstSibling (void) const |
Moves to the first sibling(the first feature in the current list of features). | |
TComponentFlag | flags (void) const |
Returns the flags associated with this component. | |
std::string | flagsAsString (const std::string &separator=" | ") const |
Returns the flags associated with this component as a string. | |
ZYX | getMaxValue (void) const |
Reads the maximum value from a property. | |
ZYX | getMinValue (void) const |
Reads the minimum value from a property. | |
ZYX | getStepWidth (void) const |
Reads the step width from a property. | |
const EnumPropertyF & | getTranslationDict (std::vector< std::pair< std::string, ZYX > > &sequence) const |
This function queries the property's translation table. | |
std::string | getTranslationDictString (int index=0) const |
This function reads a single translation table string entry from a property. | |
const EnumPropertyF & | getTranslationDictStrings (std::vector< std::string > &sequence) const |
This function queries a list of valid strings for this property. | |
ZYX | getTranslationDictValue (int index=0) const |
This function reads a single translation table value entry from a property. | |
const EnumPropertyF & | getTranslationDictValues (std::vector< ZYX > &sequence) const |
This function queries a list of valid values for this property. | |
bool | hasDict (void) const |
Returns whether this property defines a translation dictionary or not. | |
bool | hasMaxValue (void) const |
Checks if a maximum value is defined for this property. | |
bool | hasMinValue (void) const |
Checks if a minimum value is defined for this property. | |
bool | hasStepWidth (void) const |
Checks if a step width is defined for this property. | |
HOBJ | hObj (void) const |
Returns a unique identifier for the component referenced by this object. | |
bool | isConstDefined (TPropertyLimits constant) const |
Checks if a certain constant is defined for this property(deprecated). | |
bool | isDefault (void) const |
Checks if this component is currently referencing the default for this component. | |
bool | isList (void) const |
Checks if this component is of type mvIMPACT::acquire::ComponentList. | |
bool | isMeth (void) const |
Checks if this component is of type mvIMPACT::acquire::Method. | |
bool | isProp (void) const |
Checks if this component is of type mvIMPACT::acquire::Property or a derived type. | |
bool | isValid (void) const |
Checks if the internal component referenced by this object is still valid. | |
bool | isVisible (void) const |
Checks if the component is currently shadowed due to a settings made elsewhere or not. | |
bool | isWriteable (void) const |
Checks if the caller has write/modify access to the component. | |
Component | lastSibling (void) const |
Moves to the last sibling(the last feature in the current list of features). | |
unsigned int | maxValCount (void) const |
Returns maximum number of values that can be managed by this property. | |
std::string | name (void) const |
Returns the name of the component referenced by this object. | |
Component | nextSibling (void) |
Moves to the next sibling(the next feature in the current list of features). | |
operator HOBJ () const | |
Allows implicit conversion to a HOBJ. | |
Component | operator++ (int) |
Moves to the next sibling(the next feature in the current list of features). | |
Component & | operator++ (void) |
Moves to the next sibling(the next feature in the current list of features). | |
Component | parent (void) const |
Moves to the parent of this component(moves up one level). | |
ZYX | read (int index=0) const |
Reads a value from a property. | |
void | read (std::vector< ZYX > &sequence, bool boAtomic, int start=0, int end=END_OF_LIST) const |
Reads a set of values from a property. | |
void | read (std::vector< ZYX > &sequence, int start=0, int end=END_OF_LIST) const |
Reads a set of values from a property. | |
std::string | readS (int index=0, const std::string &format="") const |
Reads data from this property as a string. | |
std::string | readSArray (const std::string &format="", const std::string &delimiter="", int startIndex=0, int endIndex=INT_MAX, int mode=0) const |
Reads data from this property as a string. | |
const Property & | removeValue (int index=0) const |
Removes a certain value from the property's data. | |
TComponentRepresentation | representation (void) const |
Returns the recommended representation for this component. | |
std::string | representationAsString (void) const |
Returns the recommended representation of the referenced component as a string. | |
const Property & | resizeValArray (unsigned int newSize) const |
Resizes the property's data array. | |
const Component & | restoreDefault (void) const |
Restores the default for the referenced component. | |
Component | selectedFeature (unsigned int index) const |
Retrieves a component that is selected by the current one. | |
unsigned int | selectedFeatureCount (void) const |
Returns the number of features selected by the current one. | |
unsigned int | selectedFeatures (std::vector< Component > &v) const |
Retrieves the list of components that are selected by the current one. | |
Component | selectingFeature (unsigned int index) const |
Retrieves a component that is selecting the current one. | |
unsigned int | selectingFeatureCount (void) const |
Returns the number of features selecting the current one. | |
unsigned int | selectingFeatures (std::vector< Component > &v) const |
Retrieves the list of components that are selecting the current one. | |
std::string | stringFormatString (void) const |
Returns the internal format string this property uses to convert data to strings. | |
TComponentType | type (void) const |
Returns the type of the referenced component. | |
std::string | typeAsString (void) const |
Returns the type of the referenced component as a string. | |
unsigned int | valCount (void) const |
Returns the current number of values managed by this property. | |
TComponentVisibility | visibility (void) const |
Returns the recommended visibility for this component. | |
std::string | visibilityAsString (void) const |
Returns the recommended visibility of the referenced component as a string. | |
const EnumPropertyF & | write (const std::vector< ZYX > &sequence, bool boAtomic, int index=0) const |
Writes a set of values to the property. | |
const EnumPropertyF & | write (const std::vector< ZYX > &sequence, int index=0) const |
Writes a set of values to the property. | |
const EnumPropertyF & | write (ZYX value, int index=0) const |
Writes one value to the property. | |
const Property & | writeS (const std::string &value, int index=0) const |
Assigns a new value to this property. | |
const Property & | writeS (const std::vector< std::string > &sequence, int index=0) const |
Assigns new values to this property. | |
Static Public Member Functions | |
static std::string | representationAsString (TComponentRepresentation representation) |
Returns the recommended representation converted to a string. | |
static TComponentType | type (HOBJ hObj) |
Returns the type of the component referenced by hObj. | |
static std::string | visibilityAsString (TComponentVisibility visibility) |
Returns the recommended visibility converted to a string. | |
Protected Types | |
enum | { BUFFER_INCREMENT_FACTOR = 6 } |
An internal constant that defines by which factor dynamic buffers will grow when the current size is not sufficient. More... | |
Protected Member Functions | |
std::string | compGetStringParam (TOBJ_StringQuery query, int param1=0, int param2=0) const |
A helper function to query certain component related string parameters. | |
int | valuesToRead (int start, int end) const |
Static Protected Member Functions | |
static char * | stringAllocator (const char *pBuf, size_t reqBufSize) |
An internal helper function for fast string allocation. | |
Protected Attributes | |
HOBJ | m_hObj |
A unique identifier for the internal driver object referenced by this instance of mvIMPACT::acquire::ComponentAccess. | |
A template class to represent float properties and enumerated float properties.
The template parameter specifies the enum to use as the value type for this enumerated property. The class itself however is restricted for float values. To use a normal float (not enumerated) properties use the mvIMPACT::acquire::PropertyF type.
|
protectedinherited |
|
inlineexplicit |
Constructs a new unbound mvIMPACT::acquire::EnumPropertyF object.
|
inlineexplicit |
Constructs a new mvIMPACT::acquire::EnumPropertyF object.
[in] | hProp | A valid handle to a float property |
|
inline |
Constructs a new mvIMPACT::acquire::EnumPropertyF from an existing one.
[in] | src | A constant reference to the mvIMPACT::acquire::EnumPropertyF object, this object shall be created from |
|
inlineinherited |
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:
|
inlineinherited |
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 mvIMPACT::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.
|
inlineinherited |
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.
|
inlineprotectedinherited |
A helper function to query certain component related string parameters.
This function might throw an exception, if an invalid parameter has been queried.
query | The type of the parameter to read | |
[in] | param1 | An additional parameter |
[in] | param2 | An additional parameter |
|
inlineinherited |
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.
|
inlineinherited |
Returns the display name of the component referenced by this object.
|
inlineinherited |
Returns a string containing general information about the component referenced by this object.
|
inlineinherited |
Moves to the first child of this component(moves down one level).
Calling this function will only succeed, if the current mvIMPACT::acquire::Component references a list.
|
inlineinherited |
Moves to the first sibling(the first feature in the current list of features).
|
inlineinherited |
Returns the flags associated with this component.
|
inlineinherited |
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' |
|
inline |
Reads the maximum value from a property.
|
inline |
Reads the minimum value from a property.
|
inline |
Reads the step width from a property.
|
inline |
This function queries the property's translation table.
If this property defines a translation table the strings and their corresponding translation values will be written into sequence. If the property does NOT define a translation table sequence will be empty after this function call.
[out] | sequence | A reference to a container which will receive the data from the properties translation dictionary. |
|
inline |
This function reads a single translation table string entry from a property.
If this property defines a translation table and index specifies a valid entry the string representation of this entry will be returned. If the property does NOT define a translation table or index specifies an invalid entry an exception will be thrown.
[in] | index | The index of the entry to read from the property. |
|
inline |
This function queries a list of valid strings for this property.
If this property defines a translation table all valid strings will be written into sequence. If the property does NOT define a translation table sequence will be empty after this function call.
[out] | sequence | A reference to a container to store the data read from the property into. |
|
inline |
This function reads a single translation table value entry from a property.
If this property defines a translation table and index specifies a valid entry the value of this entry will be returned. If the property does NOT define a translation table or index specifies an invalid entry an exception will be thrown.
[in] | index | The index of the entry to read from the property. |
|
inline |
This function queries a list of valid values for this property.
If this property defines a translation table all valid values will be written into sequence. If the property does NOT define a translation table sequence will be empty after this function call.
[out] | sequence | A reference to a container to store the data read from the property into. |
|
inlineinherited |
Returns whether this property defines a translation dictionary or not.
|
inlineinherited |
Checks if a maximum value is defined for this property.
|
inlineinherited |
Checks if a minimum value is defined for this property.
|
inlineinherited |
Checks if a step width is defined for this property.
|
inlineinherited |
Returns a unique identifier for the component referenced by this object.
|
inherited |
Checks if a certain constant is defined for this property(deprecated).
Valid values for constant are defined by the enum mvIMPACT::acquire::TPropertyLimits.
constant | [in] The constant whose existence is in question |
|
inlineinherited |
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.
|
inlineinherited |
Checks if this component is of type mvIMPACT::acquire::ComponentList.
|
inlineinherited |
Checks if this component is of type mvIMPACT::acquire::Method.
|
inlineinherited |
Checks if this component is of type mvIMPACT::acquire::Property or a derived type.
|
inlineinherited |
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 mvIMPACT::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.
|
inlineinherited |
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 mvIMPACT::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 mvIMPACT::acquire::Component when it's not visible however the actual data will be used only if the Component is visible (mvIMPACT::acquire::cfInvisible must NOT be set).
The visibility of a mvIMPACT::acquire::Component object will change only if other mvIMPACT::acquire::Component objects are modified and NEVER when a program runs but does not change any mvIMPACT::acquire::Component.
|
inlineinherited |
Checks if the caller has write/modify access to the component.
|
inlineinherited |
Moves to the last sibling(the last feature in the current list of features).
|
inlineinherited |
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.
|
inlineinherited |
Returns the name of the component referenced by this object.
|
inlineinherited |
Moves to the next sibling(the next feature in the current list of features).
|
inlineinherited |
Allows implicit conversion to a HOBJ.
|
inlineinherited |
Moves to the next sibling(the next feature in the current list of features).
|
inlineinherited |
Moves to the next sibling(the next feature in the current list of features).
|
inlineinherited |
Moves to the parent of this component(moves up one level).
|
inline |
Reads a value from a property.
This function queries a single value stored under index index in the property.
[in] | index | The index of the value to read from the property. |
|
inline |
Reads a set of values from a property.
This function queries a set of values from a property and stores these values into sequence.
[out] | sequence | A reference to a container to store the data read from the property into. |
[in] | boAtomic | Set this parameter to true to get all values at once(recommended). If set to false the function will need more time and all values in sequence will be read one after the other |
[in] | start | The index from where to start reading values from the property. |
[in] | end | The index where to stop reading values from the property. |
|
inline |
Reads a set of values from a property.
This function queries a set of values from a property and stores these values into sequence.
[out] | sequence | A reference to a container to store the data read from the property into. |
[in] | start | The index from where to start reading values from the property. |
[in] | end | The index where to stop reading values from the property. |
|
inlineinherited |
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 |
|
inlineinherited |
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.
[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. |
|
inlineinherited |
Removes a certain value from the property's data.
[in] | index | The index of the value to be removed |
|
inlineinherited |
Returns the recommended representation for this component.
The representation can be used e.g. to develop a GUI that creates convenient controls for certain features.
Valid values for this property are defined by the enumeration mvIMPACT::acquire::TComponentRepresentation.
|
inlinestaticinherited |
Returns the recommended representation converted to a string.
[in] | representation | The representation to query the string representation for |
|
inlineinherited |
Returns the recommended representation of the referenced component as a string.
|
inlineinherited |
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 mvIMPACT::acquire::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 mvIMPACT::acquire::ComponentList every component in that list is restored to the default value.
|
inlineinherited |
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.
C++ offers the more efficient function mvIMPACT::acquire::Component::selectedFeatures to obtain this information.
To find out how many mvIMPACT::acquire::Component objects are selected by the current one call mvIMPACT::acquire::Component::selectedFeatureCount. This value minus 1 will also be the max. value for index.
[in] | index | The index for the component to query. |
|
inlineinherited |
Returns the number of features selected by the current one.
|
inlineinherited |
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.
[out] | v | An array that will retrieve the list of components that are selected by the current one. |
|
inlineinherited |
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.
C++ offers the more efficient function mvIMPACT::acquire::Component::selectingFeatures to obtain this information.
To find out how many mvIMPACT::acquire::Component objects are selecting the current one call mvIMPACT::acquire::Component::selectingFeatureCount. This value minus 1 will also be the max. value for index.
[in] | index | The index for the component to query. |
|
inlineinherited |
Returns the number of features selecting the current one.
|
inlineinherited |
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.
[out] | v | An array that will retrieve the list of components that are selecting the current one. |
|
inlinestaticprotectedinherited |
An internal helper function for fast string allocation.
|
inlineinherited |
Returns the internal format string this property uses to convert data to strings.
|
inlinestaticinherited |
Returns the type of the component referenced by hObj.
[in] | hObj | The component the type shall be retrieved for |
|
inlineinherited |
Returns the type of the referenced component.
|
inlineinherited |
Returns the type of the referenced component as a string.
|
inlineinherited |
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.
|
inlineprotectedinherited |
|
inlineinherited |
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.
Valid values for this property are defined by the enumeration mvIMPACT::acquire::TComponentVisibility.
|
inlinestaticinherited |
Returns the recommended visibility converted to a string.
[in] | visibility | The visibility to query the string representation for |
|
inlineinherited |
Returns the recommended visibility of the referenced component as a string.
|
inline |
Writes a set of values to the property.
This function writes a set of values starting at index to the property.
[in] | sequence | An array containing the values to write to the property. |
[in] | boAtomic | Set this parameter to true to set all values at once(recommended). If set to false the function will need more time and all values in sequence will be set one after the other |
[in] | index | The index where to write the first value to the property. |
|
inline |
Writes a set of values to the property.
This function writes a set of values starting at index to the property.
[in] | sequence | An array containing the values to write to the property. |
[in] | index | The index where to write the first value to the property. |
|
inline |
Writes one value to the property.
This function writes a single value under index index to the property.
[in] | value | The value to write to the property. |
[in] | index | The index defining at which position to write the value. |
|
inlineinherited |
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 mvIMPACT::acquire::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 |
|
inlineinherited |
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 mvIMPACT::acquire::cfFixedSize flag must NOT be set). This function behaves exactly like mvIMPACT::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 |
|
protectedinherited |
A unique identifier for the internal driver object referenced by this instance of mvIMPACT::acquire::ComponentAccess.