Implementation of class #SDH::cCANSerial_PEAK, a class to access a PEAK CAN interface on cygwin/linux and Visual Studio. More...
#include "sdhlibrary_settings.h"#include <fcntl.h>#include <stdio.h>#include <unistd.h>#include <iostream>#include <exception>#include <stdarg.h>#include <assert.h>#include "canserial-peak.h"#include "simpletime.h"#include "util.h"
Go to the source code of this file.
Classes | |
| class | cCANSerial_PEAK_Internal |
| internal hardware specific implementation details of the lowlevel PEAK CAN interface More... | |
Macros | |
| #define | DBG(...) |
| #define | M_CMSG_MSG() m_cmsg |
| #define | SDH_CANSERIAL_PEAK_DEBUG 1 |
| #define | USE_HANDLE(H_) |
| #define | USE_HANDLES(H_) |
Typedefs | |
| typedef void * | PCAN_HANDLE |
| Linux libpcan uses HANDLE where Windows Pcan_usb.h uses no handle at all: More... | |
Functions | |
| char const * | PEAK_strerror (DWORD rc) |
Implementation of class #SDH::cCANSerial_PEAK, a class to access a PEAK CAN interface on cygwin/linux and Visual Studio.
Definition in file canserial-peak.cpp.
| #define DBG | ( | ... | ) |
instead of guarding every debug output with #if SDH_CANSERIAL_PEAK_DEBUG / #endif we use this DBG macro that expands to a stream output to a dbg object or to ";" depending on the value of SDH_CANSERIAL_PEAK_DEBUG
Definition at line 99 of file canserial-peak.cpp.
| #define M_CMSG_MSG | ( | ) | m_cmsg |
Definition at line 149 of file canserial-peak.cpp.
| #define SDH_CANSERIAL_PEAK_DEBUG 1 |
Flag, if true then code for debug messages is included.
The debug messages must still be enabled at run time by setting the some_cRS232_object.dbg.SetFlag(1).
This 2 level scheme is used since this is the lowlevel communication, so debug outputs might really steal some performance.
Definition at line 92 of file canserial-peak.cpp.
| #define USE_HANDLE | ( | H_ | ) |
Definition at line 77 of file canserial-peak.cpp.
| #define USE_HANDLES | ( | H_ | ) |
Definition at line 76 of file canserial-peak.cpp.
| typedef void* PCAN_HANDLE |
Linux libpcan uses HANDLE where Windows Pcan_usb.h uses no handle at all:
Definition at line 79 of file canserial-peak.cpp.
| char const* PEAK_strerror | ( | DWORD | rc | ) |
Definition at line 209 of file canserial-peak.cpp.