CanMsg Class Reference
#include <CanMsg.h>
List of all members.
Public Types |
typedef unsigned char | BYTE |
| Include typedefs from windows.h.
|
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 65 of file CanMsg.h.
Member Typedef Documentation
Constructor & Destructor Documentation
CanMsg::CanMsg |
( |
|
) |
[inline] |
Default constructor.
Definition at line 87 of file CanMsg.h.
Member Function Documentation
Gets the bytes of the telegram.
Definition at line 120 of file CanMsg.h.
int CanMsg::getAt |
( |
int |
iNr |
) |
[inline] |
Returns a spezific byte of the telegram.
- Parameters:
-
Definition at line 136 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 190 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 210 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 229 of file CanMsg.h.
void CanMsg::print |
( |
|
) |
[inline] |
Prints the telegram.
Definition at line 162 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 145 of file CanMsg.h.
Sets the bytes to the telegram.
Definition at line 97 of file CanMsg.h.
void CanMsg::setAt |
( |
BYTE |
data, |
|
|
int |
iNr | |
|
) |
| | [inline] |
Set the byte at the given position.
Definition at line 112 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 200 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 219 of file CanMsg.h.
void CanMsg::setType |
( |
int |
type |
) |
[inline] |
Set the message type. By default, the type is 0x00.
- Parameters:
-
Definition at line 238 of file CanMsg.h.
Member Data Documentation
A CAN message consists of eight bytes.
Definition at line 81 of file CanMsg.h.
The documentation for this class was generated from the following file: