sign: handle decode methods sign from can value
authorClément Bénier <clement.benier@iot.bzh>
Fri, 15 Nov 2019 10:20:34 +0000 (11:20 +0100)
committerRomain Forlot <romain.forlot@iot.bzh>
Fri, 15 Nov 2019 10:20:34 +0000 (11:20 +0100)
commit65ec074edcda5403164b36073a57454958353fc1
treebb269bb671bdc4807676f97500c6de3eb6fd0d19
parentb1cc43eb48778c4e5e30baa3d852307da056d82c
sign: handle decode methods sign from can value

- add enumeration that represents the way of encoding:
    enum sign_t
    {
UNSIGNED = 0,
SIGN_BIT = 1,
ONES_COMPLEMENT = 2,
TWOS_COMPLEMENT = 3,
SIGN_BIT_EXTERN = 4
    };

- the function handle_sign allows to transform value if negative and
return the sign of the value in order to be multiplied at the end ot the
parcing

Change-Id: I5766a286488170d930422474b4c4f3a8578ca726
Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
low-can-binding/can/can-decoder.cpp
low-can-binding/can/can-decoder.hpp
low-can-binding/can/signals.cpp
low-can-binding/can/signals.hpp