From 2eb313e5330dbfa1b6eab146b3698d8ffe054347 Mon Sep 17 00:00:00 2001 From: ydimitrov Date: Fri, 18 May 2018 21:12:14 +0100 Subject: Fixing typos made in comments This change set fixes the comments made by previous contributors v2: Fix line end v3: Making changes to comments as suggested by reviewers v4: Removing trailing spaces v5: Clearing small typo in low-can-cb.cpp on line 142 Change-Id: Ifbcfc3b2d131d1db0b25e472955b21e98cc09f45 Signed-off-by: ydimitrov --- low-can-binding/can/can-bus-device.hpp | 8 ++++---- low-can-binding/can/can-bus.cpp | 6 +++--- low-can-binding/can/can-bus.hpp | 10 +++++----- low-can-binding/can/can-decoder.cpp | 6 +++--- low-can-binding/can/can-encoder.cpp | 4 ++-- low-can-binding/can/can-message-set.cpp | 4 ++-- low-can-binding/can/can-message-set.hpp | 4 ++-- low-can-binding/can/can-message.cpp | 8 ++++---- low-can-binding/can/can-signals.hpp | 4 ++-- 9 files changed, 27 insertions(+), 27 deletions(-) (limited to 'low-can-binding/can') diff --git a/low-can-binding/can/can-bus-device.hpp b/low-can-binding/can/can-bus-device.hpp index af705515..c53e5f23 100644 --- a/low-can-binding/can/can-bus-device.hpp +++ b/low-can-binding/can/can-bus-device.hpp @@ -45,12 +45,12 @@ private: std::string name; std::string device_name; float max_message_frequency; // >& s); void can_decode_message(); - std::thread th_decoding_; ///< thread that'll handle decoding a can frame + std::thread th_decoding_; ///< thread that will handle decoding a can frame bool is_decoding_ = false; ///< boolean member controling thread while loop void can_event_push(); - std::thread th_pushing_; ///< thread that'll handle pushing decoded can frame to subscribers + std::thread th_pushing_; ///< thread that will handle pushing decoded can frame to subscribers bool is_pushing_ = false; ///< boolean member controling thread while loop std::condition_variable new_can_message_cv_; ///< condition_variable use to wait until there is a new CAN message to read std::mutex can_message_mutex_; ///< mutex protecting the can_message_q_ queue. - std::queue can_message_q_; ///< queue that'll store can_message_t to decoded + std::queue can_message_q_; ///< queue that will store can_message_t to be decoded std::condition_variable new_decoded_can_message_; ///< condition_variable use to wait until there is a new vehicle message to read from the queue vehicle_message_q_ std::mutex decoded_can_message_mutex_; ///< mutex protecting the vehicle_message_q_ queue. - std::queue > vehicle_message_q_; ///< queue that'll store openxc_VehicleMessage to pushed + std::queue > vehicle_message_q_; ///< queue that will store openxc_VehicleMessage to be pushed std::vector > can_devices_mapping_; ///< can_devices_mapping_ - holds a mapping between logical CAN devices names and linux CAN devices names. public: diff --git a/low-can-binding/can/can-decoder.cpp b/low-can-binding/can/can-decoder.cpp index 0c81d7a6..763bfcb0 100644 --- a/low-can-binding/can/can-decoder.cpp +++ b/low-can-binding/can/can-decoder.cpp @@ -22,10 +22,10 @@ #include "can-message-definition.hpp" #include "../binding/low-can-hat.hpp" -/// @brief Parse the signal's bitfield from the given data and return the raw +/// @brief Parses the signal's bitfield from the given data and returns the raw /// value. /// -/// @param[in] signal - The signal to parse from the data. +/// @param[in] signal - The signal to be parsed from the data. /// @param[in] message - can_message_t to parse /// /// @return Returns the raw value of the signal parsed as a bitfield from the given byte @@ -38,7 +38,7 @@ float decoder_t::parse_signal_bitfield(can_signal_t& signal, const can_message_t signal.get_offset()); } -/// @brief Wrap a raw CAN signal value in a DynamicField without modification. +/// @brief Wraps a raw CAN signal value in a DynamicField without modification. /// /// This is an implementation of the Signal type signature, and can be /// used directly in the can_signal_t.decoder field. diff --git a/low-can-binding/can/can-encoder.cpp b/low-can-binding/can/can-encoder.cpp index 5dc632b3..d90e08da 100644 --- a/low-can-binding/can/can-encoder.cpp +++ b/low-can-binding/can/can-encoder.cpp @@ -21,10 +21,10 @@ #include "../utils/openxc-utils.hpp" #include "can-message-definition.hpp" -/// @brief Write a value into a CAN signal in the destination buffer. +/// @brief Write a value in a CAN signal in the destination buffer. /// /// @param[in] signal - The CAN signal to write, including the bit position and bit size. -/// @param[in] value - The encoded integer value to write into the CAN signal. +/// @param[in] value - The encoded integer value to write in the CAN signal. /// @param[out] data - The destination buffer. /// @param[in] length - The length of the destination buffer. /// diff --git a/low-can-binding/can/can-message-set.cpp b/low-can-binding/can/can-message-set.cpp index c31dec62..a5cf8819 100644 --- a/low-can-binding/can/can-message-set.cpp +++ b/low-can-binding/can/can-message-set.cpp @@ -31,7 +31,7 @@ can_message_set_t::can_message_set_t( , diagnostic_messages_{diagnostic_messages} {} -/// @brief Return vector holding all message definition handled by this message set. +/// @brief Returns a vector holding all message definitions which are handled by this message set. std::vector >& can_message_set_t::get_can_message_definition() { return can_messages_definition_; @@ -52,7 +52,7 @@ std::vector > can_message_set_t::get_all_can_signa return can_signals; } -/// @brief Return vector holding all diagnostic messages definitions handled by this message set. +/// @brief Returns a vector holding all diagnostic message definitions which are handled by this message set. std::vector >& can_message_set_t::get_diagnostic_messages() { return diagnostic_messages_; diff --git a/low-can-binding/can/can-message-set.hpp b/low-can-binding/can/can-message-set.hpp index bf53c8c5..59c27b1a 100644 --- a/low-can-binding/can/can-message-set.hpp +++ b/low-can-binding/can/can-message-set.hpp @@ -32,9 +32,9 @@ class diagnostic_message_t; class can_message_set_t { private: - uint8_t index_; /// < A numerical ID for the message set, ideally the index in an array for fast lookup + uint8_t index_; /// < A numerical ID for the message set, ideally the index is in an array for fast lookup const std::string name_; /// < The name of the message set. - std::vector > can_messages_definition_; ///< Vector holding all message definition handled by this message set. + std::vector > can_messages_definition_; ///< Vector holding all message definitions handled by the message set. std::vector > diagnostic_messages_; ///< Vector holding all diagnostics messages from JSON signals description file. First vector map to message set public: diff --git a/low-can-binding/can/can-message.cpp b/low-can-binding/can/can-message.cpp index 8221e303..1b27d0f6 100644 --- a/low-can-binding/can/can-message.cpp +++ b/low-can-binding/can/can-message.cpp @@ -24,7 +24,7 @@ /// /// @brief Class constructor /// -/// Constructor about can_message_t class. +/// can_message_t class constructor. /// can_message_t::can_message_t() : maxdlen_{0}, @@ -167,7 +167,7 @@ bool can_message_t::is_correct_to_send() /// @brief Set format_ member value. /// -/// Preferred way to initialize these members by using +/// Preferred way to initialize these members is to use /// convert_from_canfd_frame method. /// /// @param[in] new_format - class member @@ -346,7 +346,7 @@ can_message_t can_message_t::convert_from_frame(const struct can_frame& frame, s return can_message_t(maxdlen, id, length, format, rtr_flag, flags, data, timestamp); } -/// @brief Take all initialized class's members and build an +/// @brief Take all initialized class members and build a /// canfd_frame struct that can be use to send a CAN message over /// the bus. /// @@ -367,7 +367,7 @@ struct canfd_frame can_message_t::convert_to_canfd_frame() return frame; } -/// @brief Take all initialized class's members and build an +/// @brief Take all initialized class members and build a /// can_frame struct that can be use to send a CAN message over /// the bus. /// diff --git a/low-can-binding/can/can-signals.hpp b/low-can-binding/can/can-signals.hpp index ea8c077b..31e0c6a6 100644 --- a/low-can-binding/can/can-signals.hpp +++ b/low-can-binding/can/can-signals.hpp @@ -43,8 +43,8 @@ class can_signal_t; /// @param[in] signalCount - The length of the signals array. /// @param[in] value - The CAN signal parsed from the message as a raw floating point /// value. -/// @param[out] send - An output parameter. If the decoding failed or the CAN signal should -/// not send for some other reason, this should be flipped to false. +/// @param[out] send - An output parameter. If decoding fails or CAN signal is +/// not sending, this should be flipped to false. /// /// @return a decoded value in an openxc_DynamicField struct. /// -- cgit 1.2.3-korg