summaryrefslogtreecommitdiffstats
path: root/low-can-binding/can/message
diff options
context:
space:
mode:
Diffstat (limited to 'low-can-binding/can/message')
-rw-r--r--low-can-binding/can/message/can-message.cpp14
-rw-r--r--low-can-binding/can/message/can-message.hpp12
-rw-r--r--low-can-binding/can/message/j1939-message.cpp6
-rw-r--r--low-can-binding/can/message/message.cpp4
-rw-r--r--low-can-binding/can/message/message.hpp2
5 files changed, 19 insertions, 19 deletions
diff --git a/low-can-binding/can/message/can-message.cpp b/low-can-binding/can/message/can-message.cpp
index 1f73c27e..5c3e0f0e 100644
--- a/low-can-binding/can/message/can-message.cpp
+++ b/low-can-binding/can/message/can-message.cpp
@@ -204,12 +204,12 @@ struct std::vector<canfd_frame> can_message_t::convert_to_canfd_frame_vector()
std::vector<uint8_t> data = get_data_vector((i*64),(i*64)+63);
if(data.size()<64)
{
- ::memset(frame.data,0,sizeof(frame.data));
- ::memcpy(frame.data,data.data(),data.size());
+ ::memset(frame.data, 0, sizeof(frame.data));
+ ::memcpy(frame.data, data.data(), data.size());
}
else
{
- ::memcpy(frame.data,data.data(),64);
+ ::memcpy(frame.data, data.data(), 64);
}
ret.push_back(frame);
i++;
@@ -226,13 +226,13 @@ struct std::vector<canfd_frame> can_message_t::convert_to_canfd_frame_vector()
std::vector<uint8_t> data = get_data_vector(i*8,(i*8)+7);
if(data.size()<8)
{
- ::memset(frame.data,0,sizeof(frame.data));
- ::memcpy(frame.data,data.data(),data.size());
+ ::memset(frame.data, 0, sizeof(frame.data));
+ ::memcpy(frame.data, data.data(), data.size());
}
else
{
- ::memset(frame.data,0,sizeof(frame.data));
- ::memcpy(frame.data,data.data(),8);
+ ::memset(frame.data, 0, sizeof(frame.data));
+ ::memcpy(frame.data, data.data(), 8);
}
ret.push_back(frame);
i++;
diff --git a/low-can-binding/can/message/can-message.hpp b/low-can-binding/can/message/can-message.hpp
index acc3bfc1..9d501a25 100644
--- a/low-can-binding/can/message/can-message.hpp
+++ b/low-can-binding/can/message/can-message.hpp
@@ -40,12 +40,12 @@ class can_message_t : public message_t {
public:
can_message_t();
can_message_t( uint32_t maxdlen,
- uint32_t id,
- uint32_t length,
- bool rtr_flag_,
- uint32_t flags,
- std::vector<uint8_t>& data,
- uint64_t timestamp);
+ uint32_t id,
+ uint32_t length,
+ bool rtr_flag_,
+ uint32_t flags,
+ std::vector<uint8_t>& data,
+ uint64_t timestamp);
uint32_t get_id() const;
void set_id(const canid_t id);
diff --git a/low-can-binding/can/message/j1939-message.cpp b/low-can-binding/can/message/j1939-message.cpp
index 432a1393..3740ea20 100644
--- a/low-can-binding/can/message/j1939-message.cpp
+++ b/low-can-binding/can/message/j1939-message.cpp
@@ -94,7 +94,7 @@ uint8_t j1939_message_t::get_addr() const{
/// @param[in] timestamp - timestamp of the message
///
/// @return A j1939_message_t object fully initialized with sockaddr_can and data values.
-std::shared_ptr<j1939_message_t> j1939_message_t::convert_from_addr(struct sockaddr_can& addr, uint8_t (&data)[128],size_t nbytes, uint64_t timestamp)
+std::shared_ptr<j1939_message_t> j1939_message_t::convert_from_addr(struct sockaddr_can& addr, uint8_t (&data)[128], size_t nbytes, uint64_t timestamp)
{
int i;
uint32_t length = 0;
@@ -112,7 +112,7 @@ std::shared_ptr<j1939_message_t> j1939_message_t::convert_from_addr(struct socka
data_vector.clear();
std::string data_string;
- data_string = converter_t::to_hex(data,length);
+ data_string = converter_t::to_hex(data, length);
for(i=0;i<length;i++)
{
@@ -122,7 +122,7 @@ std::shared_ptr<j1939_message_t> j1939_message_t::convert_from_addr(struct socka
AFB_DEBUG("Found pgn: %X, length: %X, data %s",
addr.can_addr.j1939.pgn, length, data_string.c_str());
- return std::make_shared<j1939_message_t>(j1939_message_t(length, data_vector, timestamp,addr.can_addr.j1939.name,addr.can_addr.j1939.pgn,addr.can_addr.j1939.addr));
+ return std::make_shared<j1939_message_t>(j1939_message_t(length, data_vector, timestamp, addr.can_addr.j1939.name, addr.can_addr.j1939.pgn, addr.can_addr.j1939.addr));
}
/// @brief Test if members pgn_ and length are set.
diff --git a/low-can-binding/can/message/message.cpp b/low-can-binding/can/message/message.cpp
index 2496b672..2a23ca5a 100644
--- a/low-can-binding/can/message/message.cpp
+++ b/low-can-binding/can/message/message.cpp
@@ -83,7 +83,7 @@ const uint8_t* message_t::get_data() const
/// @return pointer to the first element
/// of class member data_
///
-const std::vector<uint8_t> message_t::get_data_vector(int start,int end) const
+const std::vector<uint8_t> message_t::get_data_vector(int start, int end) const
{
std::vector<uint8_t> ret;
if(start >= 0)
@@ -105,7 +105,7 @@ const std::vector<uint8_t> message_t::get_data_vector(int start,int end) const
}
else
{
- AFB_ERROR("Error index to get data vector, [%d-%d] - for length %d",start,end,length_);
+ AFB_ERROR("Error index to get data vector, [%d-%d] - for length %d", start, end, length_);
}
return ret;
}
diff --git a/low-can-binding/can/message/message.hpp b/low-can-binding/can/message/message.hpp
index 1a31a8d4..7f13ac47 100644
--- a/low-can-binding/can/message/message.hpp
+++ b/low-can-binding/can/message/message.hpp
@@ -66,7 +66,7 @@ public:
int get_sub_id() const;
const uint8_t* get_data() const;
const std::vector<uint8_t> get_data_vector() const;
- const std::vector<uint8_t> get_data_vector(int start,int end) const;
+ const std::vector<uint8_t> get_data_vector(int start, int end) const;
uint32_t get_length() const;
uint64_t get_timestamp() const;