summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-09-05afb-test.sh: launch 2 binders for testflounder_5.99.6flounder/5.99.65.99.6Clément Bénier1-19/+27
one binder for afb-test binding another for signal-composer binding Change-Id: Ie049715775e315eeb4e2d01e178ff55bb68f36e0 Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
2018-08-23Missing API_NAME for the test widgetflounder_5.99.5flounder_5.99.4flounder/5.99.5flounder/5.99.45.99.55.99.4Romain Forlot1-0/+1
Change-Id: I9b4da627485ad16bc4ed925e97b3a8a320dd7238 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-23Fix: segfault at object additionRomain Forlot2-8/+14
JSON object release is done by the appfw so no need to release the object in the request. Tiny typo about the filepath in testsuite. Change-Id: I8347adafbb5fa8e9e3b89c2e6db74c37f4910adf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-23Bump submodulesRomain Forlot3-0/+0
Submodule afb-helpers a37225f..f0ce5b6: > wrap-json: Fix duplicated lines in header file > Add '@' as binder middle name separator. > Enhance 'wrap_json_clone_depth' description Submodule conf.d/app-templates f0b24b0..52ae181: > Fix: typo Submodule ctl-utilities a58d83b..bdf1a6b: > ctl-lua: Fixed memory corruption > Migration to v3 > Adds v3 function to get binding settings > New function returning the binding root directory > Change the default GLOB pattern > Fix wrong computed length > Add path to the installed widget path. > Controller: Converted README to a gitbook version. > New defaults useful functions on lua table > More precise log message when loading a Lua file > Fix: wrong legacy function signature > Split loading JSON controller file. > Release arguments once C function returned. Change-Id: I9d7b7dee7e0e3473734ff869080a4e672ba3f951 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-22Setup the project for afb-test frameworkClément Malléjac19-15/+885
Wrote a couple of basic API tests Setup mock apis for the test binding Added script to launch tests on native Linux machines Change-Id: I606752e7b46cb2afdc10f3319a24ef15675faa3b Signed-off-by: Clément Malléjac <clementmallejac@gmail.com>
2018-08-08Typos, cleaning.flounder_5.99.3flounder/5.99.35.99.3Romain Forlot1-18/+2
Change-Id: I1f2b7484216271f97205cb9933bfd5ef2990bb2e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-07Fix: segfault after adding new objectsRomain Forlot1-1/+0
This let the application framework handle the JSON object lifetime. Change-Id: Iff48f478d71e71e25ed79d2c7c13b45a7b6a7bf9 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-31Returns error in request responseRomain Forlot4-78/+94
Returns error in request response instead of binder log when you try to get a signal value. Change-Id: I12809591801db5718aa4713034f2bb1801b6bf2d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-27Fix: wrong default getSignals action defined.Romain Forlot1-4/+3
Since last controller changes this hardcoded default action definition. Change-Id: I0021fef000b2085efe0deda550cff243afd6711d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-25Improved performanceRomain Forlot9-176/+126
Before value was translated to a C type variable two times, at the reception then at the emission. Now it just receives and sends the signal value without translation nor interpretation except if you ask for an average, minimum or maximum value. Then in those cases it interprets the json to return you a value or an error if there is no numeric values to compute. Remove unneeded log message at event reception. Improved signal search engine, will search in source's signals map by the signal ID not the event name which lead to a more direct map match. Bugs-AGL: SPEC-1612 Depends-On: I43e79ed73a507ac2ca7ed4cdc3f16ec009392194 Change-Id: Ie253c3fe1e8cde42dabe8832da74e9f9bf442c14 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-23Adds a signal's metadata attributeflounder_5.99.2flounder/5.99.25.99.2Romain Forlot5-40/+27
This adds a signal's metadata attribute which lets you store any kind and number of metadata attributes to your signal. These metadata are just reissued at the event emission without alteration. Special case of "unit" attribute which is kept as a signal attribute and not as a metadata because it is an intrinsic signal attribute that all signals should have. Bug-AGL: SPEC-1419 Change-Id: I531b4012ac9b22f312a4ccebc1a07a8d93129403 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-22Fix the build for master with latest binderRomain Forlot11-18/+8
Update config.cmake file with app-templates improvments: - Now versioning is handled by app-templates based on gerrit tags - Binding version set up in config.cmake rather than in code. - Update variables name for build type and install prefix. Submodule afb-helpers 43ec971..a37225f: > Fix: use of GetBindingDirPath without dynapi > Retrieve directory list from environment variables > Remove the file .gitmodules > Remove unnecessary 'AFB_DEBUG' redefinition > Use binding version to handle dynapi > At search, use the prefix parameter as a prefix > Remove deprecated use of cmake/Qt macro > Rename method to avoid conflict with Qt's one Submodule conf.d/app-templates aa68dbd..f94e45e: > Align sample on actual default compile options > Add support to binding version 3. > Warning if not using wgtpkg-pack to make a widget > Rework CMAKE_INSTALL_PREFIX and INSTALL_PREFIX var > Be able to overwrite BUILD_TYPE using CLI > Use CACHE variable for other common CMAKE variable > Fix:: wrong wgt using RELEASE BUILD TYPE > Fix: SYSROOT location detection... Wrong test. > Change the default debug compilation options. > Clearer coverage compilation options configuration Submodule ctl-utilities 1ff524b..ff14c58: > Fix : typo introduced in a previous commit. > Use prefix variable to find controller's plugins > Use binding version to set controller definitions > ctl-lua: typo fix > asynchronism for test: LockWait added > Fix: plugin api assignement order > Execute ConfigExec only if section is existing > Always set the api member even if NULL. > Ability to add a plugin after the initial load > Be able to dispatch required api at the wanted time Depends-On : I135a723d21d70b8c54f4cab1c534210757318ed0 Change-Id: I90938f53dd1f606b3aa39a549e618c0fe413870c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Update submodulesRomain Forlot14-176/+14
Submodule conf.d/app-templates 6e1a3c3..aa68dbd: > Don't overwrite the autobuild script if it exists > Disable the in-tree build method. > Detect Yocto as OS distribution > Fix: wrong compile options added > Fallback using zip format if no wgtpkg-pack found > 02-variables.cmake: Avoid checking CXX version if not required > config.cmake.sample: Remove dependency to libsystemd > config.cmake.sample: Remove dependency to libmicrohttpd > Added -D_FORTIFY_SOURCE=2 to CFLAGS > start-on-target: uses RSYNC_PREFIX path for config > Fixed spelling. > Improve OS detection > Fix: OS detection > Launch from workdir > Change closing that could fix native debugging Submodule ctl-utilities 0129510...1ff524b: > Change LUA package path at LUA interpreter load > Don't load two times a plugin even for LUA > Fixed hidden bound variable (apiHandle) > Fixed null value when push Lua arguments > Adjust to compile with incoming bindings v3 > Remove declaration to not existing functions > Add 2 lua utilities function > Update README.md for new metadata keys. > Fix a compilation issue due to modif of AFB_ReqSuccess > README:md: update README accordingly to new json scheme. > Fixed crash due to call to json_object_put > Fix segfault when printing long message from lua > Fixed spelling of AFB_ReqSuccess > Remove an unnecessary variable > Make parsing of action loading non blocking > Use an external file for app fw functions link > Use macro to test request validity > Fixed build warnings with gcc >= 7.3 > Increase lua script max message size > Prevent lost of config file path when searching > Correct way that api actions are handled in controller > Handle more metadata in the controller. > Add possibility to set prefix to NULL in CtlConfigScan > Fixed compilation warnings with gcc-7.2.0 > Add an external field to CtlConfigT > Make action item from a LUA action mandatory > Handle no prefix given > Good usage of strncat and strncpy > Update to the new JSON syntax > Detect failure at OnLoad action calls > Improve reliability and function calls > Correctly release request JSON object > Add AFB macros > Don't use assert in controller. > Change lua2c JSON syntax. > Search for Event section > Fix: changes key name. > Fix: arguments pointer NULL check > Fix wrong error message. > Simplify action definition > Fix: Dyn API Action loading procedure > Use new version of function GetBindingDirPath > Format > Merge changes from topic 'sandbox/claneys/wip' > Upgrade config schema > Fix: callback execution condition < Format < Fix: callback execution condition < New action loading function. < Upgrade config schema Adapt json config file to new syntax Fix: prefix now add the "-" so it'isn't needed to add it in the prefix at search (signal-composer.cpp) Fix: calling a api verb without json_object fails because of config arguments not retrieved. (sources.cpp) Change-Id: I48c1bca9fbac485e6a34b4645e683d9bdb1cbf2b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Reintoduce the old builtin pluginRomain Forlot4-1/+93
We use only one function of two from the plugin which could be called from the LUA script to be able to set a signal value from a LUA callback. Change-Id: Ic7a0fcd3d8c4c2370828c1d09fff9ed88a0dc15b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Fix: release json_objectRomain Forlot1-1/+4
This ensure that the json_object is correctly released after. Then after that the call will have enough reference count. Also fix a GCC warning using "if" instead of trigraph Change-Id: I41776d9009465f48f6c0b236614c0a32244f5cfb Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Remove useless variable settingRomain Forlot1-1/+1
By default Efence isn't enable. You now have to specifically set it up if you want to use the Efence library Change-Id: I7803636bed08fc248f820df2db64310d96d57d8e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Rework loading sources and signals.Romain Forlot16-103/+89
Some function that are now included in the controller submodule do not need to be in the composer as well. Also initialize sources and signals in the same way . JSON configuration needs to be updated to fit this changes Change-Id: I2043791e7ee80f8350f33ed15bdf9980c0773b82 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Move "action" load to controllerRomain Forlot2-139/+11
Change-Id: Ic1a0621d9c0bbbffb7dcc0f9daf148a372818cdb Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Return separately last timestamp and valueRomain Forlot1-4/+2
Last timestamp and value is those ones directly store as object's attributes not the last from the history. Simple... Change-Id: Id2c808a1b236dfa36821cf9fc5a5bcd6a4114f10 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
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>