aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-02-16 17:56:14 +0000
committerRomain Forlot <romain.forlot@iot.bzh>2017-02-16 17:56:14 +0000
commit33fd70ab601d6a7a5cb561f3c0eca06d3677a535 (patch)
treefe65f0ffcbd8ab82ca6c12765dc44c971ffc880a
parent184b44bb06cae6f167c36948c436d445732eb864 (diff)
Change Decoder_c class name to decoder_t
Change-Id: I0f07e9a21cf067f6e3ceab73524628eb4ec731e9 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--src/can-decoder.h2
-rw-r--r--src/can_decode_message.cpp14
2 files changed, 8 insertions, 8 deletions
diff --git a/src/can-decoder.h b/src/can-decoder.h
index 249d5b00..3754baef 100644
--- a/src/can-decoder.h
+++ b/src/can-decoder.h
@@ -18,7 +18,7 @@
#pragma once
-class Decoder_c
+class decoder_t
{
private:
openxc_DynamicField decoded_value;
diff --git a/src/can_decode_message.cpp b/src/can_decode_message.cpp
index 762a6acc..6bb6459f 100644
--- a/src/can_decode_message.cpp
+++ b/src/can_decode_message.cpp
@@ -29,25 +29,25 @@
union DynamicField
{
- std::char string[100];
- std::double numeric_value;
- std::bool boolean_value;
+ char string[100];
+ double numeric_value;
+ bool boolean_value;
};
-void can_decode_message(can_bus_t *can_bus)
+void can_decode_message(can_bus_t &can_bus)
{
can_message_t *can_message;
- std:vector <CanSignal> *signals;
+ std:vector <CanSignal> signals;
std:vector <CanSignal>::iterator signals_i;
openxc_VehicleMessage vehicle_message;
openxc_DynamicField search_key, ret;
- Decoder_c decoder();
+ decoder_t decoder();
while(true)
{
- if(can_message = can_bus->next_can_message())
+ if(can_message = can_bus.next_can_message())
{
/* First we have to found which CanSignal is */
DynamicField signal_id = (double)can_message.get_id();