summaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-config.h
AgeCommit message (Collapse)AuthorFilesLines
2018-09-14Add 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-09-06Change loading configuration object behaviorflounder_5.99.6flounder/5.99.65.99.6Romain 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-08-20Migration 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-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 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-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-17Use 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-06-27Be able to dispatch required api at the wanted timeflounder_5.99.1flounder/5.99.15.99.1Romain 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-05-28Handle 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-05-18Add 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-05-18Detect 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-05-14FormatRomain Forlot1-19/+19
Change-Id: Ied901f39cd6814e5afd9811248b0a1fb401f3e76 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-05-11Loads 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-05-11Improve 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>
2017-12-18Make public ConfigSearch functionRomain Forlot1-0/+1
Change-Id: I6da8b9d463ef9adc604bc59285189e45dfb63a7a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-14Get back on track l2c functions.Romain Forlot1-0/+5
Change-Id: I8425f0de60a35b4e287c8829fe72cbca80bc55df Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-11-24Correctly export symbols for C++eel_4.99.3eel/4.99.34.99.3Romain Forlot1-2/+7
Change-Id: I87eb6b5cc7208caaabbc3c2f3b6636d600c60370 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-10-26Avoid duplicated _GNU_SOURCE definition warningRomain Forlot1-0/+2
Change-Id: I2b805a60b67db1a72b429093256999673e2c3964 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-10-25FormatingRomain Forlot1-9/+9
Change-Id: I2b805a60b67db1a72b429093256999673e2c3964 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-10-25Add action method to execute an action from its uidRomain Forlot1-0/+1
Change-Id: Ic8f1d418db228ca8c646263b32a2431931a6a4be Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-10-24First working version as submoduleFulup Ar Foll1-2/+2
2017-10-181st V2/pre-V3 versionfulup1-43/+44
2017-09-29Remove NetbeansFulup Ar Foll1-0/+113