-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate ecaludp #51
Conversation
first integration draft for sender
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
m_created = true; | ||
} | ||
|
||
CSampleSender::~CSampleSender() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: an exception may be thrown in function '~CSampleSender' which should not throw exceptions [bugprone-exception-escape]
CSampleSender::~CSampleSender()
^
// s2 Bytes serialized sample | ||
// ------------------------------------------------ | ||
unsigned short s1 = static_cast<unsigned short>(sample_name_.size()); | ||
size_t s2 = serialized_sample_.size(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 's2' of type 'size_t' (aka 'unsigned long') can be declared 'const' [misc-const-correctness]
size_t s2 = serialized_sample_.size(); | |
size_t const s2 = serialized_sample_.size(); |
// ------------------------------------------------ | ||
unsigned short s1 = static_cast<unsigned short>(sample_name_.size()); | ||
size_t s2 = serialized_sample_.size(); | ||
asio::const_buffer sample_name_size_asio_buffer(&s1, 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'sample_name_size_asio_buffer' of type 'asio::const_buffer' can be declared 'const' [misc-const-correctness]
asio::const_buffer sample_name_size_asio_buffer(&s1, 2); | |
asio::const_buffer const sample_name_size_asio_buffer(&s1, 2); |
unsigned short s1 = static_cast<unsigned short>(sample_name_.size()); | ||
size_t s2 = serialized_sample_.size(); | ||
asio::const_buffer sample_name_size_asio_buffer(&s1, 2); | ||
asio::const_buffer sample_name_asio_buffer(sample_name_.data(), s1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'sample_name_asio_buffer' of type 'asio::const_buffer' can be declared 'const' [misc-const-correctness]
asio::const_buffer sample_name_asio_buffer(sample_name_.data(), s1); | |
asio::const_buffer const sample_name_asio_buffer(sample_name_.data(), s1); |
size_t s2 = serialized_sample_.size(); | ||
asio::const_buffer sample_name_size_asio_buffer(&s1, 2); | ||
asio::const_buffer sample_name_asio_buffer(sample_name_.data(), s1); | ||
asio::const_buffer serialized_sample_asio_buffer(serialized_sample_.data(), s2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'serialized_sample_asio_buffer' of type 'asio::const_buffer' can be declared 'const' [misc-const-correctness]
asio::const_buffer serialized_sample_asio_buffer(serialized_sample_.data(), s2); | |
asio::const_buffer const serialized_sample_asio_buffer(serialized_sample_.data(), s2); |
//std::cout << "UDP Sample Buffer Sent (" << std::to_string(sent_sum) << " Bytes)" << std::endl;; | ||
// notify waiting main thread | ||
{ | ||
std::lock_guard<std::mutex> lock(send_mtx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'lock' of type 'std::lock_guardstd::mutex' can be declared 'const' [misc-const-correctness]
std::lock_guard<std::mutex> lock(send_mtx); | |
std::lock_guard<std::mutex> const lock(send_mtx); |
Description
Replace eCAL asio native udp socket handling with ecaludp.