Impact Acquire SDK C++
|
Contains convenience functions to control features understood by a devices custom command interpreter. More...
#include <mvIMPACT_acquire_GenICam_CustomCommands.h>
Public Member Functions | |
unsigned int | commandBufferSize (void) const |
Returns the size of the command buffer for this device in bytes. | |
unsigned int | commandBufferSizeUsed (void) const |
Returns the amount of bytes of the command buffer currently used(thus the amount of bytes that await sending) for this device in bytes. | |
CustomCommandGenerator (mvIMPACT::acquire::Device *pDev, const std::string &settingName="Base") | |
Constructs a new mvIMPACT::acquire::GenICam::CustomCommandGenerator object. | |
void | discardCommandBuffer () |
Discards all pending custom commands to the device. | |
int | modifySequencerSetValue (const int64_type sequencerSet, const TSequencerSetParameter parameter, const double value) |
Modifies a value of a certain sequencer set at runtime. | |
int | modifySequencerSetValue (const int64_type sequencerSet, const TSequencerSetParameter parameter, const int64_type value) |
Modifies a value of a certain sequencer set at runtime. | |
int | queueSequencerSetValueModification (const int64_type sequencerSet, const TSequencerSetParameter parameter, const double value) |
Queues the modification of a value of a certain sequencer set at runtime. | |
int | queueSequencerSetValueModification (const int64_type sequencerSet, const TSequencerSetParameter parameter, const int64_type value) |
Queues the modification of a value of a certain sequencer set at runtime. | |
int | queueTransmissionRequest (const Request *pRequest, int offsetX, int offsetY, int width, int height, TRequestTransmissionMode mode=rtmFullResolution, unsigned int identifier=0) |
Request the transmission of an image currently associated with the Request object in a different mode/ROI. | |
int | queueTransmissionRequest (const Request *pRequest, unsigned int identifier=0) |
Request the transmission of an image currently associated with the Request object in full resolution. | |
int | queueTransmissionRequest (int64_type timestamp_us, int offsetX, int offsetY, int width, int height, TRequestTransmissionMode mode=rtmFullResolution, unsigned int identifier=0) |
Request the transmission of an image with a certain timestamp in a different mode/ROI. | |
int | requestTransmission (const Request *pRequest, int offsetX, int offsetY, int width, int height, TRequestTransmissionMode mode=rtmFullResolution, unsigned int identifier=0) |
Request the transmission of an image currently associated with the Request object in a different mode/ROI. | |
int | requestTransmission (const Request *pRequest, unsigned int identifier=0) |
Request the transmission of an image currently associated with the Request object in full resolution. | |
int | requestTransmission (int64_type timestamp_us, int offsetX, int offsetY, int width, int height, TRequestTransmissionMode mode=rtmFullResolution, unsigned int identifier=0) |
Request the transmission of an image with a certain timestamp in a different mode/ROI. | |
int | sendCommandBuffer (void) |
Applies all pending custom commands to the device. | |
Contains convenience functions to control features understood by a devices custom command interpreter.
Contains convenience functions to control features understood by a devices custom command interpreter.
This class will allow to create various special commands understood by some MATRIX VISION and Balluff imaging devices. For example an application can modify parameters in a running sequencer program without stopping the acquisition engine and/or the sequencer program (see mvIMPACT::acquire::GenICam::SequencerControl and the corresponding use cases for details). This allows changes to be applied much faster than with a conventional approach which would work like this:
A single parameter in a defined sequencer set can be modified much faster at runtime like this:
This class uses an internal command buffer which allows an application to send multiple change commands in a single packet. This can be achieved like this:
The command queue NEVER overflows. When no more data can be stored in the queue before queuing the next parameter change all the pending changes will be transmitted to the device. Calling mvIMPACT::acquire::GenICam::CustomCommandGenerator::queueSequencerSetValueModification and mvIMPACT::acquire::GenICam::CustomCommandGenerator::sendCommandBuffer directly afterwards is equivalent to call mvIMPACT::acquire::GenICam::CustomCommandGenerator::modifySequencerSetValue. So the previous example can also be rewritten like this:
Because there can never be an overflow of the command queue even this code is valid:
Apart from modifying sequencer sets at runtime some MATRIX VISION and Balluff imaging devices support the so called Smart Frame Recall
feature. For more information about the feature itself please refer to the corresponding use case in the product documentation. There is also a C++ example called GenICamSmartFrameRecallUsage.cpp which can be read to get a first glimpse. The source code and the documentation of this example can be found in the C++ version of this documentation. The mvIMPACT::acquire::GenICam::CustomCommandGenerator provides functions to request a full resolution version of an image based on a mvIMPACT::acquire::Request object containing an image with reduced resolution passed to it (internally the relevant piece of information is the timestamp of the image to request). To request an image an application can call one of the various versions of the mvIMPACT::acquire::GenICam::CustomCommandGenerator::requestTransmission functions.
To allow the application to distinguish easily between images belonging to the reduced data stream and the ones that have been explicitly requested by the application the mvIMPACT::acquire::Request.chunkmvCustomIdentifier can be used. When requesting a full resolution ROI the application can tag the requested images with a custom identifier. This identifier is later returned in the chunk data of the image. The following example demonstrates how to use this feature:
|
inlineexplicit |
Constructs a new mvIMPACT::acquire::GenICam::CustomCommandGenerator object.
[in] | pDev | A pointer to a mvIMPACT::acquire::Device object obtained from a mvIMPACT::acquire::DeviceManager object. |
[in] | settingName | The name of the driver internal setting to access with this instance. A list of valid setting names can be obtained by a call to mvIMPACT::acquire::FunctionInterface::getAvailableSettings, new settings can be created with the function mvIMPACT::acquire::FunctionInterface::createSetting |
|
inline |
Returns the size of the command buffer for this device in bytes.
|
inline |
Returns the amount of bytes of the command buffer currently used(thus the amount of bytes that await sending) for this device in bytes.
|
inline |
Discards all pending custom commands to the device.
This function will discard all pending custom commands. After calling this function the pending command queue will be empty an can be filled with new commands.
|
inline |
Modifies a value of a certain sequencer set at runtime.
This is a convenience function combining a call to mvIMPACT::acquire::GenICam::CustomCommandGenerator::queueSequencerSetValueModification directly followed by a call to mvIMPACT::acquire::GenICam::CustomCommandGenerator::sendCommandBuffer. Commands which have been queued before and have not yet been sent will be sent as well when calling this function.
sequencerSet | The index of the sequencer set to modify. |
parameter | The parameter within the selected sequencer set to modify. |
value | The new value the selected parameter within the selected sequencer set shall be set to. |
|
inline |
Modifies a value of a certain sequencer set at runtime.
This is a convenience function combining a call to mvIMPACT::acquire::GenICam::CustomCommandGenerator::queueSequencerSetValueModification directly followed by a call to mvIMPACT::acquire::GenICam::CustomCommandGenerator::sendCommandBuffer. Commands which have been queued before and have not yet been sent will be sent as well when calling this function.
sequencerSet | The index of the sequencer set to modify. |
parameter | The parameter within the selected sequencer set to modify. |
value | The new value the selected parameter within the selected sequencer set shall be set to. |
|
inline |
Queues the modification of a value of a certain sequencer set at runtime.
This function queues a single parameter modification of a selected sequencer set. The actual modification will not become effective until mvIMPACT::acquire::GenICam::CustomCommandGenerator::sendCommandBuffer is called. With this function multiple modifications can be sent to a device at once. When the new command does not fit inside the internal command queue any more all pending commands will be sent to the device before the new one is put into the queue.
sequencerSet | The index of the sequencer set to modify. |
parameter | The parameter within the selected sequencer set to modify. |
value | The new value the selected parameter within the selected sequencer set shall be set to. |
|
inline |
Queues the modification of a value of a certain sequencer set at runtime.
This function queues a single parameter modification of a selected sequencer set. The actual modification will not become effective until mvIMPACT::acquire::GenICam::CustomCommandGenerator::sendCommandBuffer is called. With this function multiple modifications can be sent to a device at once. When the new command does not fit inside the internal command queue any more all pending commands will be sent to the device before the new one is put into the queue.
sequencerSet | The index of the sequencer set to modify. |
parameter | The parameter within the selected sequencer set to modify. |
value | The new value the selected parameter within the selected sequencer set shall be set to. |
|
inline |
Request the transmission of an image currently associated with the Request object in a different mode/ROI.
If mvIMPACT::acquire::GenICam::AcquisitionControl::mvSmartFrameRecallEnable is set to mvIMPACT::acquire::bTrue this function can be used to request the transmission of the image currently associated with pRequest
in a different mode/resolution. One use case would be to transmit every image taken by the sensor with a very coarse resolution e.g. by setting the properties mvIMPACT::acquire::GenICam::ImageFormatControl::decimationHorizontal and/or mvIMPACT::acquire::GenICam::ImageFormatControl::decimationVertical to values greater than 1. When then an algorithm finds something interesting within an image this function can be used to request the transmission of the very same image in full resolution for detailed processing.
[in] | pRequest | A pointer to a mvIMPACT::acquire::Request object currently associated with the image that shall be transmitted again. |
[in] | offsetX | The X-offset of the ROI of the image that shall be transmitted within the current image. |
[in] | offsetY | The Y-offset of the ROI of the image that shall be transmitted within the current image. |
[in] | width | The width of the ROI of the image that shall be transmitted within the current image. |
[in] | height | The height of the ROI of the image that shall be transmitted within the current image. |
[in] | mode | The mode in which this image shall be transmitted. |
[in] | identifier | A user defined identifier that shall be attached to the image that will be sent as a result of calling this function. This value will be written into the mvIMPACT::acquire::Request::chunkmvCustomIdentifier property so in order to actually benefit from this parameter the corresponding chunk must be enabled. See mvIMPACT::acquire::GenICam::ChunkDataControl for details. |
|
inline |
Request the transmission of an image currently associated with the Request object in full resolution.
If mvIMPACT::acquire::GenICam::AcquisitionControl::mvSmartFrameRecallEnable is set to mvIMPACT::acquire::bTrue this function can be used to queue the transmission request of the image currently associated with pRequest
in full resolution. One use case would be to transmit every image taken by the sensor with a very coarse resolution e.g. by setting the properties mvIMPACT::acquire::GenICam::ImageFormatControl::decimationHorizontal and/or mvIMPACT::acquire::GenICam::ImageFormatControl::decimationVertical to values greater than 1. When then an algorithm finds something interesting within an image this function can be used to request the transmission of the very same image in full resolution for detailed processing.
The actual transmission request will not be sent to the device until mvIMPACT::acquire::GenICam::CustomCommandGenerator::sendCommandBuffer is called. With this function multiple commands can be sent to a device at once. When the new command does not fit inside the internal command queue any more all pending commands will be sent to the device before the new one is put into the queue.
[in] | pRequest | A pointer to a mvIMPACT::acquire::Request object currently associated with the image that shall be transmitted again. |
[in] | identifier | A user defined identifier that shall be attached to the image that will be sent as a result of calling this function. This value will be written into the mvIMPACT::acquire::Request::chunkmvCustomIdentifier property so in order to actually benefit from this parameter the corresponding chunk must be enabled. See mvIMPACT::acquire::GenICam::ChunkDataControl for details. |
|
inline |
Request the transmission of an image with a certain timestamp in a different mode/ROI.
If mvIMPACT::acquire::GenICam::AcquisitionControl::mvSmartFrameRecallEnable is set to mvIMPACT::acquire::bTrue this function can be used to request the transmission of the image currently associated with pRequest
in a different mode/resolution. One use case would be to transmit every image taken by the sensor with a very coarse resolution e.g. by setting the properties mvIMPACT::acquire::GenICam::ImageFormatControl::decimationHorizontal and/or mvIMPACT::acquire::GenICam::ImageFormatControl::decimationVertical to values greater than 1. When then an algorithm finds something interesting within an image this function can be used to request the transmission of the very same image in full resolution for detailed processing.
[in] | timestamp_us | The timestamp of the mvIMPACT::acquire::Request object shall be transmitted again. |
[in] | offsetX | The X-offset of the ROI of the image that shall be transmitted within the current image. |
[in] | offsetY | The Y-offset of the ROI of the image that shall be transmitted within the current image. |
[in] | width | The width of the ROI of the image that shall be transmitted within the current image. |
[in] | height | The height of the ROI of the image that shall be transmitted within the current image. |
[in] | mode | The mode in which this image shall be transmitted. |
[in] | identifier | A user defined identifier that shall be attached to the image that will be sent as a result of calling this function. This value will be written into the mvIMPACT::acquire::Request::chunkmvCustomIdentifier property so in order to actually benefit from this parameter the corresponding chunk must be enabled. See mvIMPACT::acquire::GenICam::ChunkDataControl for details. |
|
inline |
Request the transmission of an image currently associated with the Request object in a different mode/ROI.
This is a convenience function combining a call to mvIMPACT::acquire::GenICam::CustomCommandGenerator::queueTransmissionRequest directly followed by a call to mvIMPACT::acquire::GenICam::CustomCommandGenerator::sendCommandBuffer. Commands which have been queued before and have not yet been sent will be sent as well when calling this function.
If mvIMPACT::acquire::GenICam::AcquisitionControl::mvSmartFrameRecallEnable is set to mvIMPACT::acquire::bTrue this function can be used to request the transmission of the image currently associated with pRequest
in a different mode/resolution. One use case would be to transmit every image taken by the sensor with a very coarse resolution e.g. by setting the properties mvIMPACT::acquire::GenICam::ImageFormatControl::decimationHorizontal and/or mvIMPACT::acquire::GenICam::ImageFormatControl::decimationVertical to values greater than 1. When then an algorithm finds something interesting within an image this function can be used to request the transmission of the very same image in full resolution for detailed processing.
[in] | pRequest | A pointer to a mvIMPACT::acquire::Request object currently associated with the image that shall be transmitted again. |
[in] | offsetX | The X-offset of the ROI of the image that shall be transmitted within the current image. |
[in] | offsetY | The Y-offset of the ROI of the image that shall be transmitted within the current image. |
[in] | width | The width of the ROI of the image that shall be transmitted within the current image. |
[in] | height | The height of the ROI of the image that shall be transmitted within the current image. |
[in] | mode | The mode in which this image shall be transmitted. |
[in] | identifier | A user defined identifier that shall be attached to the image that will be sent as a result of calling this function. This value will be written into the mvIMPACT::acquire::Request::chunkmvCustomIdentifier property so in order to actually benefit from this parameter the corresponding chunk must be enabled. See mvIMPACT::acquire::GenICam::ChunkDataControl for details. |
|
inline |
Request the transmission of an image currently associated with the Request object in full resolution.
This is a convenience function combining a call to mvIMPACT::acquire::GenICam::CustomCommandGenerator::queueTransmissionRequest directly followed by a call to mvIMPACT::acquire::GenICam::CustomCommandGenerator::sendCommandBuffer. Commands which have been queued before and have not yet been sent will be sent as well when calling this function.
If mvIMPACT::acquire::GenICam::AcquisitionControl::mvSmartFrameRecallEnable is set to mvIMPACT::acquire::bTrue this function can be used to request the transmission of the image currently associated with pRequest
in full resolution. One use case would be to transmit every image taken by the sensor with a very coarse resolution e.g. by setting the properties mvIMPACT::acquire::GenICam::ImageFormatControl::decimationHorizontal and/or mvIMPACT::acquire::GenICam::ImageFormatControl::decimationVertical to values greater than 1. When then an algorithm finds something interesting within an image this function can be used to request the transmission of the very same image in full resolution for detailed processing.
[in] | pRequest | A pointer to a mvIMPACT::acquire::Request object currently associated with the image that shall be transmitted again. |
[in] | identifier | A user defined identifier that shall be attached to the image that will be sent as a result of calling this function. This value will be written into the mvIMPACT::acquire::Request::chunkmvCustomIdentifier property so in order to actually benefit from this parameter the corresponding chunk must be enabled. See mvIMPACT::acquire::GenICam::ChunkDataControl for details. |
|
inline |
Request the transmission of an image with a certain timestamp in a different mode/ROI.
This is a convenience function combining a call to mvIMPACT::acquire::GenICam::CustomCommandGenerator::queueTransmissionRequest directly followed by a call to mvIMPACT::acquire::GenICam::CustomCommandGenerator::sendCommandBuffer. Commands which have been queued before and have not yet been sent will be sent as well when calling this function.
If mvIMPACT::acquire::GenICam::AcquisitionControl::mvSmartFrameRecallEnable is set to mvIMPACT::acquire::bTrue this function can be used to request the transmission of the image currently associated with pRequest
in a different mode/resolution. One use case would be to transmit every image taken by the sensor with a very coarse resolution e.g. by setting the properties mvIMPACT::acquire::GenICam::ImageFormatControl::decimationHorizontal and/or mvIMPACT::acquire::GenICam::ImageFormatControl::decimationVertical to values greater than 1. When then an algorithm finds something interesting within an image this function can be used to request the transmission of the very same image in full resolution for detailed processing.
[in] | timestamp_us | The timestamp of the mvIMPACT::acquire::Request object shall be transmitted again. |
[in] | offsetX | The X-offset of the ROI of the image that shall be transmitted within the current image. |
[in] | offsetY | The Y-offset of the ROI of the image that shall be transmitted within the current image. |
[in] | width | The width of the ROI of the image that shall be transmitted within the current image. |
[in] | height | The height of the ROI of the image that shall be transmitted within the current image. |
[in] | mode | The mode in which this image shall be transmitted. |
[in] | identifier | A user defined identifier that shall be attached to the image that will be sent as a result of calling this function. This value will be written into the mvIMPACT::acquire::Request::chunkmvCustomIdentifier property so in order to actually benefit from this parameter the corresponding chunk must be enabled. See mvIMPACT::acquire::GenICam::ChunkDataControl for details. |
|
inline |
Applies all pending custom commands to the device.
This function will send all pending custom commands to a device. After calling this function the pending command queue will be empty an can be filled with new commands. Calling this function multiple times without queuing new commands after each send will have no effect!