You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: axevent/README.md
+18-8Lines changed: 18 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,11 @@
1
-
*Copyright (C) 2020, Axis Communications AB, Lund, Sweden. All Rights Reserved.*
1
+
*Copyright (C) 2022, Axis Communications AB, Lund, Sweden. All Rights Reserved.*
2
+
3
+
# ACAP applications interacting with event system on an edge device
2
4
3
-
# ACAP3 applications interacting with event system on an edge device
4
5
This README file explains how to use the axevent library, which provides an interface to the event system found in Axis device.
5
6
6
7
The purpose is to provide applications a mechanism to send and receive events.
8
+
7
9
***Producer** - Application sends events.
8
10
***Consumer** - Application subscribe events.
9
11
@@ -13,9 +15,10 @@ The first example will create an application that subscribes to events, which ar
13
15
The second example will create an application that declares and sends an ONVIF event that the application in the third example is subscribed to.
14
16
15
17
A wrapper "get_eventlist.py" is also available for testing the applications. The wrapper supports different ONVIF APIs.
16
-
APIs specification is available on https://www.onvif.org/specs/core/ONVIF-Core-Specification.pdf
18
+
APIs specification is available on <https://www.onvif.org/specs/core/ONVIF-Core-Specification.pdf>
17
19
18
20
## Getting started
21
+
19
22
Below is the structure and scripts of the files and folders on the top level:
20
23
21
24
```bash
@@ -29,11 +32,12 @@ axevent
29
32
30
33
***get_eventlist.py** - Wrapper to find declared and sent events, using ONVIF APIs.
31
34
***README.md** - Step by step instructions on how to use the examples.
32
-
***send_event** - Folder containing files for building ACAP3 application "send_event".
33
-
***subscribe_to_event** - Folder containing files for building ACAP3 application "subscribe_to_event".
34
-
***subscribe_to_events** - Folder containing files for building ACAP3 application "subscribe_to_events".
35
+
***send_event** - Folder containing files for building ACAP application "send_event".
36
+
***subscribe_to_event** - Folder containing files for building ACAP application "subscribe_to_event".
37
+
***subscribe_to_events** - Folder containing files for building ACAP application "subscribe_to_events".
35
38
36
39
### Example applications
40
+
37
41
Each example has as a README file in its directory which shows overview, example directory structure and step-by-step instructions on how to run applications on the device.
38
42
Below is the list of examples available in the repository.
39
43
@@ -45,32 +49,37 @@ Below is the list of examples available in the repository.
45
49
* The example code is written in C which subscribes to different predefined events.
46
50
47
51
### Find events using wrapper
52
+
48
53
> [!IMPORTANT]
49
54
> *The wrapper needs an ONVIF user with password in case wrapper is being used. Browse to the following page (replace <axis_device_ip> with the IP number of your Axis video device)*
>*Goto your device web page above > Click on Add **(+)** sign below the **ONVIF users**in the device GUI > Add >**Username**, **New password** and **Repeat password**> Click **Save** button*
59
+
60
+
*Goto your device web page above > Click on Add **(+)** sign below the **ONVIF users**in the device GUI > Add >**Username**, **New password** and **Repeat password**> Click **Save** button*
55
61
56
62
#### Find declared events using wrapper
63
+
57
64
The wrapper "get_eventlist.py" helps you save the declared eventlist to an XML-file called "onviflist.xml.new".
58
65
59
66
```bash
60
67
./get_eventlist.py getlist -h
61
68
```
62
69
63
70
#### Find sent events using wrapper
71
+
64
72
The wrapper also helps you save the sent eventlist to an XML-file called "sentonviflist.xml.new".
65
73
66
74
```bash
67
75
./get_eventlist.py getsent -h
68
76
```
69
77
70
78
### Find events using GStreamer
79
+
71
80
> [!IMPORTANT]
72
81
> *Install GStreamer on your machine by following the instructions here:
The ONVIF event is being sent with an updated processor usage value every 10th second.
14
15
15
-
Building the application is achieved by using the containerized Axis API and toolchain images.
16
+
Building the application is achieved by using the containerized API and toolchain images.
16
17
17
18
Together with this README file you should be able to find a directory called app.
18
19
That directory contains the "send_event" application source code, which can easily
19
20
be compiled and run with the help of the tools and step by step below.
20
21
21
22
## Getting started
23
+
22
24
These instructions will guide you on how to execute the code. Below is the structure and scripts used in the example:
23
25
24
26
```bash
@@ -32,24 +34,27 @@ send_event
32
34
```
33
35
34
36
***app/LICENSE** - Text file which lists all open source licensed source code distributed with the application.
35
-
***app/Makefile** - Makefile containing the build and link instructions for building the ACAP3 application "send_event".
37
+
***app/Makefile** - Makefile containing the build and link instructions for building the ACAP application "send_event".
36
38
***app/send_event.c** - Application which sends events, written in C.
37
39
***Dockerfile** - Docker file with the specified Axis toolchain and API container to build the example "send_event".
38
40
***README.md** - Step by step instructions on how to run the example.
39
41
40
42
### Limitations
43
+
41
44
* The example is done for the armv7hf architecture, but it is possible to update to aarch64 architecture.
42
45
43
46
### How to run the code
47
+
44
48
Below is the step by step instructions on how to execute the program. So basically starting with the generation of the .eap files to running it on a device:
45
49
46
50
#### Build the application
51
+
47
52
Standing in your working directory run the following commands:
48
53
49
54
> [!IMPORTANT]
50
55
> *Depending on the network you are connected to.
51
-
The file that needs those settings is:*~/.docker/config.json.*
52
-
For reference please see: https://docs.docker.com/network/proxy/ and a
56
+
The file that needs those settings is:*~/.docker/config.json.*For
57
+
reference please see: <https://docs.docker.com/network/proxy/> and a
53
58
[script for Axis device here](../FAQs.md#HowcanIset-upnetworkproxysettingsontheAxisdevice?).*
Copy file name to clipboardExpand all lines: axevent/subscribe_to_event/README.md
+22-12Lines changed: 22 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,17 @@
1
-
*Copyright (C) 2020, Axis Communications AB, Lund, Sweden. All Rights Reserved.*
1
+
*Copyright (C) 2022, Axis Communications AB, Lund, Sweden. All Rights Reserved.*
2
2
3
-
# ACAP3 application subscribing to an ONVIF event on an edge device
4
-
This README file explains how to build an ACAP3 application that uses axevent library for subscribing to an ONVIF event.
3
+
# ACAP application subscribing to an ONVIF event on an edge device
5
4
6
-
It is achieved by using the containerized Axis API and toolchain images.
5
+
This README file explains how to build an ACAP application that uses axevent library for subscribing to an ONVIF event.
6
+
7
+
It is achieved by using the containerized API and toolchain images.
7
8
8
9
Together with this README file you should be able to find a directory called app.
9
10
That directory contains the "subscribe_to_event" application source code, which can easily
10
11
be compiled and run with the help of the tools and step by step below.
11
12
12
13
## Getting started
14
+
13
15
These instructions will guide you on how to execute the code. Below is the structure and scripts used in the example:
14
16
15
17
```bash
@@ -23,24 +25,27 @@ subscribe_to_event
23
25
```
24
26
25
27
***app/LICENSE** - Text file which lists all open source licensed source code distributed with the application.
26
-
***app/Makefile** - Makefile containing the build and link instructions for building the ACAP3 application "subscribe_to_event".
28
+
***app/Makefile** - Makefile containing the build and link instructions for building the ACAP application "subscribe_to_event".
27
29
***app/subscribe_to_event.c** - Application which subscribes for event, written in C.
28
30
***Dockerfile** - Docker file with the specified Axis toolchain and API container to build the example "subscribe_to_event".
29
31
***README.md** - Step by step instructions on how to run the example.
30
32
31
33
### Limitations
34
+
32
35
* The example is done for the armv7hf architecture, but it is possible to update to aarch64 architecture.
33
36
34
37
### How to run the code
38
+
35
39
Below is the step by step instructions on how to execute the program. So basically starting with the generation of the .eap files to running it on a device:
36
40
37
41
#### Build the application
42
+
38
43
Standing in your working directory run the following commands:
39
44
40
45
> [!IMPORTANT]
41
46
> *Depending on the network you are connected to.
42
-
The file that needs those settings is:*~/.docker/config.json.*
43
-
For reference please see: https://docs.docker.com/network/proxy/ and a
47
+
The file that needs those settings is:*~/.docker/config.json.*For
48
+
reference please see: <https://docs.docker.com/network/proxy/> and a
44
49
[script for Axis device here](../FAQs.md#HowcanIset-upnetworkproxysettingsontheAxisdevice?).*
0 commit comments