Impact Acquire SDK .NET
|
Contains convenience functions to control features understood by a devices custom command interpreter. More...
Public Member Functions | |
CustomCommandGenerator (Device device) | |
Constructs a new mv.impact.acquire.GenICam.CustomCommandGenerator object. | |
CustomCommandGenerator (Device device, String settingName) | |
Constructs a new mv.impact.acquire.GenICam.CustomCommandGenerator object. | |
void | discardCommandBuffer () |
Discards all pending custom commands to the device. | |
int | modifySequencerSetValue (Int64 sequencerSet, TSequencerSetParameter parameter, double value) |
Modifies a value of a certain sequencer set at runtime. | |
int | modifySequencerSetValue (Int64 sequencerSet, TSequencerSetParameter parameter, Int64 value) |
Modifies a value of a certain sequencer set at runtime. | |
int | queueSequencerSetValueModification (Int64 sequencerSet, TSequencerSetParameter parameter, double value) |
Queues the modification of a value of a certain sequencer set at runtime. | |
int | queueSequencerSetValueModification (Int64 sequencerSet, TSequencerSetParameter parameter, Int64 value) |
Queues the modification of a value of a certain sequencer set at runtime. | |
int | queueTransmissionRequest (Int64 timestamp_us, int offsetX, int offsetY, int width, int height, TRequestTransmissionMode mode, uint identifier) |
Request the transmission of an image with a certain timestamp in a different mode/ROI. | |
int | queueTransmissionRequest (Request pRequest) |
Queues the transmission request of an image currently associated with the Request object in a different mode/ROI. | |
int | queueTransmissionRequest (Request pRequest, int offsetX, int offsetY, int width, int height, TRequestTransmissionMode mode) |
Queues the transmission request of an image currently associated with the Request object in a different mode/ROI. | |
int | queueTransmissionRequest (Request pRequest, int offsetX, int offsetY, int width, int height, TRequestTransmissionMode mode, uint identifier) |
Request the transmission of an image currently associated with the Request object in a different mode/ROI. | |
int | queueTransmissionRequest (Request pRequest, uint identifier) |
Queues the transmission request of an image currently associated with the Request object in a different mode/ROI. | |
int | requestTransmission (Int64 timestamp_us, int offsetX, int offsetY, int width, int height, TRequestTransmissionMode mode, uint identifier) |
Request the transmission of an image with a certain timestamp in a different mode/ROI. | |
int | requestTransmission (Request pRequest) |
Request the transmission of an image currently associated with the Request object in a different mode/ROI. | |
int | requestTransmission (Request pRequest, int offsetX, int offsetY, int width, int height, TRequestTransmissionMode mode) |
Request the transmission of an image currently associated with the Request object in a different mode/ROI. | |
int | requestTransmission (Request pRequest, int offsetX, int offsetY, int width, int height, TRequestTransmissionMode mode, uint identifier) |
Request the transmission of an image currently associated with the Request object in a different mode/ROI. | |
int | requestTransmission (Request pRequest, uint identifier) |
Request the transmission of an image currently associated with the Request object in a different mode/ROI. | |
int | sendCommandBuffer () |
Applies all pending custom commands to the device. | |
Properties | |
uint | commandBufferSize [get] |
Returns the size of the command buffer for this device in bytes. | |
uint | commandBufferSizeUsed [get] |
Returns the amount of bytes of the command buffer currently used(thus the amount of bytes that await sending) for this device in bytes. | |
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 mv.impact.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 mv.impact.acquire.GenICam.CustomCommandGenerator.queueSequencerSetValueModification and mv.impact.acquire.GenICam.CustomCommandGenerator.sendCommandBuffer directly afterwards is equivalent to call mv.impact.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. A .NET example written in C# is available that demonstrates Smart Frame Recall
feature. The example is called SmartFrameRecall an can be found in the examples section of this documentation. The source code is shipped as part of this SDK. It however is rather complex as it makes use of WindowsForms as well. Therefore there is also a C++ example GenICamSmartFrameRecallUsage 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 mv.impact.acquire.GenICam.CustomCommandGenerator provides functions to request a full resolution version of an image based on a mv.impact.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 mv.impact.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 mv.impact.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:
|
inline |
Constructs a new mv.impact.acquire.GenICam.CustomCommandGenerator object.
[in] | device | A pointer to a mv.impact.acquire.Device object obtained from a mv.impact.acquire.DeviceManager object. |
|
inline |
Constructs a new mv.impact.acquire.GenICam.CustomCommandGenerator object.
[in] | device | A pointer to a mv.impact.acquire.Device object obtained from a mv.impact.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 mv.impact.acquire.FunctionInterface.availableSettings, new settings can be created with the function mv.impact.acquire.FunctionInterface.createSetting |
|
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 mv.impact.acquire.GenICam.CustomCommandGenerator.queueSequencerSetValueModification directly followed by a call to mv.impact.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 mv.impact.acquire.GenICam.CustomCommandGenerator.queueSequencerSetValueModification directly followed by a call to mv.impact.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 mv.impact.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 mv.impact.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 with a certain timestamp in a different mode/ROI.
This is a convenience function combining a call to mv.impact.acquire.GenICam.CustomCommandGenerator.queueTransmissionRequest directly followed by a call to mv.impact.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 mv.impact.acquire.GenICam.AcquisitionControl.mvSmartFrameRecallEnable is set to mv.impact.acquire.TBoolean.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 mv.impact.acquire.GenICam.ImageFormatControl.decimationHorizontal and/or mv.impact.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 mv.impact.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 mv.impact.acquire.Request.chunkmvCustomIdentifier property so in order to actually benefit from this parameter the corresponding chunk must be enabled. See mv.impact.acquire.GenICam.ChunkDataControl for details. |
Queues the transmission request of an image currently associated with the Request object in a different mode/ROI.
[in] | pRequest | A pointer to a mv.impact.acquire.Request object currently associated with the image that shall be transmitted again. |
|
inline |
Queues the transmission request of an image currently associated with the Request object in a different mode/ROI.
If mv.impact.acquire.GenICam.AcquisitionControl.mvSmartFrameRecallEnable is set to mv.impact.acquire.TBoolean.bTrue this function can be used to queue the transmission request 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 mv.impact.acquire.GenICam.ImageFormatControl.decimationHorizontal and/or mv.impact.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 mv.impact.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. |
|
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 mv.impact.acquire.GenICam.CustomCommandGenerator.queueTransmissionRequest directly followed by a call to mv.impact.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 mv.impact.acquire.GenICam.AcquisitionControl.mvSmartFrameRecallEnable is set to mv.impact.acquire.TBoolean.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 mv.impact.acquire.GenICam.ImageFormatControl.decimationHorizontal and/or mv.impact.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 mv.impact.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 mv.impact.acquire.Request.chunkmvCustomIdentifier property so in order to actually benefit from this parameter the corresponding chunk must be enabled. See mv.impact.acquire.GenICam.ChunkDataControl for details. |
Queues the transmission request of an image currently associated with the Request object in a different mode/ROI.
[in] | pRequest | A pointer to a mv.impact.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 mv.impact.acquire.Request.chunkmvCustomIdentifier property so in order to actually benefit from this parameter the corresponding chunk must be enabled. See mv.impact.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 mv.impact.acquire.GenICam.CustomCommandGenerator.queueTransmissionRequest directly followed by a call to mv.impact.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 mv.impact.acquire.GenICam.AcquisitionControl.mvSmartFrameRecallEnable is set to mv.impact.acquire.TBoolean.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 mv.impact.acquire.GenICam.ImageFormatControl.decimationHorizontal and/or mv.impact.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 mv.impact.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 mv.impact.acquire.Request.chunkmvCustomIdentifier property so in order to actually benefit from this parameter the corresponding chunk must be enabled. See mv.impact.acquire.GenICam.ChunkDataControl for details. |
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 mv.impact.acquire.GenICam.CustomCommandGenerator.queueTransmissionRequest directly followed by a call to mv.impact.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.
[in] | pRequest | A pointer to a mv.impact.acquire.Request object currently associated with the image that shall be transmitted again. |
|
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 mv.impact.acquire.GenICam.CustomCommandGenerator.queueTransmissionRequest directly followed by a call to mv.impact.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 mv.impact.acquire.GenICam.AcquisitionControl.mvSmartFrameRecallEnable is set to mv.impact.acquire.TBoolean.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 mv.impact.acquire.GenICam.ImageFormatControl.decimationHorizontal and/or mv.impact.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 mv.impact.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. |
|
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 mv.impact.acquire.GenICam.CustomCommandGenerator.queueTransmissionRequest directly followed by a call to mv.impact.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 mv.impact.acquire.GenICam.AcquisitionControl.mvSmartFrameRecallEnable is set to mv.impact.acquire.TBoolean.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 mv.impact.acquire.GenICam.ImageFormatControl.decimationHorizontal and/or mv.impact.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 mv.impact.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 mv.impact.acquire.Request.chunkmvCustomIdentifier property so in order to actually benefit from this parameter the corresponding chunk must be enabled. See mv.impact.acquire.GenICam.ChunkDataControl for details. |
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 mv.impact.acquire.GenICam.CustomCommandGenerator.queueTransmissionRequest directly followed by a call to mv.impact.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.
[in] | pRequest | A pointer to a mv.impact.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 mv.impact.acquire.Request.chunkmvCustomIdentifier property so in order to actually benefit from this parameter the corresponding chunk must be enabled. See mv.impact.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!
|
get |
Returns the size of the command buffer for this device in bytes.
|
get |
Returns the amount of bytes of the command buffer currently used(thus the amount of bytes that await sending) for this device in bytes.