From 1b3411359d6a0e53f12811436a5410104816da34 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 18 Dec 2017 15:20:13 +0100 Subject: Update documentation Change-Id: I82edfc5111805cf5e2affad1a6366d1144006fbf Signed-off-by: Romain Forlot --- docs/README.md | 8 ++++++-- docs/SUMMARY.md | 9 ++++----- docs/cover.jpg | Bin 259959 -> 260017 bytes docs/cover_small.jpg | Bin 13366 -> 13363 bytes docs/part-1/3-Plugins.md | 11 ++++++++++- docs/part-1/4-SignalComposerAPI.md | 16 ++++++++++++++++ 6 files changed, 36 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/README.md b/docs/README.md index 337a14c..5079519 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,7 +1,11 @@ # Introduction -This template is also a documentation that explains how to setup and write -your documentation with gitbook. +You will find in this documentation a presentation about Signal Composer +architecture. Signal Composer is an Application Framework binding meant to +facilitate handling signaling, by compose, divide and create new virtuals +signals from RAW signals coming from _low level_ binding that handle read/write, +encode/decode on different protocols that a car could use (CAN, LIN, Ethernet, +GPS, i2c, ...).

diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 9d0f0a8..369ea6e 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -2,8 +2,7 @@ * [Document revisions](0-Doc-Revisions.md) -* [Signal Composer](part-1/0_Abstract.md) - * [Architecture](part-1/1-Architecture.md) - * [Configuration](part-1/2-Configuration.md) - * [Plugin](part-1/3-Plugins.md) - * [Signal Composer API](part-1/4-SignalComposerAPI.md) +* [Architecture](part-1/1-Architecture.md) +* [Configuration](part-1/2-Configuration.md) +* [Plugin](part-1/3-Plugins.md) +* [Signal Composer API](part-1/4-SignalComposerAPI.md) diff --git a/docs/cover.jpg b/docs/cover.jpg index ea03df1..954e32c 100644 Binary files a/docs/cover.jpg and b/docs/cover.jpg differ diff --git a/docs/cover_small.jpg b/docs/cover_small.jpg index 5fcb1de..4278b7e 100644 Binary files a/docs/cover_small.jpg and b/docs/cover_small.jpg differ diff --git a/docs/part-1/3-Plugins.md b/docs/part-1/3-Plugins.md index cbc7284..50ece7b 100644 --- a/docs/part-1/3-Plugins.md +++ b/docs/part-1/3-Plugins.md @@ -1,6 +1,15 @@ # Plugins -Plugins are C/C++ shared library that is loaded by the binding to execute some +Plugins are C/C++ shared library loaded by the binding to execute some simple routine. Routine could be on reception of a new signal or at sources initialization time or signal subscription with the respective JSON field **onReceived**, **init** and **getSignals**. + +A default plugin (builtin) is provided with 2 functions: + +- **defaultOnReceived**: set and record a new signal value and its timestamp + in the signal composer service. It simply tooks the incoming event JSON object + and search for *key* **value** and **timestamp** then call function + `setSignalValue`. +- **setSignalValueWrap**: a **lua2c** function the could be called from any LUA + script to record a new signal value. diff --git a/docs/part-1/4-SignalComposerAPI.md b/docs/part-1/4-SignalComposerAPI.md index dc47f01..246b62f 100644 --- a/docs/part-1/4-SignalComposerAPI.md +++ b/docs/part-1/4-SignalComposerAPI.md @@ -19,6 +19,22 @@ ON-EVENT signal-composer/257b343e-8ea9-4cd7-8f9e-1904fa77f8f2({"event":"signal-c Unsubscribe happens the same way. When no more signals are holded by the client then it unsubscribe from the *AGL Application Framework* event handle. +## addObjects + +Let you add sources or signals objects to the signal composer service after +its initialization phase. Use this verb and specify the file as argument, you +could use only the file name or the file name with its absolute path. + +```json +signal-composer addObjects {"file": "sig_doors.json"} +ON-REPLY 1:signal-composer/addObjects: {"jtype":"afb-reply","request":{"status":"success","uuid":"00d7a519-816e-486a-8163-3afb1face4fa"}} +signal-composer addObjects {"file": "/tmp/sig_doors.json"} +ON-REPLY 2:signal-composer/addObjects: {"jtype":"afb-reply","request":{"status":"success"}} +``` + +You can follow the activity using the service log journal and check that the +correct number of objects has been added. + ## get You can get a signal value be requesting the API with the verb *get*: -- cgit 1.2.3-korg