summaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-config.h
AgeCommit message (Collapse)AuthorFilesLines
2018-12-13Retrieve plugin list from api rather than a globalRomain Forlot1-2/+1
Change-Id: Iba7c564eea48495c76de8ca919725a2e4b332fd6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Add setter/getter for user free defined pointerRomain Forlot1-1/+4
Change-Id: I617f758890c3508f55d568b0e5c57c8c5d4d5dd1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Add ctlPlugins array to the ctlConfig structureRomain Forlot1-0/+2
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-12-13Change loading configuration object behaviorRomain Forlot1-0/+1
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-12-13Migration to v3Romain Forlot1-3/+0
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-12-13Fix: 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-12-13Split loading JSON controller file.Romain Forlot1-1/+2
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-12-13Fix : typo introduced in a previous commit.Romain Forlot1-1/+1
Wrong function signature. Change-Id: I20794a0ae59fc54c08f0960544185e7ba42b2627 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Use prefix variable to find controller's pluginsRomain Forlot1-20/+23
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-12-13Be able to dispatch required api at the wanted timeRomain Forlot1-0/+1
Separate the require api step from ConfigExec and if called from anywhere but CtlConfigExec function, take care that not already initialized or that the previous has failed, so this is a new try. Change-Id: Ic98ef09487f7f58c1b1cb6c417eba261a5a81b13 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Handle more metadata in the controller.Jonathan Aillet1-2/+4
Add fields that will be searched for during controller metadata section parsing. These fields are optional, so they will be copied in CtlConfigT if they are present. Otherwise, no error will be raised. The added fields are : - 'author' which should contain the author name of the configuration file. - 'date' which should contain the date of the configuration file last modification. Change-Id: Iab480533d85c4a52ea5f6a70fb6f9b8d0b866af4 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-13Add an external field to CtlConfigTJonathan Aillet1-0/+1
Add an external field to CtlConfigT to store external data (by casting to void *). Change-Id: I368319f4cde6dc0409b5672809cc19a08e43dd67 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-13Detect failure at OnLoad action callsRomain Forlot1-1/+1
Be able to detect that an action has failed on an Onload section processing to avoid retrieving a wrong context after that. Change-Id: If694b11eb0a37154b539c421e43bebdb15d498c0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13FormatRomain Forlot1-19/+19
Change-Id: Ied901f39cd6814e5afd9811248b0a1fb401f3e76 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Loads l2c functions per plugin.Romain Forlot1-12/+5
L2C functions are prefixed with either the chosen prefix or plugin uid by default. Change-Id: Id296ec629c803ab06cd05f5278fed3c48cbcf10e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Improve way to loading an actionRomain Forlot1-0/+4
Split and cleaner function that load from JSON object an object CtlActionT that could be used by the controller. Also use a new syntax that reduce the number of JSON fields to parse based on a URI syntax. Change-Id: Iabc447368ca56e3a4279fb728ba2f546e11c961b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Make public ConfigSearch functionRomain Forlot1-0/+1
Change-Id: I6da8b9d463ef9adc604bc59285189e45dfb63a7a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Get back on track l2c functions.Romain Forlot1-0/+5
Change-Id: I8425f0de60a35b4e287c8829fe72cbca80bc55df Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Correctly export symbols for C++Romain Forlot1-2/+7
Change-Id: I87eb6b5cc7208caaabbc3c2f3b6636d600c60370 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Avoid duplicated _GNU_SOURCE definition warningRomain Forlot1-0/+2
Change-Id: I2b805a60b67db1a72b429093256999673e2c3964 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13FormatingRomain Forlot1-9/+9
Change-Id: I2b805a60b67db1a72b429093256999673e2c3964 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Add action method to execute an action from its uidRomain Forlot1-0/+1
Change-Id: Ic8f1d418db228ca8c646263b32a2431931a6a4be Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13First working version as submoduleFulup Ar Foll1-2/+2
2018-12-131st V2/pre-V3 versionfulup1-43/+44
2018-12-13Remove NetbeansFulup Ar Foll1-0/+113