Basler Vision Connector Messaging: Getting the Application Status#
Info
To receive recipe results via MQTT, use the DataTopic prefixed with the MQTT root topic ({mqttRoot}/), which you configured in the application settings.
The default value for {mqttRoot} is BaslerVisionConnector.
Therefore, you must always prefix {mqttRoot}/ to the value of the recipe object's DataTopic.
JSON Payload#
| Field | Optional | Type | Description |
|---|---|---|---|
| TransactionID | Yes | String | Transaction identification |
| Action | No | String | Method called. Fixed value: GetStatus |
Response Object#
| Field | Optional | Type | Description |
|---|---|---|---|
| TransactionID | Yes | String | Transaction identification |
| ReturnCode | No | Integer (32-bit unsigned) | Message code following Message Codes |
| Message | No | String | Response message |
| ApplicationName | Yes | String | Connector application name |
| ApplicationVersion | No | String | Connector application version |
| SpecificationVersion | No | String | Specification version of the Basler Vision Connector |
| DeviceList | No | Array of camera object | Array of the camera objects |
| cstm_RecipeList | No | Array of recipe object | Array of recipe objects |
| cstm_ProtocolStateList | No | List of key-value pairs of strings | List of communication protocols and their current states as key-value pairs of strings. The key is the protocol, while the value is the current state of this protocol. Valid protocols are: - MQTT - ZMQReqRep - ZMQPubSub Valid states are: - Disabled - Disconnected - Ready |
Camera Object#
| Field | Optional | Type | Description |
|---|---|---|---|
| DeviceID | No | String | Current camera identification |
| StreamingTopic | No | String | Topic where the camera streams images |
| Status | No | String | Camera status. Possible values: Connected, Streaming, Error |
| cstm_FrameCount | Yes | Integer | If the camera is streaming (i.e. the status field is Streaming), then this field contains the number of frames that have been specified when streaming was started. If no frame count was specified when streaming was started or if the camera isn't streaming, then this field isn't visible. |
| SerialNumber | Yes | String | Camera identification |
| UserDefinedName | Yes | String | User-defined camera name |
| ModelName | No | String | Camera model |
| VendorName | No | String | Camera vendor |
| Interface | No | String | Camera interface. Possible values: U3V (USB3 Vision), CXP (CoaXPress), GEV (GigEVision), CamEmu (Emulation) |
| IPAddress | Yes | String | Camera IP address |
| MACAddress | Yes | String | Camera MAC address |
| {additional identification fields} | Yes | String | Additional device identification offered by the Basler Vision Connector |
{
"TransactionID": "46543214635244",
"ReturnCode": 0,
"Message": "Success.",
"ApplicationName": "Demo Vision Connector",
"ApplicationVersion": "1.0.1",
"SpecificationVersion": "1.1.0",
"DeviceList":
[
{
"DeviceID": "548451887",
"StreamingTopic": "device/548451887/stream",
"Status": "Streaming",
"SerialNumber": "548451887",
"UserDefinedName": "MyCam1",
"ModelName": "Camera Model 1234",
"VendorName": "The camera Factory",
"Interface": "GEV",
"IPAddress": "192.168.0.1",
"MACAddress": "00:1A:2B:3C:4D:5E"
}
]
}
Recipe Object#
| Field | Optional | Type | Description |
|---|---|---|---|
| RecipeID | No | String | Current recipe identification |
| FileName | No | String | File name of the recipe |
| FileSize | No | Integer | File size of the recipe (in bytes) |
| DataTopic | No | String | Topic where the recipe streams data using the Recipe Payload Format |
| PinConnections | Yes | List of key-value pairs of strings | The recipe pin connections as list of key-value pairs of strings. The key is the user defined pin ID chosen in the recipe (see also Naming of Input Pins), while the value is a device ID of an open device or null the pin isn't connected. |
| VToolList | No | Array of vTool object | A list of information about the vTools contained in the recipe |
| HasError | No | Boolean | Value to indicate if the recipe is in an error state or not. In case of an error see the logging. An error can for example happen if a license of a vTools expires. |
vTool Object#
| Field | Optional | Type | Description |
|---|---|---|---|
| Name | No | String | Name of the vTool (chosen by the user when creating the recipe) |
| TypeID | No | String | UUID of the type of the vTool |
| TypeDisplayName | No | String | Display name of the type of the vTool |
{
"TransactionID": "46543214635244",
"ReturnCode": 0,
"Message": "Success.",
"ApplicationName": "Basler Vision Connector",
"ApplicationVersion": "1.0.5",
"SpecificationVersion": "1.1.0",
"DeviceList": [
{
"DeviceID": "MyDeviceID",
"StreamingTopic": "device/MyDeviceID/stream",
"cstm_ImageTopic": "device/MyDeviceID/cstm_images",
"Status": "Streaming",
"cstm_FrameCount": 23,
"SerialNumber": "548451887",
"UserDefinedName": "MyCam1",
"ModelName": "Camera Model 1234",
"VendorName": "Basler",
"Interface": "GEV",
"IPAddress": "192.168.0.1",
"MACAddress": "00:1A:2B:3C:4D:5E"
}
],
"cstm_RecipeList": [
{
"RecipeID": "MyRecipe",
"FileName": "ImageFormatConverter.precipe",
"FileSize": 3092,
"DataTopic": "cstm_recipe/MyRecipe/data",
"PinConnections": {
"MyPinID": "MyDeviceID"
},
"VToolList": [
{
"Name": "MyConverter",
"TypeID": "4049EA56-3827-4FAF-9478-C3BA02E4A0CB",
"TypeDisplayName": "Image Format Converter"
}
],
"HasError": false
}
],
"cstm_ProtocolStateList": {
"MQTT": "Disconnected",
"ZMQReqRep": "Disabled",
"ZMQPubSub": "Ready"
}
}