023426967a329f33eda942f6cbeb33e92654c1b9
[AGL/documentation.git] / docs / 3_Developer_Guides / 5_Controller_Guides / 3.6.1_Installation.md
1 ---
2 edit_link: ''
3 title: Installation
4 origin_url: >-
5   https://git.automotivelinux.org/src/libappcontroller/plain/docs/controller.md?h=master
6 ---
7
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/libappcontroller-guides-devguides-book.yml -->
9
10 # Controller
11
12 * Object: Generic Controller to handle Policy,Small Business Logic, Glue in between components, ...
13 * Status: Release Candidate
14 * Author: Fulup Ar Foll fulup@iot.bzh
15 * Date  : May-2018
16 * Require : af-binder version >= FF (handle only bindings v3)
17
18 ## Features
19
20 * Create a controller application from a JSON config file
21 * Each control (eg: navigation, multimedia, ...) is a suite of actions. When all actions succeed
22  control is granted, if one fails control access is denied.
23 * Actions can either be:
24   * Invocation of an other binding API, either internal or external (eg: a policy service, Alsa UCM, ...)
25   * C routines from a user provided plugin (eg: policy routine, proprietary code, ...)
26   * Lua script function. Lua provides access to every AGL appfw functionality and can be extended by
27    plugins written in C.
28
29 ## Installation
30
31 * Controller can easily be included as a separate library in any AGL service or application binder.
32 * Dependencies: the only dependencies are [AGL application framework](https://gerrit.automotivelinux.org/gerrit/p/src/app-framework-binder.git)
33  and [libafb-helpers](https://gerrit.automotivelinux.org/gerrit/p/src/libafb-helpers.git).
34 * Controller relies on Lua-5.3, when not needed Lua might be removed at compilation time.
35
36 The controller library is integrated by default in the AGL SDK since the Guppy
37 version (>=7) and is also available as a package for the AGL supported linux
38 distributions.
39
40 You could find the SDK build from Yocto which embed the afb-helpers library
41 here:
42
43 * For [releases](https://download.automotivelinux.org/AGL/release/) >= Guppy, in
44  the latest machine's deploy directory. (e.g for Guppy in
45  `latest/<yourmachine>/deploy/sdk` directory)
46 * For the [master](https://download.automotivelinux.org/AGL/snapshots/master/)
47  development branch, in the latest machine's deploy directory. (e.g in
48  `latest/<yourmachine>/deploy/sdk` directory)
49
50 To install the native package please refer to [this chapter](../1-verify-build-host.html)
51 in the AGL documentation to install the AGL repository for your distribution.
52
53 Then use your package manager to install the library.
54
55 ### OpenSuse
56
57 ```bash
58 sudo zypper ref
59 sudo zypper install agl-libappcontroller-devel
60 ```
61
62 ### Fedora
63
64 ```bash
65 sudo dnf ref
66 sudo dnf install agl-libappcontroller-devel
67 ```
68
69 ### Ubuntu/Debian
70
71 ```bash
72 sudo apt-get update
73 sudo apt-get install agl-libappcontroller-dev
74 ```
75
76 ## Monitoring
77
78 * The default test HTML page expect the monitoring HTML page to be accessible under /monitoring with
79  the --monitoring option.
80 * The monitoring HTML pages are installed with the app framework binder in a subdirectory called
81  monitoring.
82 * You can add other HTML pages with the alias options e.g:
83  afb-daemon --port=1234 --monitoring --alias=/path1/to/htmlpages:/path2/to/htmlpages --ldpaths=. --workdir=. --roothttp=../htdocs
84 * The monitoring is accessible at http://localhost:1234/monitoring.