aboutsummaryrefslogtreecommitdiffstats
path: root/CAN-binder
AgeCommit message (Collapse)AuthorFilesLines
2017-05-19Simplify testing name size...Romain Forlot1-1/+1
Change-Id: I3daa11b329f2e38efba5a52c2106bddd3b759f86 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-19Reworking diagnostic manager to use BCM sockets.Romain Forlot4-100/+125
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>
2017-05-19Use raw pointer to point on parent object.Romain Forlot5-10/+10
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>
2017-05-19Remove unused and useless members.Romain Forlot3-21/+1
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>
2017-05-19Fix wrong signature, better with const ref... Was forgottenRomain Forlot1-5/+4
Change-Id: I2d3f7525bb85c051c43aeda6b9cc1be0f3e270c8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-19Message definition can return ref instead of value.Romain Forlot2-2/+2
Little optimization that will pass a ref instead of a copy value. Change-Id: I62fbaaa2fb01cf809e60b592a3d91f06d7235205 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-19Fix: vector throw length error exception.Romain Forlot1-3/+4
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>
2017-05-19Fix: wrong arguments signature. Deleted by mistake...Romain Forlot1-2/+2
Change-Id: Ib31483663a90c8dad129f59372e1ced3a79c7403 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-19Update closing message after a successful build.Romain Forlot1-1/+1
Change-Id: Icf8b871819178539af129352b35be1fb61cc6789 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-19Implement unsubscribe like subscribe.Romain Forlot1-18/+31
New redundant function creation to mutualize code between two operations. Change-Id: I8516c2c6d2f0c1d5cf89244ea23b831530e84a5f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-19FormatRomain Forlot4-11/+27
Change-Id: Idc49593fdc1a039c6a03626115e4156a629e4e65 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-11Resolv include circular dependencies.Romain Forlot3-3/+2
Change-Id: I038677d688c64e87ae86dd2af245f87f5c40e317 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-11Massive use of shared_ptr about signal and diag message. WIPRomain Forlot11-82/+82
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>
2017-05-10Use a tree instead of separated object lists. WIPRomain Forlot11-155/+245
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>
2017-05-10Fix: circular include for socket classes.Romain Forlot3-1/+2
Change-Id: Ibcd71f585246172c191b67b45e3b2763f7722958 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-10CleaningRomain Forlot1-6/+1
Change-Id: I23b862e748e13e7ba69743c8a9d3abb0be36c4bc Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-10CAN message will not be modified once read.Romain Forlot3-3/+3
So use const value Change-Id: I81f9a4766d71116e2f3a2af8785b1bd1c69e2c20 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-10Don't trigger timeout monitoring on signal.Romain Forlot1-1/+1
Change-Id: Ib84c365207e32f71fc4cb7e350f99d147317fa08 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-10Make non blocking BCM socket.Romain Forlot1-0/+3
Needed because we use systemd event loop that recommend that. Change-Id: Ia3faf35fe80a973f7a7b1c81f6a8adf96705394b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-10Move reading input stream to specialized socket class.Romain Forlot6-26/+49
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>
2017-05-10Implement setting last_value at message definition level.Romain Forlot9-4/+22
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>
2017-05-10Keeping RAW sockets for compatibilityRomain Forlot2-56/+1
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>
2017-05-10Fix: Avoid returning negative value that's stop watch socketRomain Forlot3-7/+12
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>
2017-05-09Don't process rebuild webapp if it is already buildRomain Forlot1-2/+2
Change-Id: Ifd3a478035281ae81e2e8f33e904828716fb1213 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-09Update CMake to the reference app-template. WIPRomain Forlot3-21/+39
Change-Id: Icbab921e8ae3380c09cf5b2f5e7f4ba4a59e4c6e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-05FormatRomain Forlot1-1/+1
Change-Id: I1c080f961f62a6816b0c36e960ae1ecbeb7fa00d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-05Avoid returning infinity value.Romain Forlot1-1/+1
Change-Id: I89d227e48add0c7fc8a4ca577023995b269e6f13 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-05Don't destroy socket by default as they will always be open.Romain Forlot6-33/+9
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>
2017-05-05Get back to device dedicated raw_socketRomain Forlot3-2/+15
Change-Id: Ibec47106f8510e92a017fc08aeb2eeaeef2884e5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-05Improve granularity of BCM socket using one by signalRomain Forlot6-49/+58
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>
2017-05-05Improve log message.Romain Forlot2-4/+4
Change-Id: I91155eda22a172efc88f72243c260480a2d1d4ce Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-05Separation between hat and callback binding partsRomain Forlot11-93/+136
As well as handling reading signals BCM socket using systemd event loop. Change-Id: I1e121635ec5db489b2bcb88a3101e716bf8883d5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-05Update CMake following app-template repo updateRomain Forlot7-122/+116
Change-Id: Ib24f8c2000f78f5f6fea3126e52f34570e4eee18 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-05Remove duplicated fileRomain Forlot1-1/+0
Change-Id: I94e820622d47ef5ae5922948cc28337f28533e97 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-04Follow the moving binding and configuration files.Romain Forlot18-31/+31
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>
2017-05-04Update with last app-templates modificationsRomain Forlot10-19/+4
https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/app-templates Change-Id: I42eff75b790b70047e1b91b963edf458084881c9 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-03Fix: constructor and include file missing.Romain Forlot6-38/+24
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>
2017-05-03Align on CMake template from app-template repoRomain Forlot1-3/+2
Change-Id: Id44c5e4917f646177f5262bb74c9ccb3a588d25b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-03Change direct initialization objectRomain Forlot1-1/+1
Change-Id: Icedbe5b8c420b0fb77eb331577e11c35c4597d80 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-03typoRomain Forlot1-4/+4
Change-Id: Iaf68d463e9df4d6dda2a8508adf5395041d2ff7f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-03Keeping raw socket until diagnostic_manager is fully migratedRomain Forlot2-2/+10
Change-Id: I8cb170613c003bbdb39240eb809b8cefcad6cb35 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-03Added child class to binding target.Romain Forlot1-0/+2
Change-Id: I804abe6eb0965b54fb93bc8da2b1e1665b99476d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-03Derivate socketcan to multiple child depending upon socket CAN type.Romain Forlot6-54/+237
Use to initialize raw, bcm and later isotp socket. Now we should have, 1 BCM socket by signal to make filter on them. 1 raw socket by devices is kept to use diagnostic manager as is. Change-Id: Icb2daddf67039479f72bc487d53971adc9aba638 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-03Use the private method instead of direct C syscall.Romain Forlot1-1/+1
Change-Id: I1c0e04e38fec92dee167720c3128a7493d4cf9b2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-02Added external libraries from openXC CMake files.Romain Forlot284-110/+211
Now libraries are cleanly included and built. Change-Id: Iaa85639578b55b2da8357bc438426403e2cca8de Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-02Add 'CAN-binder/libs/uds-c/' from commit ↵Romain Forlot17-0/+1778
'ca20db3dd978871bbb9f01f3c862b510c03d1dc4' git-subtree-dir: CAN-binder/libs/uds-c git-subtree-mainline: 3102ec9ce009d0f28355c5b7df9c5bd5013e6e75 git-subtree-split: ca20db3dd978871bbb9f01f3c862b510c03d1dc4
2017-05-02Add 'CAN-binder/libs/nanopb/' from commit ↵Romain Forlot275-0/+25386
'278ffb890e3d8722e4c7d824baaf221a1e375fc4' git-subtree-dir: CAN-binder/libs/nanopb git-subtree-mainline: 12e680a3c97a2750c657a8c561a79706f3689149 git-subtree-split: 278ffb890e3d8722e4c7d824baaf221a1e375fc4
2017-05-02Add 'CAN-binder/libs/openxc-message-format/' from commit ↵Romain Forlot20-0/+15211
'd9f54f97578429773421abce98d5f6579717afcc' git-subtree-dir: CAN-binder/libs/openxc-message-format git-subtree-mainline: f44a5b1549bc4c8a84d0dedf4a8b1e4220a34f42 git-subtree-split: d9f54f97578429773421abce98d5f6579717afcc
2017-05-02Add 'CAN-binder/libs/isotp-c/' from commit ↵Romain Forlot20-0/+1364
'ee24440b7c123ab1b0317e57be33e837a1cb51f1' git-subtree-dir: CAN-binder/libs/isotp-c git-subtree-mainline: d170c9faeae2cf29c19f3523714ecdf58be73bed git-subtree-split: ee24440b7c123ab1b0317e57be33e837a1cb51f1
2017-05-02Add 'CAN-binder/libs/bitfield-c/' from commit ↵Romain Forlot20-0/+1591
'a34745ec93ae0a1d4f1b640dba8fb6702331a8e9' git-subtree-dir: CAN-binder/libs/bitfield-c git-subtree-mainline: b6c09cbda2b6b47981d65265184a21223e526d4a git-subtree-split: a34745ec93ae0a1d4f1b640dba8fb6702331a8e9