summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-06-26Implement a new socket type CAN for j1939 protocolArthur Guyader10-55/+305
This commit implements a new socket class for the j1939 protocol and prepares the bases classes by modifying the write and read methods. Bug-AGL: SPEC-2386 Change-Id: I16ba493418a4bb37a0262b61a2a2629be6ab5051 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-06-19Modify to receive signal with bigger value than the number of statesHiroki Koga1-1/+1
Fix the bug about a part of decode_state in can-signals.cpp. If a state of signal is allocated not in order, the signal which is bigger value than the number of states cannot be received, because can_signal_t::get_states compares signal value with the number of states. By this modification, get_states is changed to judges whether a signal value exists in states or not. Bug AGL: SPEC-2504 Change-Id: Ia67413507950654567808f7a08d0b0b3b47cbd23 Signed-off-by: Hiroki Koga <hiroki@witz-inc.co.jp>
2019-06-14Require to run at platform scopeJosé Bollo1-0/+1
Add the required permission urn:AGL:permission::partner:scope-platform to run at platform scope. Bug-AGL: SPEC-545 Bug-AGL: SPEC-2006 Change-Id: I8878ecad50bcf2c0f8fd8419e43f1009a22a1d85 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-05-17Fix: double free issuehalibut_7.99.1halibut/7.99.17.99.1Romain Forlot1-2/+0
handle is already freed during the active_diagnostic_request destruction. Bug-AGL: SPEC-2415 Change-Id: Ia26d5c9d2974ca34d411c3182b218141a84c8f21 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-04-30Removing submoduleRomain Forlot2-0/+1
Migration wasn't complete, submodule deinit didn't achieve to erase the submodule or something wasn't pushed, anyway we have to manually remove the submodule to get rid of it. And this commit adds the afb-helpers library as a link dependency Bug-AGL: SPEC-2139 Change-Id: Iedbdb2d75fc75de553254b266c319bd1538d95c3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-04-15documentation: fix broken links in documentationClément Bénier2-2/+2
- use relative links Change-Id: Ic8d85e6cad82e272d136b2bc4c9a1f965b101fbc Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
2019-04-02docs: Fix broken linksPierre MARZIN3-4/+4
Change-Id: Icc71985cab22e015fa4b901a9545bec3e2cb524d Signed-off-by: Pierre MARZIN <pierre.marzin@iot.bzh>
2019-03-15binding: can-low-level: remove useless .gitmodulesMatt Ranostay1-3/+0
Bug-AGL: SPEC-2268 Change-Id: I48725d0589f188511873fa91d49cd425e1dd2ceb Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2019-02-27autobuild: fix warnings due to cp command exit errorRaquel Medina2-26/+50
- bring latest version of autobuild script in - move conf.d/autobuild to root folder - update autobuild script to fix warnings triggered by cp operation error. Change-Id: I81b8000f6b11ac2571a8dbb329d45ec417092c99 Bug-AGL: SPEC-2164 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
2019-02-06Add fake can data for dashboardzheng_wenlong1-0/+156
Add these fake can data. We want to modify dashboard, let is show more information. accelerator.pedal.position steering.wheel.angle transmission.gearinfo transmission.mode turnsignal.status lightstatus.brake parking.brake.status Change-Id: Ief9f29684f3463af0d0f98f1dd213b633d1889bb Signed-off-by: zheng_wenlong <wenlong_zheng@nexty-ele.com>
2018-12-19docs: add yaml bookhalibut_7.90.0halibut/7.90.0guppy_6.99.4guppy_6.99.3guppy/6.99.4guppy/6.99.37.90.06.99.46.99.3Frederic Marec1-0/+16
Bug-AGL: SPEC-1988 Change-Id: I67cf5f375d8f363e830ba9d04ff62ea7a3939510 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2018-12-14Smalls improvementsRomain Forlot5-8/+21
- Improve robustness reading a BCM socket Adding checks on system calls and remove the initialization of the struct that will hold the received message, not so much needed in that case. - More accurate log message at subscription/unsubscription step whether this is a FD CAN messages or not and if this a subscription or an unsubscription that is requested. - Initialize the full struct of vehicle message to avoid memory warning about conditionnal jump based on uninitialized bytes. - Memleak: Free raw pointer on active diagnostic requests Change-Id: I4bbf4d851c0fa1efdb6fa6034fac3d1dcafa1a73 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-14Simpler handling of binding subscriptionsRomain Forlot8-494/+474
Don't use a child class for subscription, only use one because there isn't other different subscriptions type to be implemented about now and if so then we could split again. Remove functions no longer useful and move afb events and afb subscriptions part to low-can-subscription Change-Id: Ie3e4255961ac557465098cdb48730098a950461a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
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>