Public Types | Public Member Functions | Public Attributes | Protected Attributes
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

typedef unsigned char CanMsg::BYTE

Include typedefs from windows.h.

Definition at line 69 of file CanMsg.h.


Constructor & Destructor Documentation

CanMsg::CanMsg ( ) [inline]

Default constructor.

Definition at line 87 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 120 of file CanMsg.h.

int CanMsg::getAt ( int  iNr) [inline]

Returns a spezific byte of the telegram.

Parameters:
iNrnumber of the byte.

Definition at line 136 of file CanMsg.h.

int CanMsg::getCmd ( ) [inline]
Deprecated:
function uses a spetific format of the telegram.

Definition at line 181 of file CanMsg.h.

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]
Deprecated:
function uses a spetific format of the telegram.

Definition at line 172 of file CanMsg.h.

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.

Prints the telegram to the standard output.

Deprecated:
function uses a spetific format of the telegram.

Definition at line 145 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 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:
idThe 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:
lenThe 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:
typeThe message type.

Definition at line 238 of file CanMsg.h.


Member Data Documentation

BYTE CanMsg::m_bDat[8] [protected]

A CAN message consists of eight bytes.

Definition at line 81 of file CanMsg.h.

Todo:
This should be private.

Definition at line 71 of file CanMsg.h.

Todo:
This should be private.

Definition at line 73 of file CanMsg.h.

Todo:
This should be private.

Definition at line 75 of file CanMsg.h.


The documentation for this class was generated from the following file:


cob_generic_can
Author(s): Christian Connette
autogenerated on Thu Aug 27 2015 12:45:37