aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding/binding/low-can-cb.cpp
AgeCommit message (Collapse)AuthorFilesLines
2018-03-15Change subscribed signals search to check filters as wellJonathan Aillet1-3/+2
When a new subscription is made, search in existing subscription for a combination of a signal and a filter instead of searching for just a signal. In this way, each subscription will receive signals according to their requesting filter. Bug-AGL: SPEC-1339 Change-Id: I22cb96a2dbaaf48dbd77025ff1610bde151b19b4 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2017-11-30Fails write request if CAN signal not writableRomain Forlot1-1/+4
Change-Id: I8d75a232ba7fad9cc95f286e521c2451a3a29061 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-09-28Use afb_genskel tools to generate api definitionRomain Forlot1-1/+23
Generated files hand fixed because of usage of C++ which has to use c++ binding function afb::auth to add afb_auth struct Change-Id: I80ee9cb751cc813754c949d8746aec197da6d52f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-09-28Handle batched subscriptions in a JSON arrayRomain Forlot1-22/+30
Change-Id: I33ade46eaf022a5c7e7cf874f8b838a4a6827f87 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-09-01Add get() and list() APIYuichi Kusakabe1-0/+110
This patch is porting AMB get() and list() API. Change-Id: Ic1d391219f1d64ab127bc1977a5b198abe0fc94b Signed-off-by: Yuichi Kusakabe <yuichi.kusakabe@jp.fujitsu.com>
2017-09-01Fix can write API resultYuichi Kusakabe1-2/+2
write_raw_frame() and write_signal() return results. Change-Id: I3f6d03eaf02bde9ad02fd8de912c5816d249570f Signed-off-by: Yuichi Kusakabe <yuichi.kusakabe@jp.fujitsu.com>
2017-09-01Fix write CAN bus nameYuichi Kusakabe1-1/+1
This patch is low-can write device use /dev/dev-mapping device name. Change-Id: I165bdbd37a4e988b85f6ad7a669e6b1306957d45 Signed-off-by: Yuichi Kusakabe <yuichi.kusakabe@jp.fujitsu.com>
2017-08-09FormatRomain Forlot1-7/+28
Change-Id: I995fa8af8e8fc330f07b9609129723c09e0b13bf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-07-21FormatRomain Forlot1-1/+1
Change-Id: I036befbfb38b01d046d35a1364c28e0835dcbd41 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-07-21Check whether a signal is writable before sendingRomain Forlot1-3/+8
Change-Id: Id04d04a07e43738f7379e33fa7c6022eaa426343 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-07-21Split big function to several smallerRomain Forlot1-45/+73
Change-Id: I070fdafd51e789eb37b963a100b57cae9dff3e25 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-07-21Be able to write raw frame & encode value to sentRomain Forlot1-30/+64
Check whether the argument is a raw frame or a Signal + Value to encode then send. 1 new class to handle encoding part of a value as well as a new method for can_signal_t which return index of a map from its value. Change-Id: I288d2aeec28ce74c9ca35750db18557c9251e1df Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-07-21Create an auth verb to raise privilege of sessionRomain Forlot1-0/+6
Simply raise to a LOA of 1 the current session if asked Need to add some checks to not allow anyone raise its session must hold a specific permission urn:AGL:permission::platform:can:write to be able to authenticate. Change-Id: Id4e01ca20ba8437e97a64db682fdd3ebf45ce7b4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-07-21Implements new verbs to write on CAN busRomain Forlot1-0/+60
This will open a new BCM socket not dedicated to a subscription use to that mean. Change-Id: Idf353015f731e32d6eb7c7856bd73167c66e790f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-07-20Fix subscribe responseRomain Forlot1-1/+4
This patch is "No signal(s) found for %s." return value is ret = -1. Change-Id: Ia6f4f2db13beb7f9d3507d890383fc13cbddac0f Signed-off-by: Yuichi Kusakabe <yuichi.kusakabe@jp.fujitsu.com>
2017-07-04DAB RC3 Fixes follows appfw API break.Romain Forlot1-9/+9
Following functions now return 0 on success and negative value on failure : o afb_req_subcall o afb_req_subcall_sync o afb_service_call o afb_service_call_sync Verbosity macros used in v2 bindings now needs to be prefixed with AFB_ (ERROR -> AFB_ERROR) Change-Id: Ica4346f215bb142fcda0c6ea15e7074f7091f4cc Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-22Add some reminder...Romain Forlot1-0/+1
Change-Id: Ifb81989c39f31f73ce7dc7dcbebfc6039f6a6a47 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-20Separation Generator to a dedicated repoRomain Forlot1-0/+358
Change-Id: Id94831651c3266861435272a6e36c7884bef2c45 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>