CVMockTL is a simulated GenTL producer that provides an interface, devices and streams without relying on any physical hardware.
In the GenICam Browser, the CVMockTL can be enabled via View-> Show / hide TLs....
In order to detect the CVMockTL in code, the IncludeMockTL flag has to be set, programmatically. For more information see the Device Discovery Documentation.
The CVMockTL can be configured either through the GenICam Browser or via a user-created configuration file, CVMockTL.json. This file can 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. You need to create it yourself, using the example below (or a similar configuration):
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. | ✅ |
Inside each device object:
| 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 | ✅ |
Inside each stream object:
| 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: