From 37bf83a16cbd07b168b8c4f5a2c05cbf281d8fad Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 13 Mar 2017 09:20:27 +0100 Subject: Reordering class method. Change-Id: I61cca1117a987280383538a0b0e307429bee4fc3 Signed-off-by: Romain Forlot --- src/diagnostic/diagnostic-message.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/diagnostic/diagnostic-message.cpp b/src/diagnostic/diagnostic-message.cpp index cb4e691b..c9035eb0 100644 --- a/src/diagnostic/diagnostic-message.cpp +++ b/src/diagnostic/diagnostic-message.cpp @@ -68,6 +68,23 @@ void obd2_signal_t::set_prefix(std::string val) prefix_ = val; } +/** + * @brief Build a DiagnosticRequest struct to be passed + * to diagnostic manager instance. + */ +const DiagnosticRequest obd2_signal_t::build_diagnostic_request() +{ + return {/*arbitration_id: */OBD2_FUNCTIONAL_BROADCAST_ID, + /*mode: */0x1, + /*has_pid: */true, + /*pid: */pid_, + /*pid_length: */0, + /*payload[]: */{0}, + /*payload_length: */0, + /*no_frame_padding: */false, + /*DiagnosticRequestType: */DiagnosticRequestType::DIAGNOSTIC_REQUEST_TYPE_PID }; +} + bool obd2_signal_t::is_obd2_response(can_message_t can_message) { /* @@ -112,23 +129,6 @@ bool obd2_signal_t::is_obd2_response(can_message_t can_message) return false; } -/** - * @brief Build a DiagnosticRequest struct to be passed - * to diagnostic manager instance. - */ -const DiagnosticRequest obd2_signal_t::build_diagnostic_request() -{ - return {/*arbitration_id: */OBD2_FUNCTIONAL_BROADCAST_ID, - /*mode: */0x1, - /*has_pid: */true, - /*pid: */pid_, - /*pid_length: */0, - /*payload[]: */{0}, - /*payload_length: */0, - /*no_frame_padding: */false, - /*DiagnosticRequestType: */DiagnosticRequestType::DIAGNOSTIC_REQUEST_TYPE_PID }; -} - /** * @brief Check if a request is an OBD-II PID request. * -- cgit 1.2.3-korg