summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-07-05Change, clean plugins.Romain Forlot6-150/+93
Improve GPS plugin to be able to calculate the heading also remove the builtin plugin that was an error. We need to pass GPS plugin in C++ to be able to use the context. Handle "double" and "int" signal's value. Change-Id: I6d902e4ac76a0e933326c0b4c43922645c9c5a4c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Change when to notifyRomain Forlot1-1/+0
The notify was in fact called 2 times. It is attended that a callback should "set" the signal value to record it. Setting the signal's value already call notify which an action should do at the end. Notifying has a meaning only if a signal value has been modified. Change-Id: I4a8128317a88bf7459b2c4aa0f575c4b2524e816 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Use Nanosecond precision by defaultRomain Forlot2-12/+21
This is the default precision returned by the kernel when calling get_clocktime(), so this avoid useless division to get a less precise time. Also signaling event should have this kind of precision to be able to correctly debugging system on signals heavy load. Change-Id: I010b98305cff7387787fd8f8a1e8a0f9107a170a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Use a better parameter name, more explicitRomain Forlot1-16/+17
Change-Id: I4c2a31f5c395c0d85ec810b25fb88c70cf691375 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Implement the signal's update default methodRomain Forlot2-5/+47
Adding != operator to Signal class This operator is needed to exclude signal inclusion in notify function and make possible to add a signal at last position Change-Id: I95f3434019383e52928c37f396aae938f2cfae05 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Fix wrong initializationRomain Forlot1-2/+2
boolean and numerical case initialized the same way. Change-Id: I274b5d898761c12f555ea59a178e363efe18f81d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Rename afb-utilities to afb-helpersRomain Forlot4-3/+3
Update submodules Change-Id: I7f3a8e0059ce05e6bf46315d1de80c25cb87b2cf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Improve signal handlingRomain Forlot5-16/+32
- Fix memleak: RRelease the Signal JSON representation once used - Change equality condition between signals - Use a REALTIME clock to retrieve the timestamp if not provided by the signal. This is the most simple to date a signal and use that time for further usage. - Add a method to retrieve the last_timestamp value from a signal This with the commit from ctl-utilities submodule "8ff0fe3c454ea32ba383a3cfa9c4e91237d6c494" fixes the issue. Change-Id: Ifed66796f92d789c80f10b161318f6bef788dda7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Initialize sources at binding start.Romain Forlot3-4/+16
This has changed and is now explicitly launched because last step of Controller configuration doesn't execute it. Change-Id: I104011b912172da62114b62eeab90c76e41459dd Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Use signal subscription args if presentRomain Forlot3-3/+16
By default subscription argument request from signal are passed if present, else the one from the signal's source if present. If nothing is specified for sources then argument is set as a NULL pointer. Change-Id: I18db0a9922039f41d475cd08758a2afd4acaa9d4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Make 2 set of configurationsRomain Forlot14-22/+1618952
1 for normal multi low level sources 1 for TXC-demo Future goal will be to merge them Also reorganize data resources files Bump app-template: Submodule conf.d/app-templates dd0cec7..30e78a5: > Adding cmake file at the root directory > Adds commit hash to the version. > Change default sample settings. Change-Id: I31838723da58fc33b25bc7cd5f42396a1805e34d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-04Merge changes from topic 'OpenXC-signal_composer'Romain Forlot1-0/+5
* changes: Added .gitreview file Add objects directly from JSON argument
2018-07-04Added .gitreview fileRomain Forlot1-0/+5
Change-Id: Id75cd6c02316a0e968fe068521b10c2ea34dd3d2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-04Add objects directly from JSON argumentRomain Forlot1-9/+16
There was only possible to add objects at runtime using another JSON file located somewhere in the filesystem. Now, it is also possible to load directly from a JSON passed in the request. Change-Id: I77ab639593ecb3d73239244d11ee3da599caf1b4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-04-09Add objects directly from JSON argumentflounder_5.99.1flounder/5.99.15.99.1Romain Forlot1-9/+16
Change-Id: I77ab639593ecb3d73239244d11ee3da599caf1b4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-03-22Linting, wrong variable type used.Romain Forlot1-6/+6
Change-Id: Ia3c79b64a44585f7d46e3cda5fbbc59b35322d5f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-03-22Add undefined value possibility in signal valuesRomain Forlot1-5/+6
By default, signal value are initialized to 0 which isn't acceptable to be accurate and be able to calculate virtual signals values as result would be false. Change-Id: I8ec40d8dcb9ce1fae42aeec9fb48369f0914fd9f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-03-22Renaming data directory to var in app-templatesRomain Forlot3-2/+2
Change-Id: Id064fd0f91b5dde72bf1654abce3a8059b8ee191 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-03-21Linting improvments.Romain Forlot4-9/+12
Uninitiliazed variable in submodule Better handling of iterator assigments Avoid multiple call to vector.size() function Change-Id: I9cc8431e71b7d614a1619615a4048f19f5e31540 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-02-07Update documentationRomain Forlot2-19/+11
Change-Id: I878fcf9304f56e4712a733018318b0c7caf7555b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-21Update documentation metadataRomain Forlot4-1/+2
Change-Id: I690c27663b381099fd74a598443208aacc59042d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-21Using AppFw CPP capabilitiesRomain Forlot6-121/+5
Generate headers from afb-genskel with CPP options which generate correctly the header for a CPP project. Change-Id: Ibb64de25ca510a82bc91ba938fc221d9b820e175 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-21Fix some memory leak using LUARomain Forlot1-0/+0
Change-Id: I4871f6a5cf9e838abc40fab8611c342a9039aeb1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-21Don't segfault at exit pointed to freed objectsRomain Forlot2-6/+8
Change-Id: Ic2f8ebee552ce982f858fe6ee93db2508a290617 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-20Don't use afb-genskel until C++ is handledRomain Forlot1-1/+1
Change-Id: I0777e2f4dfbc054c3379ee00e8b62dc3e6254f7c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-20Update closing messageRomain Forlot1-1/+1
Change-Id: Ic99190a45c831547b2ec1a7425a6f7cc38d7ed18 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-20Remove embedded LUA 3rdpartyRomain Forlot7-100/+4
Change-Id: Ied46d7f7784b478c75758d15f018a7ff6d3533c2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-19Bulk of small fixesRomain Forlot4-10/+4
Correctly grab lua script using simpler prefix Correctly free Composer object's members Adding default binding source as required-apis Change-Id: I91d34b636286e79c7bcc27f8ba2730897ec5f424 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-19Update controller submoduleRomain Forlot1-0/+0
Add binding rootdir to searched path for conf and plugins Change-Id: Ifde4f6fb5b5e19d7af4326bd4bd4054ca299f5bf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-19Be sure to set execution right on binariesRomain Forlot1-1/+6
and fix wrong path to binding Change-Id: I188b5664de3374709853cf43eadd4e28e500373a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-19Specify needed permissions for addObjects in docRomain Forlot1-0/+3
Change-Id: I9ed37e688f037a60d51391d881797cd4e8c640ee Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-19Get builtin plugin as a normal pluginRomain Forlot5-49/+16
- Back in normal configuration file - Remove builtin special callback as it is just a plugin after all - Rename main configuration files to get it works on a target board. Change-Id: I69165c47e5e58eb519e727cfdd83ee628d90abba Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-19Update gitignore, minor fixRomain Forlot2-1/+1
Change-Id: I7f059cb6566461a96765be78841d97e9b70beee3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-18Make public ConfigSearch functionRomain Forlot1-0/+0
Change-Id: If8cb4237486333e287190a22b92aeec9c5d09a6d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-18More security to add new signals/source at runtimeRomain Forlot4-34/+61
Also renamed loadConf to addObjects to avoid confusion with loadConf at init time. Improve file research if fullpath not procided by searching in the CONTROL_CONFIG_PATH. Change-Id: I8e541ff7437f0378bcdc7215ff9f391dcce6db9f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-18Update documentationRomain Forlot8-12/+39
Change-Id: I82edfc5111805cf5e2affad1a6366d1144006fbf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-18Fix segfault when no l2c functions definedRomain Forlot1-0/+0
Change-Id: Ie1325c32ed085823835cc2f139dcb452ffdb27a0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-18Fix: absolute non significant path to pluginsRomain Forlot1-2/+2
Now relative to afb-daemon workdir. Change-Id: Ic60c7d332d1e18396b85881683a7ada4bfbf4ca2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-18Several small fixes and improvements.Romain Forlot5-25/+15
Cleaning Make some additionnals test avoiding segfault, Filling opitonnal response object to avoid warning Wrong plugins type register macro called Change-Id: I012cc3ddc5f89b75dbc46c3ea535717141823884 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-15Fix CTL_PLUGIN_MAGIC outside of long int rangeRomain Forlot1-1/+1
Change-Id: Ide4b90ecbc7763d48a3949864f298882acdce57b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-15Get back on track l2c functionsRomain Forlot4-10/+8
Adjust to the new controller behavior lua2c functions calls Change-Id: I52d385101d5205a2dd2c996810feccb1f00c20c7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-14Fixing afb function call from LUA and cleaningRomain Forlot7-158/+26
Change-Id: I36d675ba7c38ce883a021da1a82dfbe8b077a39f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-14Fix warning compile about uninitialized variableRomain Forlot1-0/+0
Change-Id: I15076f9b0a564ed2cd8b1fbce14353add115c215 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-14Dirty trick to avoid failure at buildRomain Forlot1-0/+4
Change-Id: I4b2dc928f8b61e8e25145b88b292795c9fd8eea7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-14Fix wrong timestamp type use to retrieve value.Romain Forlot1-1/+1
Change-Id: I884a7957325a57a97dd562d620e11167f452edf2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-14Update documentationRomain Forlot8-26/+69
Change-Id: Ie7c6fc98b450e0f856378b615ded2a586f02a7ad Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-14Use value instead of pointer for a memberRomain Forlot2-25/+25
no reason to keep it as pointer, and simpler to initiaze it at construction time. Change-Id: I0aee4483c834e66651d80998de81c99799451ff5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-14Improve subscription processRomain Forlot3-15/+47
Unsubscription remove asked signals from client session then when no more signals are requested by the client unsubscribe from event handle. Correctly initialize members to by correctly evaluated after Change-Id: Icabcb5a2446c62cab4eea9bf807613b719324ea0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-14Change remote repository for afb-helpers to gerritRomain Forlot2-3/+3
Change-Id: I712305849487cf21388292df9b261cdbe0917acb Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-14Update all submodulesRomain Forlot3-0/+0
Change-Id: I3d540dd97367109416bd35ff337383178a79d6b4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>