aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-04-27Fix bit alignment errors...Romain Forlot2-20/+20
Change-Id: Iea1bb66bb3aea8a120e7bbb3b55895682044cf23 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-27Typo, rename, formatRomain Forlot4-15/+15
Change-Id: I8250ef78f0b540617bd249873250f62ad6361fdf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-27Renaming confusing member "address_" to "index_"Romain Forlot3-8/+9
Change-Id: I0ec6d74e9adb791f8bef44f76c74be8365cdf037 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-25Implement reading stream for socketcan_tRomain Forlot2-2/+27
Will read a can_message_t object from socket Change-Id: Ibe3561f9d7bbf4e41b6fd81fa4672bae1c14aca5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-25Fix CMakeFile final message and compile flagRomain Forlot1-2/+2
Change-Id: I518794897a4b333fc825b64846fad081308c93e7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-25Adding Directive to also clean wgt file with make cleanRomain Forlot1-0/+2
Change-Id: I41b32ea60d9a44e27dbe0a51b58173ff359e0186 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-24Fix compilation warning complaining about unset boolean value.Romain Forlot1-1/+2
Change-Id: I17e2177f40b8845f78370048ef3c734486b152b3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-24Misc: Cleanup, typo, formating and comments update.Romain Forlot9-20/+12
Change-Id: Icac565b9a3a80dc05a1a3470a35e223c8c564347 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-24Create a received job for BCM Socket to handle filtering.Romain Forlot6-1/+48
Filter is created using can_signals description and send with appropriate BCM header structure. This is the simplest way to do, no temporal filtering for now is available. Change-Id: Iee49f011ba9316880735d2765c1c23a8b2d3c4d2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-24Rename and handling write on socket using stream instead of specific methodRomain Forlot4-28/+85
Created special struct to handle bcm messages with can_frame and canfd_frame. We can now just send both of them seamlessly. Change-Id: Ia84e9cf2ab1dd0716cb09f6bb342a208e54f8e06 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-24Fix: Avoid returning 2 results for 1 signal.Romain Forlot1-1/+1
Either returning signal with search against generic_name either against name, not both. Change-Id: I597718d04c99d098973442b4174e735e813c9b94 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-22Rework subscription and unsubscriptions operations. More readable.Romain Forlot1-42/+50
Change-Id: I53101eed16b1faf1e5014826d91e4d64665f2f9f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-22Use BCM socket as default cleaning up the old RAW socket code.Romain Forlot5-44/+11
Also use CAN FD frames by default. Change-Id: I5bad10e537653b1a96c2e3012d38dde8627d3caa Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-22Fix: opening bcm socket still trying to bind as a RAW socket.Romain Forlot1-3/+6
Wrong condition testing making connect and bind happens. Change-Id: Ic75a74d044e9763fdf42e50f7643b26ffaf5d76d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-22Improve logging messagesRomain Forlot10-61/+70
Added for all log messages function name at beginning using __FUNCTION__ macro. Change-Id: Ia0f476ca81b9f79c6d49b425c0520894c59797ea Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-21Adding some commentsRomain Forlot1-4/+4
Change-Id: Ic47e808a0da94f79ca0341d1b4f46a02eef3fe84 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-21Move all signals search functions into new signals_manager_t objectRomain Forlot7-202/+154
Create a class from signals lookup and find standalone function and gather all find function into it. There is now only 1 function to find either CAN signals or diagnostic messages, results are returned using an ad-hoc struct containing vector of one or the other type pointers. This object also hold subscribed_signals map with events, so this class is a singleton. Change-Id: I3584c6a91201e6904edc6aeac0abfa1785bdeccc Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
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>