mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-09-28 21:17:33 +00:00
Move CAN interface to STA Core library
This commit is contained in:
26
src/can/id.cpp
Normal file
26
src/can/id.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <sta/intf/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
|
Reference in New Issue
Block a user