aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-04-21Avoid warning about unmanaged switch case in INI libraryRomain Forlot1-0/+2
Change-Id: Ifdca1581dc5a086a884dbc2dcc17470e5983b4ac Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-21Diagnostic messages subscription simplified.Romain Forlot3-26/+20
Remove useless function. Change-Id: I6638c3033cfeea643b29c1280d7f5785371cd342 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-21Make virtual CAN device name as argumentRomain Forlot1-2/+2
Change-Id: I6ae48b36171fbc038c9a3a8841d9dbadf7686ee3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-21Added -std=c++11 to compile option lost in transition.Romain Forlot1-1/+1
Change-Id: Ie8728ac2bdb0a4a3712534c4ca7144e9a15ab4d2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-20Update commentsRomain Forlot1-2/+4
Change-Id: Ib21f810170308a16462ffe9c174448a86bf791d4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-20Remove timeout socket option.Romain Forlot1-2/+0
This will be handle by BCM socket Change-Id: Ie0348135fcc596ab21727846f3b47751664c9e11 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-20Separate socket configuration and openingRomain Forlot3-6/+10
Change-Id: I94cad718b516f24c5d1833e09df89f03e529f48a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-20Use same function to open BCM and RAW CAN socketsRomain Forlot3-6/+6
Using one a another socket type is made using a boolean. Change-Id: I0445c8550f289d1e0020f6496c638bc95e8db443 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-20Specializing socket class to CAN socket operations.Romain Forlot5-65/+109
Move all legacy opening RAW CAN socket operation to socket class. Each operations on a CAN socket has to be simple and made by the socket class. Simple BCM socket open operation is implemented. Future will be to open specialized BCM CAN sockets on demand. Change-Id: If285b97afb9871245ab1f13cd9f0401fbd9adf95 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-19Added missing default constructor.Romain Forlot1-0/+2
Change-Id: Ie47171ba633274c31a5e0965919232e91ac74adb Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-19C++11 way to initialize using list init.Romain Forlot1-1/+1
Change-Id: I0fa96d14d42d1ef80eb0340f48a644c378d4dcbe Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-19Cleaning includeRomain Forlot2-8/+0
Change-Id: I6f90c87c164bc6ba70ee0889668f54f4972a8610 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-19FormatingRomain Forlot2-4/+2
Change-Id: Ib67fab1ecd5085e089769e7905cd5ebcd28b9c7c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-19Fix: temporary variable assigned to a reference leading to exceptionRomain Forlot1-1/+1
Change-Id: I6bf86a4c9fe832e4f7df192aca1ef25d79097e9c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-19Change INI file parser library.Romain Forlot6-27/+165
Much simpler but also a bit limitated. Could be change easily in futur if needed Change-Id: I06f03f093c9206007e3d0c1e86a35d60111be5f8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-18Improve REGEX to detects tests files.Romain Forlot1-4/+10
Miss a flag to set regex case-insensitiven, or I did not find it. Change-Id: I3b743e040e57d80e4f97490feba379533387cf87 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-18Add known limitation about messages_set total count.Romain Forlot1-0/+1
Change-Id: Ia9626c31f873470f9ecfdeba3c5535b657c65e23 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-18Use a system INI configuration file to get devices mappingRomain Forlot9-137/+87
Instead of specifying a JSON configuration file with CAN devices name, it uses a mapping configuration file that map a high level device names to a real low level names. File path is to be specified into the generated source code which is /etc/dev-mapping.conf for now. Configuration file uses INI file format and is parsed using inih library cpp wrapper. Change-Id: Ibde104e76cd78a6cc86f6eec4f66c274b7567d43 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-14Fix: wrong testing command lineRomain Forlot1-1/+1
Missing rootdir option else binding can't find its configuration file Change-Id: I011d326dd27a5eae6f021080f08a82290200cc2c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-14Make name of virtual CAN device flexible.Romain Forlot1-2/+2
Change-Id: I9cef3e6c4fa81bb75514e7b9c618494bad00ab6a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-14Fix: wrong splitting of can_signalsRomain Forlot1-3/+2
Signals were separated by message definitions but it is unneeded and make signals separated by message_set. Change-Id: I83cbe687dafc37af0412dc5346837d06be918556 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-14Change directory architecture to use 2 separated projects.Romain Forlot118-96/+469
Each projects, binder and generator, has to be compiled separatly. CAN-binder will host high and low level binding CAN-config-generator only the generator used for low level binding. build.sh script just launch both build in their respective dir. Change-Id: Ic77932660fcca507b23a631d4e4e790f608880ae Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-14Cleaning CMAkeRomain Forlot2-14/+16
Change-Id: I4efb09946474fadcf41cf9d04ad0f462ae4d0704 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-14Adding C++ compile flags option by default.Romain Forlot1-0/+6
Change-Id: Ia0fe92fa08ed56255028a2a572be076a2a0e8665 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-14Update CMake logic making external libs globalRomain Forlot12-197/+139
Each external libraries is a target that can be linked to a target project. Change-Id: I4564eaa1c96c877c42f2a420599e27279f48d378 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Fix wrong target name variable.Romain Forlot1-12/+12
Change-Id: I946dc9c44ecc6f9976c4accb65fc4b1efb4c7ca3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Adapt CMakeFile including can-config-generator tool.Romain Forlot3-29/+56
Change-Id: I154d3976c0ab91ded20c07c44a1a586a98f3057f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Add 'can-config-generator/' from commit ↵Romain Forlot28-0/+15424
'b7591d16c2686214d5d8dcc0739a233f15aee5db' git-subtree-dir: can-config-generator git-subtree-mainline: 9e444ade872bc436cf12bc12d03c3a5d51ac0b9e git-subtree-split: b7591d16c2686214d5d8dcc0739a233f15aee5db
2017-04-11Remove boost library dependency.Romain Forlot4-94/+148
Use a simple optarg parser. Change-Id: If0cd9da9db24a7889573e32f6b8ace33702c2c35 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Handle project new architecture using new CMakeFileRomain Forlot52-42/+722
Change-Id: I672a9b49d9d5a3953ba6dccaafbbd738839f64a6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh> # Conflicts: # low-can-binding/libs/bitfield-c # low-can-binding/libs/isotp-c # low-can-binding/libs/openxc-message-format
2017-04-11Unsubscribe instead of subscribe if can't adding to recurring requestRomain Forlot1-9/+6
Not useful to get a subscription on an adding error. Change-Id: I211016a1cbeb9cd5677cd8f8c7a28ccc93ef9a34 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Adding K2L CAN signals to toyota examples.Romain Forlot1-2/+61
Change-Id: I147c439217dcc1f0709bd55f670ff1893cc77262 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Fix: make no clients event works with CAN subscriptionRomain Forlot2-4/+13
Is there is no diagnostic message corresponding then do nothing Change-Id: Ib6627b3c10b1b7a0a46d41323a6623efe808a015 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Added Citreon sample while traveling to KarlsruheRomain Forlot2-0/+731155
Change-Id: I7a6e5a7a068f205394b01e2b5ce00e59292d2182 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Fix: wrong period operation without unit multiplicatorRomain Forlot3-8/+10
Possible divsion by 0. Don't know if it is good to keep different time unit instead having one unit for project... Change-Id: I73cfc1ab72d3420d337f10a9b79bdf305a3a2bc7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Use by default can0Romain Forlot1-1/+1
Change-Id: Idc4fd2f2d6d447d6b9e947d5b3129dc564a4bc5c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11CleaningRomain Forlot1-1/+1
Change-Id: I5ef9bad2ef398d3d293c3fc2edc18271042455f4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Handle simultaneous subscription to diagnostic messages.Romain Forlot2-9/+16
Delay new recurring requests if there are already existing in flight and cleanup active request to correctly set in_flight_ flag to false else new request can't be launched as there is always an old one considered running... Modify a little bit DEBUG message and cleanup useless code. Change-Id: I39f865bbc6d00188d3cddd1d81437b9e3ca51269 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Handle cancel active diag requet when there are no more subscribersRomain Forlot5-23/+48
When push events if there is no more subscribers to that event then call a function that will cleanup that request from diagnostic manager queue. Change-Id: I8153701074453444a5bba6f1374401bdf230f7e6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Fix: unsubscription to diagnostic messages.Romain Forlot2-6/+14
Unsubscriptions weren't managed anymore since we handle supported flag in diagnostic messages. Now it's back, unsubscription against appfw is done as well as canceling recurring active diagnostic request. Change-Id: I22ebba771646624cb323e72dd7bf21027b6c6ba7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Get recurring requests suspend proof.Romain Forlot1-2/+2
Change to CLOCK_BOOTTIME instead of CLOCK_MONOTONIC Change-Id: Iaa1a65a80e3aaa8e622ea1e3eb4b6a36b4dcd225 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Fix: Empty every queue before unlock mutex.Romain Forlot1-18/+25
Make sure that we finish to process every message in queue before refill them cause' CAN read run faster than decoding and pushing event. So it's a try to get all message processed. Change-Id: Idce2bc4d79920adc2bf478177c4e3defed39867b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Improve detail in DEBUG message at recurring request submissionRomain Forlot1-3/+7
Change-Id: I93d0cbcae8e2cdf1144ffd981c93a109682c1685 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Port configuration parsing to a separate object.Romain Forlot2-0/+127
Change-Id: If5da63d2fdd498dcb6dde10469acaa91b00e60df Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Improve documentation and added can samplesRomain Forlot4-4/+674291
This explicit use cases with virtual CAN device or Porter board CAN devices Also, it add a complete trip with "vehicle.speed" obd2 signal recurring requests. to be use with canplayer to replay a real car trip. Change-Id: I66c762fa23ed409c812765d6d82e78138edbd455 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Erase compilation WARNING.Romain Forlot4-11/+5
Useless tests and type cast about numbers. Change-Id: I6fe13b7dfec8529520730f83e83d2dd3da3a674c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Fix: wrong pointer validity check...Romain Forlot1-1/+1
Change-Id: Ia47159fb18797681fb1dd132be5173e167d8850b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-11Fix: don't clean recurring request except if forcedRomain Forlot1-4/+3
Change-Id: I669fc1f0b078e151dfb0cbb17c3d626bb43930d2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-31Fix: commands typoForlot Romain [IoT.bzh]1-2/+2
Merge pull request #1 from shogun656/master
2017-03-31Update README.mdWesam Haddad1-2/+2
was annoying me :)