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

#include <CanPeakSys.h>

Inheritance diagram for CanPeakSys:
Inheritance graph
[legend]

Public Member Functions

 CanPeakSys (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 nSecTimeout)
 
bool transmitMsg (CanMsg CMsg, bool bBlocking=true)
 
 ~CanPeakSys ()
 
- Public Member Functions inherited from CanItf
CanItfType getCanItfType ()
 
void setCanItfType (CanItfType iType)
 
virtual ~CanItf ()
 

Private Attributes

bool m_bInitialized
 
bool m_bSimuEnabled
 
HANDLE m_handle
 
IniFile m_IniFile
 

Static Private Attributes

static const int c_iInterrupt = 7
 
static const int c_iPort = 0x378
 

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 CanPeakSys.h.

Constructor & Destructor Documentation

CanPeakSys::CanPeakSys ( const char *  cIniFile)

Definition at line 32 of file CanPeakSys.cpp.

CanPeakSys::~CanPeakSys ( )

Definition at line 42 of file CanPeakSys.cpp.

Member Function Documentation

void CanPeakSys::destroy ( )
inline

Definition at line 34 of file CanPeakSys.h.

void CanPeakSys::init ( )
virtual

Initializes the CAN bus.

Implements CanItf.

Definition at line 58 of file CanPeakSys.cpp.

bool CanPeakSys::init_ret ( )
virtual

Initializes the CAN bus and returns success.

Implements CanItf.

Definition at line 51 of file CanPeakSys.cpp.

bool CanPeakSys::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 39 of file CanPeakSys.h.

bool CanPeakSys::receiveMsg ( CanMsg pCMsg)
virtual

Reads a CAN message.

Returns
true if a message is available

Implements CanItf.

Definition at line 147 of file CanPeakSys.cpp.

bool CanPeakSys::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 184 of file CanPeakSys.cpp.

bool CanPeakSys::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 229 of file CanPeakSys.cpp.

bool CanPeakSys::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 117 of file CanPeakSys.cpp.

Member Data Documentation

const int CanPeakSys::c_iInterrupt = 7
staticprivate

Definition at line 49 of file CanPeakSys.h.

const int CanPeakSys::c_iPort = 0x378
staticprivate

Definition at line 50 of file CanPeakSys.h.

bool CanPeakSys::m_bInitialized
private

Definition at line 45 of file CanPeakSys.h.

bool CanPeakSys::m_bSimuEnabled
private

Definition at line 47 of file CanPeakSys.h.

HANDLE CanPeakSys::m_handle
private

Definition at line 43 of file CanPeakSys.h.

IniFile CanPeakSys::m_IniFile
private

Definition at line 46 of file CanPeakSys.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