- 04 Jan 2024
- 1 Minute to read
- Print
- DarkLight
Armed Trigger
- Updated on 04 Jan 2024
- 1 Minute to read
- Print
- DarkLight
The Armed Trigger API allows domain and custom data to accompany images captured by GigeVision cameras as they flow through a pipeline. This API can be used only in situations where an external trigger is used to trigger GigeVision cameras.
A camera capture application input subject is required when invoking the API. Consecutive triggers for the subject cannot be sent within 30 seconds of each other.
POST /1/armtrigger/(camera capture input subject)
HOST: http://<gateway ip address or hostname>:8000
A domain unit key-value pair must be present in the JSON encoded data sent in the API.
Argument | Description | Example |
---|---|---|
domain_unit | Mandatory | "test-domain-10ldkd9G" |
metadata | Dictionary of key value pairs. | 'metadata' = {'spaceflight': {'rocket_ship': "SR98", |
Responses:
Status Code | Description |
---|---|
200 | Data saved until external trigger is invoked. |
400 | Examples of errors: |
5xx | Backend server error |
API Usage example
import requests
import json
truck_meta = {“truck_info”: {“companyName” : “Big Ferris-Wheel Parts Inc”,
“loadType": "Wheel Components”,
“driverId”: “JSmith_903838K99”,
“truckType”: “18Wheeler”}}
arm_trigger_data = {
"domain_unit":"truck_BR08373_1383",
"metadata": json.dumps(truck_meta)}
camera_input_subject = 'GigeVision_input_trigger_01'
res = requests.post("http://localip:8000/1/armtrigger/%s" %camera_input_subject, data=arm_trigger_data)
if resp.status 1= 200:
print("Error: %s" % resp.text)