sta-core/src/can/id.cpp

27 lines
581 B
C++

#include <sta/bus/can/id.hpp>
namespace sta
{
bool operator ==(const CanId & lhs, const CanId & rhs)
{
return (lhs.sid == rhs.sid && lhs.eid == rhs.eid);
}
bool operator !=(const CanId & lhs, const CanId & rhs)
{
return !(lhs == rhs);
}
bool operator ==(const CanFrameId & lhs, const CanFrameId & rhs)
{
return (lhs.format == rhs.format && lhs.sid == rhs.sid && lhs.eid == rhs.eid);
}
bool operator !=(const CanFrameId & lhs, const CanFrameId & rhs)
{
return !(lhs == rhs);
}
} // namespace sta