summaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-plugin.h
AgeCommit message (Collapse)AuthorFilesLines
2018-12-13Add an Init step to the plugins loadRomain Forlot1-0/+1
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-12-13Use prefix variable to find controller's pluginsRomain Forlot1-0/+2
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-13Use an external file for app fw functions linkJonathan Aillet1-120/+1
Use an external file for application framework include, for macro, and for typedef definitions used by the controller. In this way, it will be possible to include this file without getting all the specific controller definitions. Also define the correct version needed by the application framework for dynamic api. Change-Id: Ifaa09538f49ff2739eeb6a75527767961a2ef3b0 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-13Add AFB macrosRomain Forlot1-0/+6
This adds a macro to be able to retrieve the rootdir fd from the binding using V2 or DynAPI version the same way. Change-Id: I4e9e805b729118944f07ccedae6cccc6b950058b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix: Dyn API Action loading procedureRomain Forlot1-2/+2
Change-Id: Ibb7dbc32580100c588d06e283abb57cc37875312 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13FormatRomain Forlot1-8/+0
Change-Id: Ied901f39cd6814e5afd9811248b0a1fb401f3e76 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Loads l2c functions per plugin.Romain Forlot1-4/+14
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-13Upgrade config schemaRomain Forlot1-1/+4
Change the way to load LUA scripts. They are now considerate as Plugin and loads with them. This imply rework of how to search and find plugins as well as the way to load LUA. Also load an harcoded LUA scripts providing LUA helpers and managing global variables lock unlock mechanism Change-Id: I64e38aa27278d0cfdca787155db2d0c89953f905 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Get back on track l2c functions.Romain Forlot1-2/+0
Change-Id: I8425f0de60a35b4e287c8829fe72cbca80bc55df Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Loading additional files from JSON sectionRomain Forlot1-1/+1
Now handle "files" object inside section loading to externalize JSON definition and could split them in several files if needed. "files" could be specified inside a section object, each files will be parsed to found same key than the current section and append content to the existing section's objects Change-Id: I4414684d08c5214cf96b365f9b0a72b13578a6ca Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Correctly export symbols for C++Romain Forlot1-0/+7
Change-Id: I87eb6b5cc7208caaabbc3c2f3b6636d600c60370 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix: C++ list initialization correctly done.Romain Forlot1-1/+1
C++ requires to initialize using the same order than what it is declared. Change-Id: Ic0063e0c0c8b2d5ad28e00e42b8a7e8822399a4b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Avoid duplicated _GNU_SOURCE definition warningRomain Forlot1-0/+3
Change-Id: I2b805a60b67db1a72b429093256999673e2c3964 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13FormatingRomain Forlot1-23/+21
Change-Id: I2b805a60b67db1a72b429093256999673e2c3964 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Replace macro by apiV2 compatible inline functionRomain Forlot1-0/+7
Signature from apiv2 and apiv3 aren't the same so better use an inline function here to be able to return a pointer. Change-Id: I2e811a37337ca1a4f1015a060e147c69370aa63c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix: issue at compile time Forlot Romain [IoT.bzh]1-2/+2
ctl-plugin.h:124:34: error: expected expression before ‘...’ token
2018-12-13First working version as submoduleFulup Ar Foll1-6/+23
2018-12-131st V2/pre-V3 versionfulup1-16/+160
2018-12-13Remove NetbeansFulup Ar Foll1-0/+74