summaryrefslogtreecommitdiffstats
path: root/src/diagnostic
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-13 09:20:27 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:14:37 +0100
commit37bf83a16cbd07b168b8c4f5a2c05cbf281d8fad (patch)
treee24a2333677b1c5a04183367008bf8418a42e916 /src/diagnostic
parente2c6b2442f3e30ad42a358505ff3f575e80089ab (diff)
Reordering class method.
Change-Id: I61cca1117a987280383538a0b0e307429bee4fc3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/diagnostic')
-rw-r--r--src/diagnostic/diagnostic-message.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/diagnostic/diagnostic-message.cpp b/src/diagnostic/diagnostic-message.cpp
index cb4e691..c9035eb 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)
{
/*
@@ -113,23 +130,6 @@ bool obd2_signal_t::is_obd2_response(can_message_t can_message)
}
/**
- * @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.
*
* @return true if the request is a mode 1 request and it has a 1 byte PID.