Armed Trigger
Add data to be carried along with images once a GigeVision camera is triggered.
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 90 (default value) 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 string | Mandatory | "test-domain-10ldkd9G" |
metadata string | Dictionary of key value pairs. | 'metadata' = {'spaceflight': {'rocket_ship': "SR98", "Fuel Type": "RP-1"}, "destination": "moon"} |
Responses:
Status Code | Description |
---|---|
200 | Data saved until external trigger is invoked. |
400 | Examples of errors: - domain_unit is missing -an invalid subject in URL (input subject is not associated with a camera capture app) - rate-limited as the previous request was within 30seconds of the current request. |
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)
Updated 8 months ago