CanMsg Class Reference
#include <CanMsg.h>
List of all members.
Public Member Functions |
| CanMsg () |
void | get (BYTE *pData0, BYTE *pData1, BYTE *pData2, BYTE *pData3, BYTE *pData4, BYTE *pData5, BYTE *pData6, BYTE *pData7) |
int | getAt (int iNr) |
int | getCmd () |
int | getID () |
int | getLength () |
int | getStatus () |
int | getType () |
void | print () |
int | printCanIdentMsgStatus () |
void | set (BYTE Data0=0, BYTE Data1=0, BYTE Data2=0, BYTE Data3=0, BYTE Data4=0, BYTE Data5=0, BYTE Data6=0, BYTE Data7=0) |
void | setAt (BYTE data, int iNr) |
void | setID (int id) |
void | setLength (int len) |
void | setType (int type) |
Public Attributes |
int | m_iID |
int | m_iLen |
int | m_iType |
Protected Attributes |
BYTE | m_bDat [8] |
Detailed Description
Represents a CAN message.
Definition at line 37 of file CanMsg.h.
Constructor & Destructor Documentation
CanMsg::CanMsg |
( |
|
) |
[inline] |
Default constructor.
Definition at line 57 of file CanMsg.h.
Member Function Documentation
void CanMsg::get |
( |
BYTE * |
pData0, |
|
|
BYTE * |
pData1, |
|
|
BYTE * |
pData2, |
|
|
BYTE * |
pData3, |
|
|
BYTE * |
pData4, |
|
|
BYTE * |
pData5, |
|
|
BYTE * |
pData6, |
|
|
BYTE * |
pData7 | |
|
) |
| | [inline] |
Gets the bytes of the telegram.
Definition at line 90 of file CanMsg.h.
int CanMsg::getAt |
( |
int |
iNr |
) |
[inline] |
Returns a spezific byte of the telegram.
- Parameters:
-
Definition at line 106 of file CanMsg.h.
int CanMsg::getCmd |
( |
|
) |
[inline] |
int CanMsg::getID |
( |
|
) |
[inline] |
Get the identifier stored in this message structure.
- Returns:
- the message identifier.
Definition at line 160 of file CanMsg.h.
int CanMsg::getLength |
( |
|
) |
[inline] |
Get the message length set within this data structure.
- Returns:
- The message length in the range [0..8].
Definition at line 180 of file CanMsg.h.
int CanMsg::getStatus |
( |
|
) |
[inline] |
int CanMsg::getType |
( |
|
) |
[inline] |
Get the message type. By default, the type is 0x00.
- Returns:
- The message type.
Definition at line 199 of file CanMsg.h.
void CanMsg::print |
( |
|
) |
[inline] |
Prints the telegram.
Definition at line 132 of file CanMsg.h.
int CanMsg::printCanIdentMsgStatus |
( |
|
) |
[inline] |
Prints the telegram to the standard output.
- Deprecated:
- function uses a spetific format of the telegram.
Definition at line 115 of file CanMsg.h.
void CanMsg::set |
( |
BYTE |
Data0 = 0 , |
|
|
BYTE |
Data1 = 0 , |
|
|
BYTE |
Data2 = 0 , |
|
|
BYTE |
Data3 = 0 , |
|
|
BYTE |
Data4 = 0 , |
|
|
BYTE |
Data5 = 0 , |
|
|
BYTE |
Data6 = 0 , |
|
|
BYTE |
Data7 = 0 | |
|
) |
| | [inline] |
Sets the bytes to the telegram.
Definition at line 67 of file CanMsg.h.
void CanMsg::setAt |
( |
BYTE |
data, |
|
|
int |
iNr | |
|
) |
| | [inline] |
Set the byte at the given position.
Definition at line 82 of file CanMsg.h.
void CanMsg::setID |
( |
int |
id |
) |
[inline] |
Set the message identifier within this message structure.
- Parameters:
-
| id | The message identifier. Its value must be in the range [0..2047], i.e. 29-bit identifiers are not supported here. |
Definition at line 170 of file CanMsg.h.
void CanMsg::setLength |
( |
int |
len |
) |
[inline] |
Set the message length within this message structure.
- Parameters:
-
| len | The message length. Its value must be in the range [0..8]. |
Definition at line 189 of file CanMsg.h.
void CanMsg::setType |
( |
int |
type |
) |
[inline] |
Set the message type. By default, the type is 0x00.
- Parameters:
-
Definition at line 208 of file CanMsg.h.
Member Data Documentation
A CAN message consists of eight bytes.
Definition at line 51 of file CanMsg.h.
The documentation for this class was generated from the following file: