summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2018-04-29 20:52:58 +0200
committerFulup Ar Foll <fulup@iot.bzh>2018-04-29 20:52:58 +0200
commitf83d651392b8556248600f2b1360b9306b845c3d (patch)
tree69498e049145fbafaa2e20dcd0b3005f44fb138d /README.md
parente26d497d74bf7e5926a84cf83d61857f27d75753 (diff)
Initial push work in progress
Diffstat (limited to 'README.md')
-rw-r--r--README.md62
1 files changed, 61 insertions, 1 deletions
diff --git a/README.md b/README.md
index 6bb57c0..8be313d 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,61 @@
-# 4a-softmixer \ No newline at end of file
+# Controller Utilities
+
+* Object: Generic Controller Utilities to handle Policy, Small Business Logic, Glue in between components, ...
+* Status: Release Candidate
+* Author: Fulup Ar Foll fulup@iot.bzh
+* Date : October-2017
+
+## Usage
+
+0) Dependencies
+
+* AGL Application Framework
+
+1) Clone & build from source (temporally from github)
+
+```bash
+git clone --recursive https://github.com/iotbzh/4a-softmixer
+cd build
+cmake ..
+make
+```
+
+2) Activate ALSA loop driver
+
+```modprobe snd-aloop enable=1,1 index=4,5 id=loopback,softmix
+```
+
+3) Declare your controller config section in your binding
+
+```C
+// CtlSectionT syntax:
+// key: "section name in config file"
+// loadCB: callback to process section
+// handle: a void* pass to callback when processing section
+static CtlSectionT ctlSections[]= {
+ {.key="plugins" , .loadCB= PluginConfig, .handle= &halCallbacks},
+ {.key="onload" , .loadCB= OnloadConfig},
+ {.key="halmap" , .loadCB= MapConfigLoad},
+ {.key=NULL}
+};
+
+```
+
+3) Do controller config parsing at binding pre-init
+
+```C
+ // check if config file exist
+ const char *dirList= getenv("CTL_CONFIG_PATH");
+ if (!dirList) dirList=CONTROL_CONFIG_PATH;
+
+ ctlConfig = CtlConfigLoad(dirList, ctlSections);
+ if (!ctlConfig) goto OnErrorExit;
+```
+
+4) Exec controller config during binding init
+
+```C
+ int err = CtlConfigExec (ctlConfig);
+```
+
+For sample usage look at https://gerrit.automotivelinux.org/gerrit/gitweb?p=apps/app-controller-submodule.git