Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CANPeakSysUSB Class Reference

#include <CanPeakSysUSB.h>

Inheritance diagram for CANPeakSysUSB:
Inheritance graph
[legend]

Public Member Functions

 CANPeakSysUSB (const char *device, int baudrate)
 
 CANPeakSysUSB (const char *cIniFile)
 
void destroy ()
 
void init ()
 
bool init_ret ()
 
bool isObjectMode ()
 
bool receiveMsg (CanMsg *pCMsg)
 
bool receiveMsgRetry (CanMsg *pCMsg, int iNrOfRetry)
 
bool receiveMsgTimeout (CanMsg *pCMsg, int nMicroSeconds)
 
bool transmitMsg (CanMsg CMsg, bool bBlocking=true)
 
 ~CANPeakSysUSB ()
 
- Public Member Functions inherited from CanItf
CanItfType getCanItfType ()
 
void setCanItfType (CanItfType iType)
 
virtual ~CanItf ()
 

Private Member Functions

bool initCAN ()
 
void outputDetailedStatus ()
 

Private Attributes

bool m_bInitialized
 
bool m_bSimuEnabled
 
HANDLE m_handle
 
int m_iBaudrateVal
 
IniFile m_IniFile
 
const char * p_cDevice
 

Static Private Attributes

static const int c_iInterrupt
 
static const int c_iPort
 

Additional Inherited Members

- Public Types inherited from CanItf
enum  CanItfType {
  CAN_PEAK = 0, CAN_PEAK_USB = 1, CAN_ESD = 2, CAN_DUMMY = 3,
  CAN_BECKHOFF = 4, CAN_SOCKETCAN = 5
}
 

Detailed Description

Definition at line 26 of file CanPeakSysUSB.h.

Constructor & Destructor Documentation

CANPeakSysUSB::CANPeakSysUSB ( const char *  device,
int  baudrate 
)

Definition at line 30 of file CanPeakSysUSB.cpp.

CANPeakSysUSB::CANPeakSysUSB ( const char *  cIniFile)

Definition at line 38 of file CanPeakSysUSB.cpp.

CANPeakSysUSB::~CANPeakSysUSB ( )

Definition at line 49 of file CanPeakSysUSB.cpp.

Member Function Documentation

void CANPeakSysUSB::destroy ( )
inline

Definition at line 35 of file CanPeakSysUSB.h.

void CANPeakSysUSB::init ( )
virtual

Initializes the CAN bus.

Implements CanItf.

Definition at line 79 of file CanPeakSysUSB.cpp.

bool CANPeakSysUSB::init_ret ( )
virtual

Initializes the CAN bus and returns success.

Implements CanItf.

Definition at line 58 of file CanPeakSysUSB.cpp.

bool CANPeakSysUSB::initCAN ( )
private

Definition at line 278 of file CanPeakSysUSB.cpp.

bool CANPeakSysUSB::isObjectMode ( )
inlinevirtual

Check if the current CAN interface was opened on OBJECT mode.

Returns
true if opened in OBJECT mode, false if not.

Implements CanItf.

Definition at line 40 of file CanPeakSysUSB.h.

void CANPeakSysUSB::outputDetailedStatus ( )
private

Definition at line 323 of file CanPeakSysUSB.cpp.

bool CANPeakSysUSB::receiveMsg ( CanMsg pCMsg)
virtual

Reads a CAN message.

Returns
true if a message is available

Implements CanItf.

Definition at line 160 of file CanPeakSysUSB.cpp.

bool CANPeakSysUSB::receiveMsgRetry ( CanMsg pCMsg,
int  iNrOfRetry 
)
virtual

Reads a CAN message. The function blocks between the attempts.

Parameters
pCMsgCAN message
iNrOfRetrynumber of retries
Returns
true if a message is available

Implements CanItf.

Definition at line 199 of file CanPeakSysUSB.cpp.

bool CANPeakSysUSB::receiveMsgTimeout ( CanMsg pCMsg,
int  nMicroSecTimeout 
)
virtual

Reads a CAN message with timeout.

Parameters
pCMsgCAN message
nMicroSecTimeouttimeout in us
Returns
true if a message is available

Implements CanItf.

Definition at line 245 of file CanPeakSysUSB.cpp.

bool CANPeakSysUSB::transmitMsg ( CanMsg  CMsg,
bool  bBlocking = true 
)
virtual

Sends a CAN message.

Parameters
pCMsgCAN message
bBlockingspecifies whether send should be blocking or non-blocking

Implements CanItf.

Definition at line 105 of file CanPeakSysUSB.cpp.

Member Data Documentation

const int CANPeakSysUSB::c_iInterrupt
staticprivate

Definition at line 52 of file CanPeakSysUSB.h.

const int CANPeakSysUSB::c_iPort
staticprivate

Definition at line 53 of file CanPeakSysUSB.h.

bool CANPeakSysUSB::m_bInitialized
private

Definition at line 46 of file CanPeakSysUSB.h.

bool CANPeakSysUSB::m_bSimuEnabled
private

Definition at line 48 of file CanPeakSysUSB.h.

HANDLE CANPeakSysUSB::m_handle
private

Definition at line 44 of file CanPeakSysUSB.h.

int CANPeakSysUSB::m_iBaudrateVal
private

Definition at line 50 of file CanPeakSysUSB.h.

IniFile CANPeakSysUSB::m_IniFile
private

Definition at line 47 of file CanPeakSysUSB.h.

const char* CANPeakSysUSB::p_cDevice
private

Definition at line 49 of file CanPeakSysUSB.h.


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


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