summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
54f33f5)
Bug-AGL: SPEC-2988
Change-Id: I81c01a817cd31d577068350d8445a1df2751bff7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
std::shared_ptr<message_t> message = s->read_message();
// Sure we got a valid CAN message ?
std::shared_ptr<message_t> message = s->read_message();
// Sure we got a valid CAN message ?
- if (message->get_id() && message->get_length() && !(message->get_flags() & INVALID_FLAG))
+ if (message->get_id() &&
+ message->get_length() &&
+ ! (message->get_flags() & INVALID_FLAG) )
push_n_notify(message);
}
}
push_n_notify(message);
}
}
std::lock_guard<std::mutex> subscribed_signals_lock(sm.get_subscribed_signals_mutex());
map_subscription& s = sm.get_subscribed_signals();
if(application_t::instance().get_diagnostic_manager().is_diagnostic_response(message))
std::lock_guard<std::mutex> subscribed_signals_lock(sm.get_subscribed_signals_mutex());
map_subscription& s = sm.get_subscribed_signals();
if(application_t::instance().get_diagnostic_manager().is_diagnostic_response(message))
process_diagnostic_signals(application_t::instance().get_diagnostic_manager(), message, s);
process_diagnostic_signals(application_t::instance().get_diagnostic_manager(), message, s);
else
process_signals(message, s);
}
else
process_signals(message, s);
}
bool message_definition_t::is_isotp() const
{
bool message_definition_t::is_isotp() const
{
- return (flags_&ISOTP_PROTOCOL);
+ return (flags_ & ISOTP_PROTOCOL);
}
vect_ptr_signal_t& message_definition_t::get_signals()
}
vect_ptr_signal_t& message_definition_t::get_signals()
- * @brief This is to use when you have a big endian CAN frame layout.
- * It converts the bit position so it matches with little endiant CAN frame layout.
+ * @brief This is to use when you have a big endian CAN frame layout.
+ * It converts the bit position so it matches with little endiant CAN frame layout.
*
* @param bit_position Original bit position.
* @param bit_size Size of the data.
*
* @param bit_position Original bit position.
* @param bit_size Size of the data.
- * @return uint32_t New little endian bit position.
+ * @return uint32_t New bit position.
*/
uint32_t converter_t::bit_position_swap(uint32_t bit_position,uint32_t bit_size)
{
*/
uint32_t converter_t::bit_position_swap(uint32_t bit_position,uint32_t bit_size)
{
if(nbytes < 0)
return nullptr;
if(nbytes < 0)
return nullptr;
- //AFB_DEBUG("Data available: %i bytes read", (int)nbytes);
-
struct timeval tv;
ioctl(socket(), SIOCGSTAMP, &tv);
uint64_t timestamp = 1000000 * tv.tv_sec + tv.tv_usec;
struct timeval tv;
ioctl(socket(), SIOCGSTAMP, &tv);
uint64_t timestamp = 1000000 * tv.tv_sec + tv.tv_usec;