2 #ifndef _osaCANBusFrame_h
3 #define _osaCANBusFrame_h
25 typedef unsigned short ID;
27 typedef unsigned short Mask;
30 typedef unsigned char Data;
87 << std::hex << std::setfill(
'0') << std::setw(4)
88 << (int)frame.
GetID() << std::endl
89 <<
"Length: " << (int)frame.
GetLength() << std::endl
92 os <<
"0x" << std::hex << std::setfill(
'0') << std::setw(2)
93 << (int)(frame.
data[i]) <<
" ";
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
A vector object of dynamic size.
Definition: vctDynamicVector.h:127
ID GetID() const
Return the identifier of the frame.
Definition: osaCANBusFrame.h:68
DataLength nbytes
The lenght of the message in bytes.
Definition: osaCANBusFrame.h:47
DataField data
The message (8 bytes)
Definition: osaCANBusFrame.h:44
unsigned short Mask
Definition: osaCANBusFrame.h:27
unsigned char Data
The data type.
Definition: osaCANBusFrame.h:30
unsigned short ID
The id of a CAN frame.
Definition: osaCANBusFrame.h:25
friend std::ostream & operator<<(std::ostream &os, const osaCANBusFrame &frame)
Output the can frame.
Definition: osaCANBusFrame.h:85
Data * GetData()
Return a pointer to the data.
Definition: osaCANBusFrame.h:74
DataLength GetLength() const
Return the length in bytes of the data.
Definition: osaCANBusFrame.h:71
const Data * GetData() const
Return a const pointer to the data.
Definition: osaCANBusFrame.h:77
unsigned char DataLength
The data length type.
Definition: osaCANBusFrame.h:36
CAN frame implementation.
Definition: osaCANBusFrame.h:16
ID id
The ID of the node origin.
Definition: osaCANBusFrame.h:41