Romain Forlot [Mon, 29 May 2017 12:38:56 +0000 (14:38 +0200)]
Update submodule
Change-Id: I48f225fc70bc1a3924c7cb1caf5db7923f3c5ee8
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Mon, 29 May 2017 09:02:04 +0000 (11:02 +0200)]
Update mismatched variables.
Change-Id: I60db8a08255fbd0cb24e06e38871cd926bba153f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Sun, 28 May 2017 16:24:15 +0000 (18:24 +0200)]
Update README instructions.
Adding git submodules instructions before building.
Change-Id: I8b1aa09e5ca69c0e2a7e8acbf6d80593a5fc0f22
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Sun, 28 May 2017 15:52:14 +0000 (17:52 +0200)]
Disabled temporarly kernel version checking
Change-Id: I02498df332b8322dc28c9d07187fec544cfd928c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Sun, 28 May 2017 15:20:49 +0000 (17:20 +0200)]
Clean unused project files and update build script
Change-Id: I4f606005ee781716da52f2ef68e55eeb69026ce3
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Sun, 28 May 2017 14:51:46 +0000 (16:51 +0200)]
Use latest version of cmake templates.
Change-Id: Ia2408a09705ccf035f0e68ecac2909e2b0047f9b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Sun, 28 May 2017 11:18:52 +0000 (13:18 +0200)]
Update gitignore
Change-Id: I918ce2a6e99d1c517a3492d6cc9312bf333f94fa
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 24 May 2017 16:38:54 +0000 (18:38 +0200)]
Fix: file already exists on build demo app
Change-Id: I956caaa06c82e5786114d2fac53c7532226fe7ba
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 24 May 2017 16:15:46 +0000 (18:15 +0200)]
Update config.cmake path
Change-Id: I468d27c764274458310cbd11cdec06b686789152
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 24 May 2017 15:35:53 +0000 (17:35 +0200)]
Cmake WIP
Change-Id: I9c1cefde33724db192cbbf3dac69d47b2a700c2d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
# Conflicts:
# CAN-binder/conf.d/default
Romain Forlot [Wed, 24 May 2017 14:54:43 +0000 (16:54 +0200)]
Move and update app-templates submodule
Change-Id: I91b3926c9c5ab7c95b5a6f9cec309d930792ba14
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 23 May 2017 23:38:00 +0000 (01:38 +0200)]
Close diagnostic manager socket if there isn't any requests
No need to listen diagnostic responses if there isn't any subscriptions.
Change-Id: I7fa48dbc3e8fb1847b8186337fe2813625894406
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 23 May 2017 23:37:04 +0000 (01:37 +0200)]
Initialize the new socket member.
Change-Id: Ia267c7ec605c692222ddcaed112486f81b428200
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 23 May 2017 22:46:43 +0000 (00:46 +0200)]
Fix memory leaks
Change-Id: I4a33b6d5f1f3b73af113aff62b024329b0ed5288
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 23 May 2017 22:00:33 +0000 (00:00 +0200)]
Be able to copy active diagnostic request objects with their socket
Implement socket copy assignment operator on socketcan base class.
Change-Id: I75a2d3b96275b7ab83372d74ff7fe0a0b0535dc7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 23 May 2017 21:59:27 +0000 (23:59 +0200)]
Static code review fixes.
Several style errors and mistakes mostly on constructor and passing arguments
as ref.
Change-Id: I2ca921d6aa70b9074392bb7779ade35bebf7bd8d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 23 May 2017 20:54:55 +0000 (22:54 +0200)]
Fix a dependency problem with populate htdocs targets.
Update modif date on output dir to make update on populate happens too.
Change-Id: Ie1481d4231075a83bebde79ebf41c1f11b73ac21
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 23 May 2017 20:53:28 +0000 (22:53 +0200)]
Update the doc
Change-Id: I5b403be18a82072bb68b0b01d2ad576de4fb5014
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 23 May 2017 20:53:18 +0000 (22:53 +0200)]
Implement filtering on subscription. WIP
Change-Id: I232bdfe75335d0266d582b4974d8378632aceeae
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Mon, 22 May 2017 08:28:38 +0000 (10:28 +0200)]
Logical bus name mapped to device name using conf file.
Store CAN device map without prefixed section name and add methods to get
the mapped device name.
Change-Id: I03ebc175c67b2251016863b0d69a45a816a81d25
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 19 May 2017 14:21:17 +0000 (16:21 +0200)]
Remove unused CMakeLists.txt file.
Useless because nanopb isn't compiled standalone. It's used from openxc-
message-format library.
Change-Id: I59b8a6617d7ba95ac1557d1ad5f49ae0011eb701
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 19 May 2017 14:20:02 +0000 (16:20 +0200)]
Add 'CAN-binder/libs/nanopb/' from commit '
278ffb890e3d8722e4c7d824baaf221a1e375fc4'
git-subtree-dir: CAN-binder/libs/nanopb
git-subtree-mainline:
48a2605965af1f05ba7f01f6e8c1758a4c9b0522
git-subtree-split:
278ffb890e3d8722e4c7d824baaf221a1e375fc4
Romain Forlot [Fri, 19 May 2017 14:13:23 +0000 (16:13 +0200)]
Use the nanopb sources from projects libs.
Change-Id: I9af9a71e4e454a488e51a95ae896fd249bf27103
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 19 May 2017 12:09:40 +0000 (14:09 +0200)]
Using reference make std::move useless.
Change-Id: I9b9b6a2fbaecae8acc4f8f1eef0ea8d2f084fb9f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 19 May 2017 12:07:38 +0000 (14:07 +0200)]
Set parent from configuration_generated objects.
Change-Id: I8f07084c6364347ebad3e029b89aeef93129cce3
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 19 May 2017 10:15:07 +0000 (12:15 +0200)]
Added timestamp to received CAN messages
and store into frequency_clock_t.
Change-Id: If209070298bd9df49297fdcbed554770e1bc0e4a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 19 May 2017 08:55:52 +0000 (10:55 +0200)]
Delete sub-submodules from imported openXC project
Change-Id: If0584c7238353b01292486a4843ff00bb0398987
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 19 May 2017 11:55:29 +0000 (13:55 +0200)]
Rename build script to generic name
Change-Id: I91d7646e27357e338d13e0aea0e0d373fb61b175
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 19 May 2017 14:17:36 +0000 (16:17 +0200)]
Adjust method signature to be more efficient.
Return vector reference and doesn't return const ref.
Change-Id: Ibcbc1d72e4baf1a7b8bf017d36d6d37d25312d6d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
# Conflicts:
# CAN-binder/low-can-binding/can/can-signals.hpp
Romain Forlot [Thu, 18 May 2017 22:36:30 +0000 (00:36 +0200)]
Change method name to signify that it is an aggregate.
As can_message_definitions got the exact same name but the one from can_message_set
is an aggregate of all can_message_definition. So it is clearer using a different
name.
Change-Id: Ieb9e4d3291f3dc460eb352d8b8fe5a7cf479e687
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Thu, 18 May 2017 17:50:02 +0000 (19:50 +0200)]
Use shared_ptr for can_message_set too.
Change-Id: I3ba4881d5fc01a69d55e101b9a07c2019dda1d4b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Thu, 18 May 2017 17:49:43 +0000 (19:49 +0200)]
Finish config parser retrieving device mapping.
Change-Id: Ia43f9c0edf09ff9a1c009f198bdad10a6b44b249
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Thu, 18 May 2017 17:48:29 +0000 (19:48 +0200)]
Upgrade CMake once again using reference submodule from app-templates
Change-Id: I2a17d142af208e71fe6f59d71bc455d6f5882b4a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 17 May 2017 23:05:36 +0000 (01:05 +0200)]
Update the doc
Change-Id: I3efb0bcd4b5e56101bf14a8335406bf6b2f30e97
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 17 May 2017 23:05:16 +0000 (01:05 +0200)]
Fix: cmake doesn"t create populate targets.
Use of property make that the variable PROJECTçTARGETS isn't available until
we retrieve it with get_property
Change-Id: I69845425a11af6408dbced4d13c2d04c5181c0be
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 17 May 2017 23:03:57 +0000 (01:03 +0200)]
Format
Change-Id: If3a381a4a07c117b9b1cc48ba3a6b4af2d7bdc69
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 17 May 2017 23:03:42 +0000 (01:03 +0200)]
Explicit move of objects vector at list initilization
Change-Id: I5dc5ab4fa249c6677b188b6dea9d282a097a3250
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 17 May 2017 23:03:01 +0000 (01:03 +0200)]
Improve objects construction.
Use of a ref to initialize bus_ string member. const value doesn't make
sense.
Change-Id: I96f504ee11a754b3130289d27afa02a6fa811014
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 17 May 2017 15:54:48 +0000 (17:54 +0200)]
Update latest CMakeLists files from app-templates.
Better handling of dependencies using TARGET_LINK_DIRECTORIES directive
Change-Id: Iffead28aa2e2696cdc9103301d013deee2e6b1ab
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 17 May 2017 15:16:30 +0000 (17:16 +0200)]
Don't collide with application framework ERROR in some configuration.
Change-Id: Idd600a47960850cd4afc553fdb79f5c57f93f64b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 17 May 2017 12:32:37 +0000 (14:32 +0200)]
New generated files using updated generator
Change-Id: I5778c07d1e92e52413e3020ee281a38c7cc0f1ef
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 17 May 2017 12:32:14 +0000 (14:32 +0200)]
Fix: Generator compilation warnings.
Change-Id: Ib9267901da5f0cddd191b5736e47b43c696a85e6
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 17 May 2017 12:31:46 +0000 (14:31 +0200)]
Update generator to use the new objects graph organization
Here is the objects graphs for configuration_t object:
vector<can_message_set_t>
{
vector<can_message_definition_t>
{
vector<can_signal_t>
}
vector<diagnostic_message_t>
}
Change-Id: I865f6ec213505a578c0c6ec4b3a76bd061560d2a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 17 May 2017 12:24:41 +0000 (14:24 +0200)]
More generic expression for doors names.
Change-Id: I959ba3d2b42c33176c55c5b2f39d59f9c7b2d614
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 15:37:07 +0000 (17:37 +0200)]
Include diagnostic_message_t into can_message_set.
Change-Id: I7372e469752dd8e90dc9431b9e5c67df12f56c29
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 14:36:51 +0000 (16:36 +0200)]
Make and use a single function to read incoming CAN messages
Change-Id: I5d3f2a8628ace464ad25989346cc76682c591bd8
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 13:16:22 +0000 (15:16 +0200)]
Cleaning unused code diagnostic parts.
Change-Id: I5df50557132ebe593818a7aa4644b8a0161c51a5
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 13:15:55 +0000 (15:15 +0200)]
Format renaming
Change-Id: I40c28f584c444ef806c2adcc55d443a145abb0d2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 13:14:42 +0000 (15:14 +0200)]
Be able to return index or can bus name.
Use a vector of string pair that map index on vector and pair map logical bus
name with linux device name.
Change-Id: I627e6f715f7466d835d8729e21d9e4198111c1fb
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 13:12:45 +0000 (15:12 +0200)]
Remove can-bus-dev following RAW->BCM sockets migration
No needs to get RAW socket for now, so can_bus_dev_t class is useless and
now removed from project.
Change-Id: I37b3e187ef28ba393beae7a99da4f422f74a298e
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 10:49:59 +0000 (12:49 +0200)]
one event source by socket added to systemd event loop.
Get back to the first solution, moving this variable declaration was a mistake.
Change-Id: I1af78d93bfc8f759ecf1a849adddbe1d52c27466
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 10:49:03 +0000 (12:49 +0200)]
Use common timer method to get BCM timeval values.
Change-Id: I3c4364d6038bd60546726fba940f043f5abcb6d2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 10:48:24 +0000 (12:48 +0200)]
Fix: compile conversion warning
Change-Id: I174c546afb6b21df431e0a61677292d43af8f0ca
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 10:48:10 +0000 (12:48 +0200)]
Better suited method.
Change-Id: I287e445c6f1c372a852752911d032a70654aa082
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 10:47:22 +0000 (12:47 +0200)]
Fix: wrong calculation doesn't match method name.
Multiplication was a very specific needs for diagnostic manager when using
systemd event loop timer. Now it is the right period that is calculated and
multiplication is done into the right place. Cleaner.
Change-Id: Ie3dffe8daa0fa9bd9bde408e62a8d7a06a333a25
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 10:44:06 +0000 (12:44 +0200)]
Make sure that frequency is at a valid value (>0)
Else we got infinite value if 0 and negative value doesn't make sense here.
Change-Id: Id65f0aa94cae32f1fea2c5c80028e328e6958a13
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 10:43:02 +0000 (12:43 +0200)]
Fix: be able to receive new response from OBD2 requests.
Change-Id: Iab309e313f63beb4b56bc824ece1b3a5e42ae508
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 10:42:35 +0000 (12:42 +0200)]
Fix: CAN message transmitted filled of zero.
can_dlc field was set to 0 and is evaluated so BCM assumes there is no data
to transmit. It is mandatory to set it.
Change-Id: I1e29ff4248a49212d3fee22c3a0cc77f5b699fd7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 10:41:10 +0000 (12:41 +0200)]
Fix: listening on broadcast CAN ID.
Wrong test about CAN ID, it isn't the response ID that is passed as argument
but the broadcast. Little mistake...
Change-Id: I2622c23356802c3108dbf8e6ede07456294834ee
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 10:38:54 +0000 (12:38 +0200)]
Implement canceling with BCM socket leads to close it.
Change-Id: Ibcc1419caba7e1b04dbe652a6c60c393f14a8145
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 16 May 2017 10:37:46 +0000 (12:37 +0200)]
Adding also diagnostic request to systemd event loop
As for CAN signal, monitoring diagnostic request messages is now handled by
systemD io event loop. Socket reading is common for all OBD2 signals and handled
by the diagnostic manager.
systemd callback function lies in binding callback which in turns call read_socket
method of diagnostic manager. Processing is little bit different from classic CAN
messages so it is a separate callback function.
Lot of cleaning to do now...
Change-Id: I4d2ada0beb5d3348736dfdf3c56a7cb875a1c6c7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Mon, 15 May 2017 22:26:24 +0000 (00:26 +0200)]
New function used to set timer in bcm_head msg.
As there will be more bcm socket and more need to set its timer values.
May be there is a better method to separate integer and decimal parts from
a float value.
Change-Id: I0cd992dfde5fe8257b17b5b610482f5f5e09aa8c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Mon, 15 May 2017 22:24:15 +0000 (00:24 +0200)]
There is no more need having pointer on socket device
Return bus name string.
Change-Id: I0e7f4171c3d1052cb6425cd5b93e5a593d7d277f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Mon, 15 May 2017 22:21:57 +0000 (00:21 +0200)]
Simplify testing name size...
Change-Id: I3daa11b329f2e38efba5a52c2106bddd3b759f86
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Mon, 15 May 2017 22:21:26 +0000 (00:21 +0200)]
Reworking diagnostic manager to use BCM sockets.
Use 2 sockets:
- TX sockets on active_diagnostic_request class as we need X sockets
using the same CAN ID "7DF" with different timing settings
- RX socket on diagnostic_manager object as we need to read the same CAN ID
and process them the same way, there isn't so much need to split them.
Change-Id: I7338fd751a033a1d0e8912ee554e2c72c43961c3
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 12 May 2017 12:46:19 +0000 (14:46 +0200)]
Use raw pointer to point on parent object.
Shared pointer on value is a wrong way because once they is no more object
refering to a parent then the pointer on it is destoyed. Not a big deal here
but we better have to use raw pointer.
Change-Id: I58deeb9e82c446ea135be87c11f405da54cc5bff
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 12 May 2017 12:42:47 +0000 (14:42 +0200)]
Remove unused and useless members.
These members was imported from OpenXC project which was in C so they need
to know array size. As we use vector we doesn't need them anymore. We can
retrieve count using size() vector method
Change-Id: Iefd0266d400097ab2dae813aca196c8e3b9bc368
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 12 May 2017 12:09:25 +0000 (14:09 +0200)]
Fix wrong signature, better with const ref... Was forgotten
Change-Id: I2d3f7525bb85c051c43aeda6b9cc1be0f3e270c8
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 12 May 2017 12:08:16 +0000 (14:08 +0200)]
Message definition can return ref instead of value.
Little optimization that will pass a ref instead of a copy value.
Change-Id: I62fbaaa2fb01cf809e60b592a3d91f06d7235205
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 12 May 2017 12:07:22 +0000 (14:07 +0200)]
Fix: vector throw length error exception.
Message set count members as to be changed because now useless... This is
left part from OpenXC port.
Change-Id: I3a3dc6091b49eabf0d17324634406bd7b0edafb2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 12 May 2017 12:05:54 +0000 (14:05 +0200)]
Fix: wrong arguments signature. Deleted by mistake...
Change-Id: Ib31483663a90c8dad129f59372e1ced3a79c7403
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Mon, 15 May 2017 08:33:47 +0000 (10:33 +0200)]
Update closing message after a successful build.
Change-Id: Icf8b871819178539af129352b35be1fb61cc6789
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Thu, 11 May 2017 15:35:58 +0000 (17:35 +0200)]
Implement unsubscribe like subscribe.
New redundant function creation to mutualize code between two operations.
Change-Id: I8516c2c6d2f0c1d5cf89244ea23b831530e84a5f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 10 May 2017 23:13:15 +0000 (01:13 +0200)]
Format
Change-Id: Idc49593fdc1a039c6a03626115e4156a629e4e65
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 10 May 2017 23:13:07 +0000 (01:13 +0200)]
Resolv include circular dependencies.
Change-Id: I038677d688c64e87ae86dd2af245f87f5c40e317
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 10 May 2017 23:12:11 +0000 (01:12 +0200)]
Massive use of shared_ptr about signal and diag message. WIP
Vector of shared_ptr is made to shared ownership about object around project.
This is the default returned value by getter methods when lookup and manipulating
them.
Change-Id: Id37947bb5994b629f4bf3faecc5ffac81c55e1e6
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 10 May 2017 16:39:25 +0000 (18:39 +0200)]
Use a tree instead of separated object lists. WIP
Now we respect JSON description file, which is can_message_set contains
can_message_definition which contains can_signals.
Diagnostic messages aren't processed for now.
Change-Id: I94aaf5eded14dd84395bd4fd749df58dee5f533e
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 10 May 2017 16:37:15 +0000 (18:37 +0200)]
Fix: circular include for socket classes.
Change-Id: Ibcd71f585246172c191b67b45e3b2763f7722958
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 10 May 2017 08:07:47 +0000 (10:07 +0200)]
Cleaning
Change-Id: I23b862e748e13e7ba69743c8a9d3abb0be36c4bc
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 10 May 2017 07:59:00 +0000 (09:59 +0200)]
CAN message will not be modified once read.
So use const value
Change-Id: I81f9a4766d71116e2f3a2af8785b1bd1c69e2c20
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 10 May 2017 07:54:18 +0000 (09:54 +0200)]
Don't trigger timeout monitoring on signal.
Change-Id: Ib84c365207e32f71fc4cb7e350f99d147317fa08
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 10 May 2017 07:51:09 +0000 (09:51 +0200)]
Make non blocking BCM socket.
Needed because we use systemd event loop that recommend that.
Change-Id: Ia3faf35fe80a973f7a7b1c81f6a8adf96705394b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 10 May 2017 07:49:13 +0000 (09:49 +0200)]
Move reading input stream to specialized socket class.
We always read the same object so how to fill it is the job of specialized class
not a generic method can do that.
Change-Id: Ia262871cec6b7ed3341eb314d5ed6641b8da61e6
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 10 May 2017 07:47:50 +0000 (09:47 +0200)]
Implement setting last_value at message definition level.
In addition to signal last_values, now message last value is also set.
Change-Id: I87c2be3e4e68073d7708b2ddf681889576337410
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 10 May 2017 07:45:29 +0000 (09:45 +0200)]
Keeping RAW sockets for compatibility
And reset can_reader to can_bus_dev_t like the old behavior because BCM sockets
has been implemented at signals level not device.
Change-Id: I715a19ff65bf9d7231c73b66c1ee95b3f41f8ed0
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 9 May 2017 14:48:49 +0000 (16:48 +0200)]
Fix: Avoid returning negative value that's stop watch socket
Even if the frame read is wrong doesn't mean that socket is compromise only
that communication on CAN bus is difficult, maybe temporary. On en EPOLL err
code, or hangup, just close and restart the socket and reset the filter.
Change-Id: I61f146fd269bb2524f09e1f2ed89d93e83166136
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 9 May 2017 14:43:30 +0000 (16:43 +0200)]
Don't process rebuild webapp if it is already build
Change-Id: Ifd3a478035281ae81e2e8f33e904828716fb1213
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Tue, 9 May 2017 14:43:08 +0000 (16:43 +0200)]
Update CMake to the reference app-template. WIP
Change-Id: Icbab921e8ae3380c09cf5b2f5e7f4ba4a59e4c6e
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 5 May 2017 16:40:21 +0000 (18:40 +0200)]
Format
Change-Id: I1c080f961f62a6816b0c36e960ae1ecbeb7fa00d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 5 May 2017 16:39:32 +0000 (18:39 +0200)]
Avoid returning infinity value.
Change-Id: I89d227e48add0c7fc8a4ca577023995b269e6f13
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 5 May 2017 16:39:13 +0000 (18:39 +0200)]
Don't destroy socket by default as they will always be open.
Now derivated class use constructor from base class and we don't destroy
socket when a socket object is over since it may be copied before. So closing
them is in charge of dev, well me...
Change-Id: I0440119017a3e56bb83d0194a6908dc3e2b8f745
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 5 May 2017 16:35:53 +0000 (18:35 +0200)]
Get back to device dedicated raw_socket
Change-Id: Ibec47106f8510e92a017fc08aeb2eeaeef2884e5
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 5 May 2017 16:34:48 +0000 (18:34 +0200)]
Improve granularity of BCM socket using one by signal
Move create_rx_filter to can_signals and adding all accessories needed to works.
Change-Id: I3636fe82ce5c2e43a4992b66ce89440ff709004a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 5 May 2017 16:32:30 +0000 (18:32 +0200)]
Improve log message.
Change-Id: I91155eda22a172efc88f72243c260480a2d1d4ce
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 5 May 2017 16:31:41 +0000 (18:31 +0200)]
Separation between hat and callback binding parts
As well as handling reading signals BCM socket using systemd event loop.
Change-Id: I1e121635ec5db489b2bcb88a3101e716bf8883d5
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 5 May 2017 16:28:49 +0000 (18:28 +0200)]
Update CMake following app-template repo update
Change-Id: Ib24f8c2000f78f5f6fea3126e52f34570e4eee18
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Fri, 5 May 2017 16:27:19 +0000 (18:27 +0200)]
Remove duplicated file
Change-Id: I94e820622d47ef5ae5922948cc28337f28533e97
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Thu, 4 May 2017 12:24:33 +0000 (14:24 +0200)]
Follow the moving binding and configuration files.
Change include statement to refer the correct new path to the files.
Also change CMakeLists.txt.
Change-Id: I66a0bccab02e9fce10072a275a6580d61b4ddfbe
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Thu, 4 May 2017 12:28:09 +0000 (14:28 +0200)]
Update with last app-templates modifications
https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/app-templates
Change-Id: I42eff75b790b70047e1b91b963edf458084881c9
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Romain Forlot [Wed, 3 May 2017 16:23:20 +0000 (18:23 +0200)]
Fix: constructor and include file missing.
Copy constructors are allowed since socket will never be closed during binding
runs.
Change-Id: Ie33e4b7e885d45e1ffeb980400df00ae2a97e45d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>