summaryrefslogtreecommitdiffstats
path: root/conf.d/project/lua.d
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-08-27 13:32:56 +0200
committerFulup Ar Foll <fulup@iot.bzh>2017-08-27 13:32:56 +0200
commite9b532488dff41b1215a8c92820a55fe6847e2f1 (patch)
treeb2e5950c3172e6b85ff89fe2b92bb55c8daa6314 /conf.d/project/lua.d
parent1951815533e516f4bfeb0749aa6056090371704d (diff)
Readme update for controller
Diffstat (limited to 'conf.d/project/lua.d')
-rw-r--r--conf.d/project/lua.d/README.md33
-rw-r--r--conf.d/project/lua.d/netbeans-aaaa-run-config.pngbin0 -> 163727 bytes
-rw-r--r--conf.d/project/lua.d/onload-aaaa-01-init.lua2
3 files changed, 34 insertions, 1 deletions
diff --git a/conf.d/project/lua.d/README.md b/conf.d/project/lua.d/README.md
new file mode 100644
index 0000000..86b60dd
--- /dev/null
+++ b/conf.d/project/lua.d/README.md
@@ -0,0 +1,33 @@
+WARNING: controller is now independent from AAAA and thus should be imported by your binder before requesting it.
+
+For this your only have to provide the path where to find your controller you are in your development tree probably with something
+like --binding=../../afb-controller/build/ctl-binding/afb-controller.so on the other hand if you controller was installed you
+should import it from where ever you install it.
+
+To run this controller sample from your developpement environement use
+```
+
+export BUILD_DIR=build
+
+# with an internal MPDC (Pusic Player Daemon Client) API
+afb-daemon --port=1234 --workdir=. --roothttp=../htdocs --token= --verbose \
+--alias=/monitoring:$HOME/opt/afb-monitoring \
+--ldpaths=. \
+--alias=/monitoring:/home/fulup/opt/afb-monitoring \
+--binding=../../afb-controller/$BUILD_DIR/package/lib/afb-controller.so \
+--binding=../../afb-mpdc/$BUILD_DIR/package/lib/afb-mpdc-api.so
+
+# with an exernal MPDC API
+afb-daemon --port=1234 --workdir=. --roothttp=../htdocs --token= --verbose \
+--alias=/monitoring:$HOME/opt/afb-monitoring \
+--ldpaths=. \
+--alias=/monitoring:/home/fulup/opt/afb-monitoring \
+--binding=../../afb-controller/$BUILD_DIR/ctl-binding/afb-controller.so \
+--ws-client=unix:/var/tmp/afb-ws/mpdc
+
+# Note:
+ - Both sample make the assumption the monitoring HTML5 app is avaliable at $HOME/opt/afb-monitoring
+ - With second sample you should obviously have your MPDC service exposing its API with --ws-server=unix:/var/tmp/afb-ws/mpdc
+ - Running AAAA from Netbeans ![Sample config](netbeans-aaaa-run-config.png)
+
+```
diff --git a/conf.d/project/lua.d/netbeans-aaaa-run-config.png b/conf.d/project/lua.d/netbeans-aaaa-run-config.png
new file mode 100644
index 0000000..7091a42
--- /dev/null
+++ b/conf.d/project/lua.d/netbeans-aaaa-run-config.png
Binary files differ
diff --git a/conf.d/project/lua.d/onload-aaaa-01-init.lua b/conf.d/project/lua.d/onload-aaaa-01-init.lua
index 8de0c24..5ebc695 100644
--- a/conf.d/project/lua.d/onload-aaaa-01-init.lua
+++ b/conf.d/project/lua.d/onload-aaaa-01-init.lua
@@ -40,7 +40,7 @@ function _Audio_Controller_Init(source, control)
local err,result= AFB:servsync ("alsacore", "hallist", {})
if (err) then
- AFB_ERROR("Fail to retrieve Audio HAL")
+ AFB:error("Fail to retrieve Audio HAL")
else
_Global_Context["registry"]=result["response"]
printf("[<-- Audio_Controller_Init <--] Active HAL=%s", Dump_Table(result["response"]))
er */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Note:
Individual files contain the following tag instead of the full license text.

    SPDX-License-Identifier: MIT

This enables machine processing of license information based on the SPDX
License Identifiers that are here available: http://spdx.org/licenses/