summaryrefslogtreecommitdiffstats
path: root/src/can-utils.h
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-02-16 14:45:02 +0000
committerRomain Forlot <romain.forlot@iot.bzh>2017-02-16 15:10:53 +0000
commit94073a891ccf610fcc8be64676ad474989986c40 (patch)
treecc35ba59ff05fc13b91048f2e07ccb2a3f1df63e /src/can-utils.h
parent34daeb535396ef940344e657f89293cd47e3a965 (diff)
Use initialisation list with CanBus_c constructor
Suffix with '_' object var member Make const get method about Change-Id: I9a581cfa58070bf8c13714867a6d202db3822989 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/can-utils.h')
-rw-r--r--src/can-utils.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/can-utils.h b/src/can-utils.h
index 1e566a5..04303e3 100644
--- a/src/can-utils.h
+++ b/src/can-utils.h
@@ -87,21 +87,21 @@ typedef uint64_t (*SignalEncoder)(struct CanSignal* signal,
*/
class CanBus_c {
private:
- afb_binding_interface *interface;
+ afb_binding_interface *interface_;
/* Got from conf file */
- std::string deviceName;
+ std::string device_name;
- int socket;
- bool is_fdmode_on;
+ int can_socket_;
+ bool is_fdmode_on_;
struct sockaddr_can txAddress;
- std::thread th_reading;
- std::thread th_decoding;
- std::thread th_pushing;
+ std::thread th_reading_;
+ std::thread th_decoding_;
+ std::thread th_pushing_;
- std::queue <CanMessage_c> can_message_q;
- std::queue <openxc_VehicleMessage> vehicle_message_q;
+ std::queue <CanMessage_c> can_message_q_;
+ std::queue <openxc_VehicleMessage> vehicle_message_q_;
public:
int open();
@@ -140,10 +140,10 @@ class CanMessage_c {
uint8_t length;
public:
- uint32_t get_id();
- int get_format();
- uint8_t get_data();
- uint8_t get_lenght();
+ uint32_t get_id() const;
+ int get_format() const;
+ uint8_t get_data() const;
+ uint8_t get_lenght() const;
void set_id(uint32_t id);
void set_format(CanMessageFormat format);