Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
CanMsg Class Reference

#include <CanMsg.h>

Public Types

typedef unsigned char BYTE
 Include typedefs from windows.h. More...
 

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 28 of file CanMsg.h.

Member Typedef Documentation

typedef unsigned char CanMsg::BYTE

Include typedefs from windows.h.

Definition at line 32 of file CanMsg.h.

Constructor & Destructor Documentation

CanMsg::CanMsg ( )
inline

Default constructor.

Definition at line 50 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 83 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 99 of file CanMsg.h.

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

Definition at line 144 of file CanMsg.h.

int CanMsg::getID ( )
inline

Get the identifier stored in this message structure.

Returns
the message identifier.

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

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

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

void CanMsg::print ( )
inline

Prints the telegram.

Definition at line 125 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 108 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 60 of file CanMsg.h.

void CanMsg::setAt ( BYTE  data,
int  iNr 
)
inline

Set the byte at the given position.

Definition at line 75 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 163 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 182 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 201 of file CanMsg.h.

Member Data Documentation

BYTE CanMsg::m_bDat[8]
protected

A CAN message consists of eight bytes.

Definition at line 44 of file CanMsg.h.

int CanMsg::m_iID
Todo:
This should be private.

Definition at line 34 of file CanMsg.h.

int CanMsg::m_iLen
Todo:
This should be private.

Definition at line 36 of file CanMsg.h.

int CanMsg::m_iType
Todo:
This should be private.

Definition at line 38 of file CanMsg.h.


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


cob_generic_can
Author(s): Christian Connette
autogenerated on Wed Apr 7 2021 02:11:52