summaryrefslogtreecommitdiffstats
path: root/src/diagnostic
diff options
context:
space:
mode:
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 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)
{
/*
@@ -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.