summaryrefslogtreecommitdiffstats
path: root/4a-hal/4a-hal-manager/4a-hal-manager-cb.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-24Reorganize repository directoriesJonathan Aillet1-273/+0
Reorganize repository directories to clarify code use. BUG-AGL: SPEC-2329 Change-Id: Ia9be0c1818cb2e331e75b51a87fcb2820407c1d8 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-05-24Clarify internals hal functions and files namesJonathan Aillet1-16/+19
The purpose of this commit is to have of a more standard way to name files and functions used to generate/handle hal api (generated from hal json configuration file). It occurred to me that 'hal-controller' was not a good name because it is harder for people who don't know about the app-controller to understanded what is the purpose of these files/functions. It was renamed to 'internal-hal' because it's about hal that are all handle/load by hal-manager in opposition of external-hal that are independant binding/binder that can register themselves to hal-manager. BUG-AGL: SPEC-2329 Change-Id: I11b7efe64ec474b004a2a15ed8969b9db95d428f Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-05-22Clarify use of linked listJonathan Aillet1-4/+5
Clarify use of linked list by renaming some variables and functions. BUG-AGL: SPEC-2329 Change-Id: I21ada0b2914c99dfeecfcb6b55c8976dee1a0cd7 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-04-19Remove unused 4a-hal-manager events handler filesJonathan Aillet1-1/+0
Remove unused 4a-hal-manager events handler files. BUG-AGL: SPEC-2329 Change-Id: Ic0d02e93641f3ae9ec6ba2e7134987770987b1ca Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-04-19Rename misnamed var name in hal manager load funcJonathan Aillet1-3/+3
Rename misnamed variable name in hal manager load function. BUG-AGL: SPEC-2329 Change-Id: I47922c3df935ad0f59eb62ac9d521e076893b0fb Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-01-28Move from controller functions to afb functionsJonathan Aillet1-57/+49
Move from controller 'afb-definitions.h' functions to application framework 'afb/afb-binding.h' functions. Change-Id: I4cd62af881ef8ac949b082ede9dfcc4736d1e12c Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-01-28Turn '4a-hal-utilities' into an internal libraryJonathan Aillet1-1/+1
That way, includes will be cleaner and '4a-hal-utilities' functions will be usable in plugin. Change-Id: I8a2146bd4e5dd5ef449b9ba7f2b1eed4d59045d3 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-11-02Use ctl defines to call afb functionsJonathan Aillet1-6/+6
Use controller 'afb-defintions.h' defines to call application framework functions. Change-Id: If9599b0397a593440ce2e08f039dc279c63f7428 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Remove unnecessary 'function' string in printsJonathan Aillet1-4/+4
Function's names was printed using '__func__' when calling application framework prints functions. But, as the application framework prints functions already prints them, '__func__' has been removed from print calls to avoid duplicated information. Change-Id: I0dea49a9d84b7ccdbdaecec67ced6c98b5ed26d6 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Remove unnecessary 'struct' before json_objectJonathan Aillet1-2/+2
Remove unnecessary 'struct' before json_object. Change-Id: Id5106c87780ebbf1eff8bd3754d59e1184e37216 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Simplify ping verb call print outputJonathan Aillet1-1/+1
Simplify ping verb call print output to avoid any issues in relation with app-framework binder version. Change-Id: I538498c98c458e67e8d98d455def12935c16f830 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Update version of conf.d/app-templates submodule.Jonathan Aillet1-3/+3
Changes of conf.d/app-templates: (291aa4e - Romain Forlot) Change the default debug compilation options. (22a2cbf - Romain Forlot) Clearer coverage compilation options configuration (aa68dbd - Romain Forlot) Don't overwrite the autobuild script if it exists (a13e7b9 - Romain Forlot) Disable the in-tree build method. (51026d2 - Romain Forlot) Detect Yocto as OS distribution (1f2944e - Romain Forlot) Fix: wrong compile options added (92646f6 - Romain Forlot) Fallback using zip format if no wgtpkg-pack found (f65761c - José Bollo) 02-variables.cmake: Avoid checking CXX version if not required (3965d37 - José Bollo) config.cmake.sample: Remove dependency to libsystemd (a45ae0c - José Bollo) config.cmake.sample: Remove dependency to libmicrohttpd (9b17efe - Thierry Bultel) Added -D_FORTIFY_SOURCE=2 to CFLAGS (66f7bc8 - Thierry Bultel) start-on-target: uses RSYNC_PREFIX path for config (e400fb3 - Sebastien Douheret) Fixed spelling. Also, corrects warnings that appeared with this bump. Change-Id: Iec94bb4f49a6ce2b6cdb32154dc47ef7a31c614c Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Update version of app-controller submodule.Loïc Collignon1-6/+2
Changes of app-controller: (0f3063b - Romain Forlot) Be able to dispatch required api at the wanted time (1ff524b - Romain Forlot) Change LUA package path at LUA interpreter load (738ae54 - Romain Forlot) Don't load two times a plugin even for LUA (c04f029 - Sebastien Douheret) Fixed hidden bound variable (apiHandle) (cfe3919 - Sebastien Douheret) Fixed null value when push Lua arguments (69c0585 - José Bollo) Adjust to compile with incoming bindings v3 (d7e260c - José Bollo) Remove declaration to not existing functions (8ac6625 - Romain Forlot) Add 2 lua utilities function (d3504bb - Jonathan Aillet) Update README.md for new metadata keys. Change-Id: Iee42482b7a6834977497c27fe634cee9a5f96e0c Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2018-10-08Improve hal list response from hal-managerJonathan Aillet1-42/+35
Improve 'loaded' verb response from hal-manager by only sending back the hal with the 'READY' status. Also add two boolean options to this verb call : - 'verbose' option to get all information of the hal. - 'all' option to get all hal and not just the 'READY' ones. Change-Id: I23d3d8ab75b429b2938249d10adbb67073eff259 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Remove boolean libraryJonathan Aillet1-4/+3
As it was almost never used in code, remove boolean library. Change-Id: I9264ffd5600a7d9526f4f4cfa8209a0cd0e5bb77 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Correct a failed request warning messageJonathan Aillet1-1/+1
Correct a failed request warning message. Change-Id: Iefdf1cb29af55dc1f4ea098ede032c33fb3b4138 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Auithorize sending empty json to verbsJonathan Aillet1-9/+9
Auithorize sending empty json to hal-manager 'loaded 'verb and to hal 'info' verb. Change-Id: Id664b0335ad80f88392dd24cd910016deaad25e3 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Change paramters in functions handling hal dataJonathan Aillet1-4/+4
Change paramters in functions handling hal data structure. Now, the only thing you need to add/search for/remove something in hal data structure list is the address of the first element of the list instead of the address of the whole hal manager data structure. Change-Id: Iafa7428735c3aa418a6ef6564f9acde8f44e7dfe Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Add device id when hal metadata are askedJonathan Aillet1-7/+18
Add device id to response when hal metadata are asked (with verb 'loaded'). Also handle this metadata when an external hal is registered (verb 'loaded'). Change-Id: I25fafce13c8a215ed5991cfee2a399d8d6631c47 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Define ping function as a definitive functionJonathan Aillet1-5/+1
Define ping function as a definitive function. Change-Id: I6c4351d2c829b7e6d89c6e47a0421c872a90e4d4 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Update request success macro used in codeJonathan Aillet1-7/+7
Update request success macro used in code to correct compilation error. Change-Id: I0cb9c07b27000935b01aaaa17d5656f05d4e21ff Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Set external hal status to ready at loading.Jonathan Aillet1-1/+2
Set external hal status to ready at loading, its a temporary measure to handle external hal for now. Change-Id: I248d2b1288af601681f5567f34037ecc8e06c6aa Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Change the field name use to store card pathJonathan Aillet1-4/+4
Change the field name use to store card path into controller hal data structure. Change-Id: I4413a4e5550f3122055db4c6184907d8be407ceb Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Change some comments to add TBD thingsJonathan Aillet1-12/+12
- Change some comments from TODO to TDB. - Remove 'JAI' from warning messages. Change-Id: Ib2c39d4e0f0ca34929237ab8ca3d66c9c0d269d0 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Include afb-definitions when using application frameworkJonathan Aillet1-44/+44
Include <afb-definitions.h> from 'app-controller' instead of <afb/afb-binding.h> and use its definitions. It allows to migrate from an application framework version to another with less impact on the code. Change-Id: I22359cd3fe22145b3d6c551f227be2ba7e1b65d5 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Correct date in .c and .h filesJonathan Aillet1-1/+1
Set file creation date to 2018 instead of 2016. Change-Id: I0349bbc1dde097f899d9b38dd28b3891f88020ad Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Implementation of functions for external halJonathan Aillet1-6/+116
Implementation of functions that allows to handle register/unregister external hal. Change-Id: Idf7ad2ab7dd811195a9c86d3fc194086746e99ef Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Handle if some hal info are not availableJonathan Aillet1-5/+6
Handle the case if some hal info are not available when the data of all registered hal are requested. Change-Id: Ia55fcc9ff6e964fe23965cf92bb06533c3d11695 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Use json_object* instead of struct json_object*Jonathan Aillet1-2/+2
In code, use json_object* instead of struct json_object*. Change-Id: I9b37f30807331b6f85dc7f36242d5c1206093565 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Regroup declaration of variables in functionsJonathan Aillet1-7/+5
Regroup declaration of variables in 'HalMgrLoaded' function. Add error info when responding that the request have failed. Change-Id: Ib25159f37928bd8cc442e9db08b280e93b6b568b Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Change how to request all loaded api infoJonathan Aillet1-18/+6
Instead of receiving all info about api by passing request arg : { "option" : "metadata" } api info will be obtained by passing this request arg : { "verbose" : 1 } Change-Id: I26a14d61ffefbb7f4630f4a3199ee5238008263a Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Change names of some structures fieldsJonathan Aillet1-3/+3
Change names of some structures fields to match the fileds name in controller structure. Change-Id: I579ec53835daa010154982539d09d5a2dcbd28b2 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Pre-version of 4a-hal-managerJonathan Aillet1-0/+185
Pre-version of 4a-hal manager that uses app-fwk DynAPI and app-controller. Current version : - Declare a new API for each HAL (each .json config file is used to generate one app-controller API) at startup. - Define verbs that will be provided by this API. - Provide verb to list and get info of loaded API. Change-Id: I7bb6e8b7539b1acd5556fd9275a1b536e129332d Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>