How to make a custom trigger (condition) in my acap application? Like in Axis Video Motion Detector #62
-
The problem is that I want to make a custom trigger (or condition) which a user will be able to use in order to create events which they want to use. For example, I have a detector (acap application), if it's alarmed, the event which the user has created should be triggered. And, as I see, it may be possible for this event to be any kind. I just want to trigger it in the acap application side, and then, for example, event sends a snapshot via http or maybe create a text overlay, it doesn't matter what it will do. That's why it's important that a user should have an opportunity to set up this event (or not). My application is in c++, I used acap-3 sdk (3.5). My device is axis M1135 on 10.11.65 firmware. P.s. I saw in the acap documentation, that some Axis applications produce their custom triggers, that's why I think that it may be possible and for other developers. I'm attaching screenshot from video from this docs. There's a group of conditions "Applications" which seems to be "custom". P.p.s. I thought that I suppose to use axevent, but it can be helpful if I want send or subscribe specific event, while I need only condition. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @AlexeyKozlovsky. We have an ACAP version 3 example here. Please take a look and see if it's applicable to your problem. |
Beta Was this translation helpful? Give feedback.
First one need to use the right name spae.
The namespace tns1 is defined by Onvif and tnxaxis is defined by Axis.
About the events name spaces and topics please see that link.
https://www.axis.com/techsup/developer_doc/acap3/3.5/api/axevent/html/axevent_8h.html
From that link, here are some explanation :
All events are expressed as a set of key/value pairs, where the key should be assigned to a namespace. For example, the event describing that the first I/O port is active is described by the following key/value pairs.
tns1:topic0=Device
tnsaxis:topic1=IO
tnsaxis:topic2=Port
port=0
state=1
Where
tns1: is a name space.
topic0: is a key.
Device: is a value.
So in this example you have event …