CVMockTL is a simulated GenTL producer that provides an interface, devices and streams without relying on any physical hardware.
The CVMockTL can be discovered and opened like any other device. The only thing required is the usage of the IncludeMockTL
flag when programatically discovering devices, otherwise the CVMockTL will not be found.
For more information see the Device Discovery Documentation.
The CVMockTL can be configured via a CVMockTL.json
file.
This file can either be placed locally (residing in the working directory of the application that should use the CVMockTL) or globally (residing in *%cvbdata%\Drivers*).
The CVMockTL.json
placed locally will take priority over the global one.
By default no CVMockTL.json
file is deployed when installing CVB. A default file will be created when first opening the CVMockTL. The user has to take care of adapting the CVMockTL.json
file.
This is how a default CVMockTL.json
file looks like:
It defines a single interface, with a single device having four different streams. If Width
and Height
are not set, the stream will assume a default value of 1920x1080. If PixelFormat
is not set, Mono8 will be assumed.
Furthermore the following other pixel formats are supported:
Key | Type | Description | Mandatory |
---|---|---|---|
Devices | Array | A list of available devices. Each entry describes one device. | ✅ |
Key | Type | Description | Mandatory |
---|---|---|---|
ID | String | Unique identifier for the device | ✅ |
SerialNumber | String | Serial number of the device | ❌ |
UserName | String | User-defined name for the device | ❌ |
Model | String | Model name of the device | ❌ |
Version | String | Firmware or hardware version of the device | ❌ |
Streams | Array | List of available data streams for the device | ✅ |
Key | Type | Description | Mandatory |
---|---|---|---|
ID | String | Unique identifier for the stream. | ✅ |
Width | Integer | Width of the image stream in pixels | ❌ |
Height | Integer | Height of the image stream in pixels | ❌ |
PixelFormat | String | Format of pixel data (e.g., Mono8 , Mono16 , RGB8 , RGB10 ) | ❌ |
ImageDirectoryPath | String | Filesystem path to a directory containing images to stream | ❌ |
ImageOrder | Array[String] | Ordered list of image file paths to load from disk | ❌ |
To stream image files from disk when using the CVMockTL you can use the ImageDirectoryPath
property. A relative path is interpreted based on the current working directory.
When using the ImageDirectoryPath
property, the Width
, Height
and PixelFormat
properties are ignored.
To specify a list of image file paths, the ImageOrder
key is used. The value describes a list of image files to load in the specified order. If a client wants to load:
in that order, he should write the configuration file as follows:
The following things need to be considered when streaming images from disk: