summaryrefslogtreecommitdiffstats
path: root/src/diagnostic
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-17 12:48:46 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-17 12:48:46 +0100
commit7591838644a3fcb5145b9ccc7200166debe7ba87 (patch)
tree90336690ab6e294e9d1937beb98a1d50a0b327c4 /src/diagnostic
parentf05cdb00aff6ba1d41a6d705d34bce42122f971f (diff)
Comments fixes, typo and formating.
No more warning when generate the docs and all comments follow the same formating. Change-Id: I80d4c5c2d64401c2e53a550c60155680c4f968ce Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/diagnostic')
-rw-r--r--src/diagnostic/active-diagnostic-request.cpp1
-rw-r--r--src/diagnostic/active-diagnostic-request.hpp2
-rw-r--r--src/diagnostic/diagnostic-manager.cpp8
-rw-r--r--src/diagnostic/diagnostic-manager.hpp18
-rw-r--r--src/diagnostic/diagnostic-message.cpp18
-rw-r--r--src/diagnostic/diagnostic-message.hpp10
6 files changed, 28 insertions, 29 deletions
diff --git a/src/diagnostic/active-diagnostic-request.cpp b/src/diagnostic/active-diagnostic-request.cpp
index 9e64bd55..a9c21c63 100644
--- a/src/diagnostic/active-diagnostic-request.cpp
+++ b/src/diagnostic/active-diagnostic-request.cpp
@@ -24,7 +24,6 @@
#define ERROR_PID 0xFF
-// @brief
std::string active_diagnostic_request_t::prefix_ = "diagnostic_messages";
bool active_diagnostic_request_t::operator==(const active_diagnostic_request_t& b)
diff --git a/src/diagnostic/active-diagnostic-request.hpp b/src/diagnostic/active-diagnostic-request.hpp
index 452ff976..247eeb17 100644
--- a/src/diagnostic/active-diagnostic-request.hpp
+++ b/src/diagnostic/active-diagnostic-request.hpp
@@ -53,7 +53,7 @@ typedef void (*DiagnosticResponseCallback)(const active_diagnostic_request_t* re
///
/// @brief An active diagnostic request, either recurring or one-time.
///
-/// @desc Will host a diagnostic_message_t class members to describe an on going
+/// Will host a diagnostic_message_t class members to describe an on going
/// diagnostic request on the CAN bus. Diagnostic message will be converted to
/// a DiagnosticRequest using ad-hoc method build_diagnostic_request from diagnostic message.
/// Then missing member, that can not be hosted into a DiagnosticRequest struct, will be passed
diff --git a/src/diagnostic/diagnostic-manager.cpp b/src/diagnostic/diagnostic-manager.cpp
index 07b08ca1..2d4669e7 100644
--- a/src/diagnostic/diagnostic-manager.cpp
+++ b/src/diagnostic/diagnostic-manager.cpp
@@ -37,7 +37,7 @@ diagnostic_manager_t::diagnostic_manager_t()
/// to have 1 diagnostic bus which are the first bus declared in the JSON
/// description file. Configuration instance will return it.
///
-/// @desc this will initialize DiagnosticShims and cancel all active requests
+/// this will initialize DiagnosticShims and cancel all active requests
/// if there are any.
bool diagnostic_manager_t::initialize()
{
@@ -222,7 +222,7 @@ active_diagnostic_request_t* diagnostic_manager_t::find_recurring_request(const
/// @brief Add and send a new one-time diagnostic request.
///
-/// @desc A one-time (aka non-recurring) request can existing in parallel with a
+/// A one-time (aka non-recurring) request can existing in parallel with a
/// recurring request for the same PID or mode, that's not a problem.
///
/// For an example, see the docs for addRecurringRequest. This function is very
@@ -232,7 +232,7 @@ active_diagnostic_request_t* diagnostic_manager_t::find_recurring_request(const
/// @param[in] name - Human readable name this response, to be used when
/// publishing received responses. TODO: If the name is NULL, the published output
/// will use the raw OBD-II response format.
-/// @param[in] waitForMultipleResponses - If false, When any response is received
+/// @param[in] wait_for_multiple_responses - If false, When any response is received
/// for this request it will be removed from the active list. If true, the
/// request will remain active until the timeout clock expires, to allow it
/// to receive multiple response. Functional broadcast requests will always
@@ -326,7 +326,7 @@ bool diagnostic_manager_t::validate_optional_request_attributes(float frequencyH
/// @param[in] name - An optional human readable name this response, to be used when
/// publishing received responses. If the name is NULL, the published output
/// will use the raw OBD-II response format.
-/// @param[in] waitForMultipleResponses - If false, When any response is received
+/// @param[in] wait_for_multiple_responses - If false, When any response is received
/// for this request it will be removed from the active list. If true, the
/// request will remain active until the timeout clock expires, to allow it
/// to receive multiple response. Functional broadcast requests will always
diff --git a/src/diagnostic/diagnostic-manager.hpp b/src/diagnostic/diagnostic-manager.hpp
index c66e21a5..bd5cefb7 100644
--- a/src/diagnostic/diagnostic-manager.hpp
+++ b/src/diagnostic/diagnostic-manager.hpp
@@ -26,20 +26,20 @@
#include "../can/can-bus.hpp"
#include "active-diagnostic-request.hpp"
-/* Each CAN bus needs its own set of shim functions, so this should
- * match the maximum CAN controller count.
- */
+/// Each CAN bus needs its own set of shim functions, so this should
+/// match the maximum CAN controller count.
+///
#define MAX_SHIM_COUNT can_bus_t.get_can_devices().size()
#define DIAGNOSTIC_RESPONSE_ARBITRATION_ID_OFFSET 0x8
class active_diagnostic_request_t;
-/**
- * @brief The core structure for running the diagnostics module by the binding.
- *
- * @desc This stores details about the active requests and shims required to connect
- * the diagnostics library to the CAN device.
- */
+///
+/// @brief The core structure for running the diagnostics module by the binding.
+///
+/// This stores details about the active requests and shims required to connect
+/// the diagnostics library to the CAN device.
+///
class diagnostic_manager_t {
protected:
static bool shims_send(const uint32_t arbitration_id, const uint8_t* data, const uint8_t size);
diff --git a/src/diagnostic/diagnostic-message.cpp b/src/diagnostic/diagnostic-message.cpp
index ca8bf846..6f615574 100644
--- a/src/diagnostic/diagnostic-message.cpp
+++ b/src/diagnostic/diagnostic-message.cpp
@@ -80,10 +80,10 @@ void diagnostic_message_t::set_supported(bool value)
supported_ = value;
}
-/**
- * @brief Build a DiagnosticRequest struct to be passed
- * to diagnostic manager instance.
- */
+///
+/// @brief Build a DiagnosticRequest struct to be passed
+/// to diagnostic manager instance.
+///
const DiagnosticRequest diagnostic_message_t::build_diagnostic_request()
{
return {/*arbitration_id: */OBD2_FUNCTIONAL_BROADCAST_ID,
@@ -97,11 +97,11 @@ const DiagnosticRequest diagnostic_message_t::build_diagnostic_request()
/*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.
-*/
+///
+/// @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.
+///
bool diagnostic_message_t::is_obd2_request(const DiagnosticRequest* request)
{
return request->mode == 0x1 && request->has_pid && request->pid < 0xff;
diff --git a/src/diagnostic/diagnostic-message.hpp b/src/diagnostic/diagnostic-message.hpp
index b25fea34..064904d2 100644
--- a/src/diagnostic/diagnostic-message.hpp
+++ b/src/diagnostic/diagnostic-message.hpp
@@ -38,17 +38,17 @@ enum UNIT {
INVALID
};
-/**
- * @brief - A representation of an OBD-II PID.
- */
+///
+/// @brief - A representation of an OBD-II PID.
+///
class diagnostic_message_t {
private:
- uint8_t pid_; /*!< pid - The 1 byte PID.*/
+ uint8_t pid_; /*!< pid_ - The 1 byte PID.*/
std::string generic_name_; /*!< generic_name_ - A human readable name to use for this PID when published.*/
int min_; /*!< min_ - Minimum value that can take this pid */
int max_; /*!< max_ - Maximum value that can take this pid */
enum UNIT unit_; /*!< unit_ : Which unit system is used by that pid. See enum UNIT above.*/
- float frequency_; /*!< frequency - The frequency to request this PID if supported by the vehicle when automatic, recurring OBD-II requests are enabled.*/
+ float frequency_; /*!< frequency_ - The frequency to request this PID if supported by the vehicle when automatic, recurring OBD-II requests are enabled.*/
DiagnosticResponseDecoder decoder_; /*!< decoder_ - An optional DiagnosticResponseDecoder to parse the payload of responses
* to this request. If the decoder is NULL, the output will include the raw payload
* instead of a parsed value.*/