From a21dd2b748731f1bbe956da6d22a87cc1412de30 Mon Sep 17 00:00:00 2001 From: Yuta Doi Date: Mon, 14 May 2018 18:39:23 +0900 Subject: Add transmission gear position event in PolicyManager Change-Id: Ibf528b5ab3877d2cf094920fd0723873fb12647c Signed-off-by: Yuta Doi --- src/low_can_client.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/low_can_client.hpp') diff --git a/src/low_can_client.hpp b/src/low_can_client.hpp index 58d0d8f..9cd10e2 100644 --- a/src/low_can_client.hpp +++ b/src/low_can_client.hpp @@ -33,9 +33,11 @@ public: void initialize(); void analyzeCanSignal(struct json_object *object); + bool isChangedTransGearState(); bool isChangedLampState(); bool isChangedParkingBrakeState(); bool isChangedAccelPedalState(); + const char* getCurrentTransGearState(); const char* getCurrentLampState(); const char* getCurrentParkingBrakeState(); const char* getCurrentAccelPedalState(); @@ -47,6 +49,19 @@ private: LowCanClient(LowCanClient &&) = delete; LowCanClient &operator=(LowCanClient &&) = delete; + enum TransGearPosVal { + TransGearPosValD1 = 1, + TransGearPosValD2, + TransGearPosValD3, + TransGearPosValD4, + TransGearPosValD5, + TransGearPosValD6, + TransGearPosValD7, + TransGearPosValD8, + TransGearPosValR, + TransGearPosValN, + }; + enum SignalNo { SignalNoVehicliSpeed = 0, SignalNoTransGearPos, @@ -82,6 +97,8 @@ private: json_bool parking_brake_status_; double accel_pedal_pos_; + std::string prv_trans_gear_state_; + std::string crr_trans_gear_state_; std::string prv_lamp_state_; std::string crr_lamp_state_; std::string prv_parking_brake_state_; @@ -89,6 +106,7 @@ private: std::string prv_accel_pedal_state_; std::string crr_accel_pedal_state_; + bool is_changed_trans_gear_state_; bool is_changed_lamp_state_; bool is_changed_parking_brake_state_; bool is_changed_accel_pedal_state_; -- cgit 1.2.3-korg