#include <SocketCan.h>
Definition at line 29 of file SocketCan.h.
◆ SocketCan() [1/2]
SocketCan::SocketCan |
( |
const char * |
device, |
|
|
int |
baudrate |
|
) |
| |
◆ SocketCan() [2/2]
SocketCan::SocketCan |
( |
const char * |
device | ) |
|
◆ ~SocketCan()
SocketCan::~SocketCan |
( |
| ) |
|
◆ init()
◆ init_ret()
bool SocketCan::init_ret |
( |
| ) |
|
|
virtual |
Initializes the CAN bus and returns success.
Implements CanItf.
Definition at line 54 of file SocketCan.cpp.
◆ isObjectMode()
bool SocketCan::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 42 of file SocketCan.h.
◆ print_error()
void SocketCan::print_error |
( |
const can::State & |
state | ) |
|
|
private |
◆ receiveMsg()
bool SocketCan::receiveMsg |
( |
CanMsg * |
pCMsg | ) |
|
|
virtual |
Reads a CAN message.
- Returns
- true if a message is available
Implements CanItf.
Definition at line 96 of file SocketCan.cpp.
◆ receiveMsgRetry()
bool SocketCan::receiveMsgRetry |
( |
CanMsg * |
pCMsg, |
|
|
int |
iNrOfRetry |
|
) |
| |
|
virtual |
Reads a CAN message. The function blocks between the attempts.
- Parameters
-
pCMsg | CAN message |
iNrOfRetry | number of retries |
- Returns
- true if a message is available
Implements CanItf.
Definition at line 118 of file SocketCan.cpp.
◆ receiveMsgTimeout()
bool SocketCan::receiveMsgTimeout |
( |
CanMsg * |
pCMsg, |
|
|
int |
nMicroSecTimeout |
|
) |
| |
|
virtual |
Reads a CAN message with timeout.
- Parameters
-
pCMsg | CAN message |
nMicroSecTimeout | timeout in us |
- Returns
- true if a message is available
Implements CanItf.
Definition at line 147 of file SocketCan.cpp.
◆ transmitMsg()
bool SocketCan::transmitMsg |
( |
CanMsg |
CMsg, |
|
|
bool |
bBlocking = true |
|
) |
| |
|
virtual |
Sends a CAN message.
- Parameters
-
pCMsg | CAN message |
bBlocking | specifies whether send should be blocking or non-blocking |
Implements CanItf.
Definition at line 84 of file SocketCan.cpp.
◆ m_bInitialized
bool SocketCan::m_bInitialized |
|
private |
◆ m_handle
◆ m_reader
◆ p_cDevice
const char* SocketCan::p_cDevice |
|
private |
The documentation for this class was generated from the following files: