aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-02-11Update .gitreview fileicefish_9.0.4icefish_9.0.3icefish_9.0.2icefish_9.0.1icefish_9.0.0icefish/9.0.4icefish/9.0.3icefish/9.0.2icefish/9.0.1icefish/9.0.09.0.49.0.39.0.29.0.19.0.0icefishJan-Simon Möller1-0/+1
This updates the gitreview file in the project . Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org> Change-Id: I1718a8417493ee1e2cb6a198d2428cfe9776fb09
2019-01-16ctl-action: fixed the calculation of the number of actionsicefish_8.99.5icefish_8.99.4icefish_8.99.3icefish_8.99.2icefish_8.99.1icefish/8.99.5icefish/8.99.4icefish/8.99.3icefish/8.99.2icefish/8.99.1halibut_8.0.6halibut_8.0.5halibut_8.0.4halibut_8.0.3halibut_8.0.2halibut_8.0.1halibut_8.0.0halibut_7.99.3halibut_7.99.2halibut_7.99.1halibut_7.90.0halibut/8.0.6halibut/8.0.5halibut/8.0.4halibut/8.0.3halibut/8.0.2halibut/8.0.1halibut/8.0.0halibut/7.99.3halibut/7.99.2halibut/7.99.1halibut/7.90.0guppy_6.99.4guppy/6.99.48.99.58.99.48.99.38.99.28.99.18.0.68.0.58.0.48.0.38.0.28.0.18.0.07.99.37.99.27.99.17.90.06.99.4halibutThierry Bultel1-4/+7
When adding actions to a section, the number of existing actions was badly calculated, leading to access to uninitialized memory when walking through the list later, because there was a missing null action at the end. Change-Id: I18390463cbe94d1c8788add33f99814404c59760 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-01-04Message deprecating the submodule usageRomain Forlot1-0/+3
Latest commit to the submodule which encourage the developpers to use the separate library. Bug-AGL: SPEC-1689 Change-Id: Ieb1ba776917194e163df57e7b83d45139e1f3134 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-20docs: add yaml bookguppy_6.99.3guppy/6.99.36.99.3Frederic Marec1-0/+19
Bug-AGL: SPEC-1988 Change-Id: Id8abac2bd1559b5e02a2f69a0ced200fe7eff9b5 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2018-12-14Reformating lines to be 80 characters long maximumRomain Forlot2-98/+163
Change-Id: I82089520073f4d6eee72f702af52743c38afbbeb Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-14Detail configuration key and goal of a controllerRomain Forlot2-11/+26
This update brings more detailled JSON object key description and try to improve what is the main goal of a controller. Change-Id: I2a4a7a3c6bf17c8e12f4bb56c8cba0d2ec048154 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-10memleak fixesRomain Forlot2-3/+4
Change-Id: I575d87bf0770f24f2c7ddd6fba9b7917aad62c6d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-05Retrieve by default an int64 instead of intRomain Forlot1-1/+1
This avoids to cast to int an int64, used by example to retrieve a nanosecond timestamp variable. Change-Id: I4337f37009059f19b8ad6a910c76e844493d22f3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-05New function to retrieve Api's name from LUARomain Forlot1-0/+15
Change-Id: I1678dced50f1cdaf3f2a3c9caff4aa5afa0c5b49 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-05Handle number and boolean to subcall an api's verbRomain Forlot1-8/+7
An improvment was made to handle string for synchronous subcalls and now it handles also number and boolean for both sync and async subcalls. Change-Id: Iafaf9d01b8abd83423b1809a9e0e5433d44d6ded Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-11-30Fix: compiling a controller without LUA supportguppy_6.99.2guppy/6.99.26.99.2Romain Forlot2-0/+6
Bug-AGL: SPEC-1979 Change-Id: I92c22136a7e6bca6557a306824f7dc8c0ae2bf47 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-11-30Fix Parse pluginFrederic Marec1-1/+2
Fix PluginParse in ctlplugin to handle json_object case Change-Id: Iaeacaaef3dc09ca28229e16aed992003aa3b02cf Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2018-11-22AFB:servsync: add string for query argumentguppy_6.99.1guppy/6.99.16.99.1Clément Bénier1-2/+7
for query argument add string that will be converted to json object Change-Id: I75b669a6c02838fd31017b82e9093966f3eea0e6 Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
2018-10-31Reworked pluginConfig functionRomain Forlot1-55/+38
Reorganize the code to factorize some parts in pluginParse instead of pluginConfig. Also check the validity of the ctlConfig retrieved variable from the api Change-Id: I640adb7021c262b00f8f4284df9c07dd663fd9f3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-31Retrieve plugin list from api rather than a globalRomain Forlot5-13/+9
Change-Id: Iba7c564eea48495c76de8ca919725a2e4b332fd6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-31Add setter/getter for user free defined pointerRomain Forlot3-2/+18
Change-Id: I617f758890c3508f55d568b0e5c57c8c5d4d5dd1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-30Pass the plugin to action.Romain Forlot2-0/+2
Pass the plugin to action using source structure. Plugin pointer is now accessible from anywhere in the plugin callbacks. Clean deprecated function. Change-Id: Idf50728af0b3573a45c4731d4343cf67741b662c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-05Abort if one required API is missingRomain Forlot1-1/+2
AFB returns a missing API as a warning and doesn't abort the process. It is a binding duty to know if it should exit or not. Here a missing API is considerate as an error and abort the binder. Change-Id: Id11bcc34fd5fa8fd8a9a5cbd70d6d3340190dc1d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-09-20Correct an error when no plugins are definedguppy_6.90.0guppy/6.90.06.90.0Jonathan Aillet1-1/+1
Correct an error when 'PluginConfig' function is called while no plugins are defined in passed json. Change-Id: I281a18f601f8ca1b7dfedfe48d1de37f4e9eded4 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-09-20Decrease print level when no onload actionJonathan Aillet1-1/+1
Decrease print level when 'OnloadConfig' function is called while no onload action are defined in passed json. Change-Id: I173cb9b6824f7f32cf33a6755ed52f9dcf093ee6 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-09-18Add a 'params' fields for controller pluginsJonathan Aillet2-3/+5
Add a 'params' fields for controller plugins. Can be used to send specific parameters to plugins functions (onload, init, ...). Change-Id: Ifb16f06a20453ef2bd1bc8a72bc2841dc12e323c Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-09-18Call wasn't done correctly in 'CtlConfigExec'Jonathan Aillet1-1/+1
Call wasn't done correctly in 'CtlConfigExec', some functions were not call by 'CtlConfigExec' when it should be ... Change-Id: I5ce44e616042868c349bd5637c56267b8eff72e1 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-09-14Add ctlPlugins array to the ctlConfig structureRomain Forlot3-2/+10
This lets you add new actions to a section from a plugin, typically at its init step. Change-Id: I33a61c6162d25332d680d8a0e2d1841a457e0e80 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-09-14Add an Init step to the plugins loadRomain Forlot2-1/+11
The onload step could be considered as a preinit step. Init stage happens once all plugins are loaded and so you can refer to them to add new actions or configuration elements. Change-Id: I7986265bb1227208d0648bb2c56a1172b164faf1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-09-06Change loading configuration object behaviorflounder_5.99.6flounder/5.99.65.99.6Romain Forlot5-22/+59
This changes the default behavior when loading actions. Now, it appends the new actions to the old ones instead of replacing them when called several times. If there were no actions previously loaded then it just loads normally the actions. Change-Id: Ica58a3edf4a9bf18ae31c6b6a5fa329e7ec5478b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-30app-controller-submodule doc: Changed doc to fit new format.flounder_5.99.5flounder/5.99.55.99.5CorentinLGS10-971/+1
-Split book.json in 2. -Deleted unwanted files. Change-Id: I52033ecb3d2361e27284865a5685333afc153beb Signed-off-by: CorentinLGS <corentinlgs@gmail.com>
2018-08-24Fix: compatibility with binder FF.RC4flounder_5.99.4flounder/5.99.45.99.4Romain Forlot1-2/+6
binder FF.RC4 provides the missing define afb_service_call[_sync]_legacy which doesn't fit with define in the controller as the first argument API is already given by the app framework binder. Change-Id: Ia2d01b172386d96354d356e66817b166985fa646 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-23Fix: Wrong variable definitionRomain Forlot1-1/+1
Variable is already defined earlier with all function scope. Redefining here make the variable value wrong at the ending return statement. Change-Id: I85269d1f60a7e1b844d19dd902149fa25da50844 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-22ctl-lua: Fixed memory corruptionThierry Bultel1-5/+6
fixed a malloc random crash when loading the configuration files. A write of one byte was done outside of an allocated area. Namely, strncat always writes n+1 bytes, thus a best practice is to always calculate n as this: buffer_size-strlen(s)-1 Change-Id: Icb568f324d466fc6eef40c3e251ce6b8a7006d95 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-08-20Migration to v3Romain Forlot6-33/+119
This makes controller fully compatible with binding v3 and also keeps the compatibility with the Pre-V3 + DYNAPI bindings. Change-Id: Iaa47e51b9cb964bbe2f050784fca355c780673f8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-08Adds v3 function to get binding settingsflounder_5.99.3flounder/5.99.35.99.3Romain Forlot2-1/+9
Adds v3 function to get binding settings waiting the real migration of the controller to v3 Change-Id: Iece3fcbcb81de807927765097c964e3272165947 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-08New function returning the binding root directoryRomain Forlot1-0/+15
Change-Id: If4d8416c87c668ebc55d3866ccd038c652317b43 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-08Change the default GLOB patternRomain Forlot1-2/+3
Change the default GLOB pattern because the lua should be found in var directory by default. Change-Id: I8be0e85c97459553e1d6a9f58efa394eb311a514 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-08Fix wrong computed lengthRomain Forlot1-2/+2
Change-Id: I020a1619c94a3a22d66e6657f64d4cedda3a1e62 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-08Add path to the installed widget path.Romain Forlot1-8/+24
This resolves the link to the binding library then set the directory path to the widget installation location. Change-Id: Iaad0d8aad6e3b8bfdcdedde19fb7906adf5f9610 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-08Controller: Converted README to a gitbook version.CorentinLGS17-417/+1431
-Split the README into a gitbook documentation. Change-Id: Iacf94e94d15606d68c925885dac5233d828f29b7 Signed-off-by: CorentinLGS <corentinlgs@gmail.com>
2018-07-30New defaults useful functions on lua tableRomain Forlot1-0/+21
Add a function that returns the size of a table as the operator '#' isn't considered are safe or accurate. Add another function to deep copy a table. Change-Id: Ia549315e305dd7d02b975a3e8a1278c4ab709eec Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-27More precise log message when loading a Lua fileRomain Forlot3-12/+15
This will indicates what is the error at the LUA file loading Change-Id: I258bf43a2200577998e05cf7b2253bdd510a468e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-26Fix: wrong legacy function signatureRomain Forlot1-1/+1
Old function had not the third argument. Change-Id: Ifdcf341c0339aff80f9a6741f63ae0e7f8fae682 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-25Split loading JSON controller file.Romain Forlot2-15/+18
This make possible to load from a binding either a file or directly a JSON object. Change-Id: If3f3edb8aaed066922982250dd162d483a7dc47a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-23Release arguments once C function returned.Romain Forlot1-1/+2
There was a leack after poping arguments from Lua interpreter. Now when a Lua2C function is called, if there is something to keep from the argument then you should call json_object_get() on it to preserve it. Change-Id: I43e79ed73a507ac2ca7ed4cdc3f16ec009392194 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-23Fix : typo introduced in a previous commit.flounder_5.99.2flounder/5.99.25.99.2Romain Forlot1-1/+1
Wrong function signature. Change-Id: I20794a0ae59fc54c08f0960544185e7ba42b2627 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-23Fixed character counting that was shortening paths8000ff1-2/+2
Change-Id: I16e2f87980229b08426060ec062615d2fa3c1494 Signed-off-by: 8000ff <clementmallejac@gmail.com>
2018-07-20Keep json unmodified during action executionJonathan Aillet1-7/+12
Keep passed json object unmodified during action execution. Before, the action arguments were added in the json passed (so, the json was modified, even for its provider). Now, if action arguments need to be added to the json to execute an action, 'ActionExecOne' function clone the passed json object, add action arguments into it, and use it to call the action. Change-Id: If102cc943326c17aad52cfde735362a72ad35a9a Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-07-17Use prefix variable to find controller's pluginsRomain Forlot7-61/+70
Prefix is the most reliable variable to find files or variables for a controller, so this lets you access it wherever it is needed without using global hardcoded variables. This helps to search for controller's plugins in several locations depending on environment variables and hardcoded variables (CONTROL_PLUGIN_PATH, CONTROL_CONFIG_PATH). This implies also a change a LUA interpreter loading step to correctly set the package.path variables with the environment variables, too. Correct the missing 'extern' in function declarations. Depends-On: Ic448ff017e6158bec05895d63688b8968b5c6434 Change-Id: I0ad19242612559d1f4b66b6f9af9e7032d4675a8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Use binding version to set controller definitionsJonathan Aillet1-5/+2
Use binding version to set controller definitions. It is cleaner to define binding version directly into repository cmake than into a header like before this commit. Change-Id: Ie0f2812c8ac980e69ff901fb6e347f47f284f21b Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-07-10ctl-lua: typo fixClément Bénier1-43/+43
change LUA_FIST_ARG into LUA_FIRST_ARG Change-Id: Ie084e78f68dd0a29c4dfc8387200be9af5180647 Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
2018-07-10asynchronism for test: LockWait addedClément Bénier3-8/+40
added LockWait to wait for incoming events, as soon as an event is received, the wait is unlocked You can indicate the timeout Change-Id: If29ca754618edb5b9fdc32c1c40b47016c6fc88a Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
2018-07-09Fix: plugin api assignement orderRomain Forlot1-2/+1
There was an issue because the assignement happens after the onLoad call. Change-Id: I97dc65ad2a14a6e72bb2f59bc443d9fc5779abee Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-05Execute ConfigExec only if section is existingRomain Forlot1-1/+1
Test again if the section is present in the configuration JSON object before executing the callback. Change-Id: Ibad352e8443d5d33d7e727fc3b80c56a377c75d3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>