summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-12-14Filter tests improvementsRomain Forlot4-1028/+529
- Unsubscribe using the tear down feature instead of invoking it inside a test which could not be called if a previous assertion failed. - Always use the same event so make the 'api' and 'evt' variables at file scope. - Asserting the bash script's return launcher execution Change-Id: I6be151d07f890aef053a5ada06216aac7941c165 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-14Cleaning the code for now unused functionsRomain Forlot12-176/+23
Also formating and retabulating some comments Change-Id: I95eda93e78fabeb336ca02e94307364954ab2318 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-14CAN FD implementationRomain Forlot13-233/+187
Add a flag to CAN message definitions which set the message as using FD protocol if true. Use a new generated file with the new FD flag field on the message definitions. Change BCM socket "struct" using an union to store the CAN frames either using the FD struct or the classic non FD struct. A BCM socket can only one frame type once configured. Use as much as possible the "struct canfd_frame" in the binding and only make a difference before writing or reading the socket. From a memory point of view both struct are identical and only the last member differ and could hold more data with messages of 64 bytes long. So the canfd_frame is compatible with the can_frame and can be differentiated by a flag set in the can_id member. Remove now unused code processing can_frame. Keep the diagnostic manager using the classic CAN frame. Set the maximum number of frames that a BCM socket can handle to 257. Bug-AGL: SPEC-1980 Change-Id: Ifcc041281ea6745fc25cbd384743761f4446f489 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-11-22Adds more tests about writing on CAN busguppy_6.99.2guppy_6.99.1guppy/6.99.2guppy/6.99.16.99.26.99.1Romain Forlot2-2/+13
This commit adds comprehensive tests about writing messages on CAN bus. Increase timeout to use in native test to be able to complete the test suite. Bug-AGL: SPEC-1965 Change-Id: Ica555dbac1038bb50e5f76c516c1198a78475a9e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-11-22Rework writing CAN message on CAN buses.Romain Forlot1-79/+64
- Adds the possibility to use a custom encoder function - Use of wrap_json functions instead of raw json-c functions - Return the error informations in the request return. - Reduce conditionnal imbrication Bug-AGL: SPEC-1965 Change-Id: I766b3cf3e6998d03a8a2f3e51117e8b26fc9b56f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-11-22Use newly generated cpp file with default encodersRomain Forlot7-1/+7
Change-Id: I7bf15568a16e0c84c4f590ca07eba48ecd34157f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-11-22Handle several can_frame in a BCM messageRomain Forlot2-31/+2
Also clean an unused function Change-Id: I4faabf5a1af53da898ee70f2bc4b528acea3ded3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-11-22Adds a new function to build from a json_object.Romain Forlot2-0/+27
Build an openxc_DynamicField from a json_object. Change-Id: I57033daca5fd4f198b872f015255893d9f8f9303 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-11-22Adjust "encoder" signature to fit cpp usageRomain Forlot1-2/+2
Adjust "encoder" signature to fit cpp usage like for the decoder functions. Change-Id: I5872c5e32fd69356124fefbc82fd1f77ab8acbf4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-11-22Code format and style changesRomain Forlot2-7/+7
Change-Id: Icfb7cdb53deba8d82b91f884c6b815adf0f17adf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-11-20Update gitignoreRomain Forlot1-1/+1
Change-Id: Iacc55ff5e0b9723897db190db3e5cd73cab8e7b9 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-11-20Added afb-helpers submoduleRomain Forlot3-2/+6
Use the afb helpers lib to be able to use wrap_json functions. Change-Id: I3a66ac4eb7d80ff921de13a7e749311d33f0572e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-11-09Change .gitmodules following submodule migrationFrederic Marec1-3/+0
Remove app-template in .gitmodules Remove .gitmodules Change-Id: I41808c8135cfb24baaaaba526781fc149fd918fe Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2018-10-31Migrate app-templates to CMake moduleRomain Forlot2-4/+7
Bug-AGL SPEC-1682 Change-Id: I9f8e4f8bb2c7a020e41215022d2528ea9c26afe1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Migration to binding v3Romain Forlot11-58/+54
Change-Id: I0bcccb15200064bd7d83edbf06c1e7202069189a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Updated app-templates submoduleRomain Forlot1-0/+0
Submodule conf.d/app-templates f0b24b0..0f25ab2: > Adding warning message to migrate on CMake module > common.cmake: fixed erroneous search path for os-release > Fix: missing gcov symbol in compiled binaries > app-templates doc: Changed doc to fit new format. > Update Docs > Fix: typo Change-Id: Ie81d583faf3b703d773dadc82f2fe88453951c2d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-12Change the project nameRomain Forlot2-1/+1
Change the project name to be consistent with other AGL services project. Change-Id: I2dbd53f59673217c8796bc23c208ed55c1b1716f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-09Use feature 'required-binding'Jose Bollo1-1/+1
The feature "urn:AGL:widget:required-binding" is now preferred to the feature "urn:AGL:widget:required-api" for requiring a local binding. Bug-AGL: SPEC-1800 Change-Id: I67508e271b184de362597eeaf20d86bdb17fbd9a Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-09-25Use the unified script to launch testsRomain Forlot2-37/+2
This use the dedicated script to launch tests on native development environment and get rid of the dedicated script afb-test.sh. Change-Id: Iaefa95bfd9c842da5ef87bd1adba87d5241a3d8c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-09-20doc: Changed doc to new formatguppy_6.90.0guppy/6.90.06.90.0Sebastien Douheret13-987/+1
- split book.json to match new format - changed description in README.md - remove useless files Change-Id: Ie41edb058cf7cfc4920c5c84767097c4e46d34cb Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-09-12Reach fixture files in all cases.Romain Forlot2-6/+5
Depending if you are executing tests on a board or natively with one or more binders you have to reliably be able to reach your fixtures files. Using the bindingRootDir you always point to the right directory and know exactly where are your files. Change-Id: I61e7cd9d7ff43637dff6e63ffc82a7485cf92443 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-23Cleaning, set up binding version in config.cmakeflounder_5.99.6flounder_5.99.5flounder_5.99.4flounder/5.99.6flounder/5.99.5flounder/5.99.45.99.65.99.55.99.4Romain Forlot4-46/+2
Change-Id: I2e8d89b09982c9f3770a5a3e10d281e0ad87651c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-20Use TEST app-templates labelsRomain Forlot4-3/+3
Change-Id: I03b12b6edd04eae51efba509e6d92be3a91702de Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-20Specify the API name to be testedRomain Forlot1-0/+1
Since the API is hardly guessable we need a variable to be able to build a test widget using CMake template function that will configure the config.xml file automatically Change-Id: Ibbb50c8a84356bbe39427453ccf1ebd0785286e5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-20Use dedicated API name for the testRomain Forlot2-5/+6
Use dedicated API name for the test and not using the generic one already used by the raw afb-test. Change-Id: I79eb590a9a1d8c2538bd1b9d8bfc5a8537cf6c00 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-28Update gitignoreflounder_5.99.3flounder/5.99.35.99.3Romain Forlot1-0/+1
Change-Id: I510914c895cafedba5c407fe6ea9e23414eae076 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-28Several tests improvements and fixesRomain Forlot3-27/+56
- New tests about authenticate and write on CAN bus. - Fixes diagnostic messages handling, all diagnostic messages are received through the same handle then in its data there is the detailled message name. - Set after and before method the same between the both file then they could be played separately. About now setting multiple times those methods will override them and the latest set wins - Disable the Step3 for now because of segfault - Fix unsubscribe argument to match the previous subscription else it doesn't match and verb call fails - Fix: typo,wrong variable Change-Id: I2f4c2873e57611c946a99d4313021bb7bfea679c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-27Updated examples files and default configurationRomain Forlot7-49/+52
Let use the new decoder's function and set some hvac signals as writable to be able to test this feature. Change-Id: I27e1c2be069b8bb55ed931ad1fb629aa2d4e5b86 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-27Tiny doc fixRomain Forlot1-1/+1
Change-Id: Ic3f1c572fccacb1c78e38c6a94aafcd0f9740aff Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-25Align config.cmake file with app-template updateflounder_5.99.2flounder/5.99.25.99.2Romain Forlot2-10/+5
Submodule conf.d/app-templates 92646f6..f94e45e: > Align sample on actual default compile options > Add support to binding version 3. > Warning if not using wgtpkg-pack to make a widget > Rework CMAKE_INSTALL_PREFIX and INSTALL_PREFIX var > Be able to overwrite BUILD_TYPE using CLI > Use CACHE variable for other common CMAKE variable > Fix:: wrong wgt using RELEASE BUILD TYPE > Fix: SYSROOT location detection... Wrong test. > Change the default debug compilation options. > Clearer coverage compilation options configuration > Don't overwrite the autobuild script if it exists > Disable the in-tree build method. > Detect Yocto as OS distribution > Fix: wrong compile options added Change-Id: I9d9f607108160e818e8d6345e9c45c02736d7355 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-25Remove generated files from git repoRomain Forlot1-130/+0
This files is generated by afb-genskel tools at build time. Having it in the repo could make some unwanted side effects. Change-Id: Ib5c6b010fe56245694fe267aca0548575b6e063b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-24Added frequency filter test8000ff1-7/+27
Change-Id: I9b80a713f5696e36e4acbe815dc3422281b6e0d3 Signed-off-by: 8000ff <clementmallejac@gmail.com>
2018-07-20Improved testing procedures8000ff6-68/+1096
- Deleted deprecated low-can-tests.lua - Renamed low-can-coverage.lua as it does not describe its purpose - Added 2 new canreplay files - Added new test file for testing subscription filters - Edited the test configuration to play the new test file Change-Id: I11315581a5fac7428ed17d3ef299a9f0e96ce7f4 Signed-off-by: 8000ff <clementmallejac@gmail.com>
2018-07-11can-low-level: add missing hidden attribute to config.xml.inMatt Ranostay1-0/+1
Change-Id: I270b26f79548a784840a7466bd77a6df46741530 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-07-09Add testssandbox/excale/wipRomain Forlot25-60/+2367
Create first tests to be used with afb-test binding The test binding is now found using pkg-config command. Change-Id: Ib1cd08236b6b8fab93ccb67ac613a9c83908d12e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-06Make Built type overwritten by cli possible.Romain Forlot1-1/+1
Settings a CMAKE CACHE variable make the first definition to be not overwritten by a next assignement. Then a cli variable is then possible more without force. Change-Id: Iaad2ffa9d51cd2c77c51e94533979d3ee3f9dd32 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-06Fix: correctly stop the binding.Romain Forlot2-2/+13
Automatically destroying C++ objects wasn't sufficient since it uses thread with locks that were waiting forever if there is no CAN bus activity. Now correctly wake-up the threads to ends them even if there without activity on the CAN bus. Change-Id: I69d74a34a8dbea4df7c8090aa47abf1c43133020 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-06-20Add CAN sample for the agl-vcar configurationRomain Forlot1-0/+219
Change-Id: Ib6a479f30e271ef26955ad3359eda87469f1277a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-05-25Merge "Fixing typos made in comments"flounder_5.99.1flounder/5.99.15.99.1Jan-Simon Moeller18-76/+76
2018-05-24Fixing typos made in commentsydimitrov18-76/+76
This change set fixes the comments made by previous contributors v2: Fix line end v3: Making changes to comments as suggested by reviewers v4: Removing trailing spaces v5: Clearing small typo in low-can-cb.cpp on line 142 Change-Id: Ifbcfc3b2d131d1db0b25e472955b21e98cc09f45 Signed-off-by: ydimitrov <y.dimitrov.14@gmail.com>
2018-05-16Fix compilation warningRomain Forlot1-1/+1
Change-Id: I3ea7b3aa91d4251f90a4ccf5da83ae8de7a58db4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-05-14Fix gitreview file after repo moveydimitrov1-1/+1
After the git repo moved we need to adapt the .gitreview file. Change-Id: I316cf29f01ce5c39be024297279e9161936b03f4 Signed-off-by: ydimitrov <y.dimitrov.14@gmail.com>
2018-04-17Detect engine state and use it during diagnostic messages subscriptionsJonathan Aillet3-3/+86
Get engine state recurringly by requesting a permanent diagnostic messages request. Use these information to warn that diagnostic request won't have any responses at the moment of subscription if engine is off. Bug-AGL: SPEC-1347 Change-Id: If8bd79bba89acd1c8f5452d3efdbf00a89f8cc77 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-04-17Add possibility to subscribe to a recurring request permanentlyJonathan Aillet5-14/+34
Add possibility to subscribe to a recurring request that won't be deleted when no subscriber is detected. For now, this functionnality is implemented for internal use only. Bug-AGL: SPEC-1347 Change-Id: I48f6f647677596ba7920c4348d5406ea7bf1081b Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-04-17Add saving of diagnostic messages informationJonathan Aillet9-99/+274
Add saving of diagnostic messages receive state, last value, and timestamp associated to it. Add methods to get/set these information. Add initialisation for added atributes. Add boolean to set receive state at initialisation. Generate all 'diagnostic-message.cpp' containing diagnostic messages to add receive state initialisation. Bug-AGL: SPEC-1347 Change-Id: Iee82ca3b5f79fd267717ae074d5456b8cbc1c377 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-04-09Correct errors in commentsJonathan Aillet3-3/+3
Change-Id: I1e02bdfe2473e776e35694b883f084077227853c Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-03-23Fix name to fit rename of git repository.Romain Forlot3-6/+7
Bug-AGL: SPEC-1276 Change-Id: I279620c1be00db03f06f6dd882b3b579c80480c4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-03-15Change subscribed signals search to check filters as wellJonathan Aillet4-7/+15
When a new subscription is made, search in existing subscription for a combination of a signal and a filter instead of searching for just a signal. In this way, each subscription will receive signals according to their requesting filter. Bug-AGL: SPEC-1339 Change-Id: I22cb96a2dbaaf48dbd77025ff1610bde151b19b4 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-03-14Delete obsolete references.Jonathan Aillet4-33/+14
Delete obsolote references such as use of acceptance filters, timers, etc. Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-03-14Correction of 'typo' in documentation.Jonathan Aillet1-1/+1
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>