#include <CanItf.h>
Public Types | |
enum | CanItfType { CAN_PEAK = 0, CAN_PEAK_USN = 1, CAN_ESD = 2, CAN_DUMMY = 3, CAN_BECKHOFF = 4 } |
Public Member Functions | |
CanItfType | getCanItfType () |
virtual void | init ()=0 |
virtual bool | isObjectMode ()=0 |
virtual bool | receiveMsg (CanMsg *pCMsg)=0 |
virtual bool | receiveMsgRetry (CanMsg *pCMsg, int iNrOfRetry)=0 |
void | setCanItfType (CanItfType iType) |
virtual bool | transmitMsg (CanMsg CMsg, bool bBlocking=true)=0 |
virtual | ~CanItf () |
Private Attributes | |
CanItfType | m_iCanItfType |
The CAN interface type. |
General interface of the CAN bus.
Definition at line 33 of file CanItf.h.
enum CanItf::CanItfType |
virtual CanItf::~CanItf | ( | ) | [inline, virtual] |
CanItfType CanItf::getCanItfType | ( | ) | [inline] |
virtual void CanItf::init | ( | ) | [pure virtual] |
Initializes the CAN bus.
Implemented in CanESD.
virtual bool CanItf::isObjectMode | ( | ) | [pure virtual] |
Check if the current CAN interface was opened on OBJECT mode.
Implemented in CanESD.
virtual bool CanItf::receiveMsg | ( | CanMsg * | pCMsg | ) | [pure virtual] |
virtual bool CanItf::receiveMsgRetry | ( | CanMsg * | pCMsg, | |
int | iNrOfRetry | |||
) | [pure virtual] |
Reads a CAN message. The function blocks between the attempts.
pCMsg | CAN message | |
iNrOfRetry | number of retries |
Implemented in CanESD.
void CanItf::setCanItfType | ( | CanItfType | iType | ) | [inline] |
virtual bool CanItf::transmitMsg | ( | CanMsg | CMsg, | |
bool | bBlocking = true | |||
) | [pure virtual] |
Sends a CAN message.
pCMsg | CAN message | |
bBlocking | specifies whether send should be blocking or non-blocking |
Implemented in CanESD.
CanItfType CanItf::m_iCanItfType [private] |