SDHLibrary-CPP 0.0.2.10 C++ access library for SCHUNK Dextrous Hand SDH

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Classes | Namespaces | Defines | Typedefs | Functions

# sdh/canserial-peak.cpp File Reference

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"`
Include dependency graph for canserial-peak.cpp:

## Classes
class | SDH::cCANSerial_PEAK_Internal
| internal hardware specific implementation details of the lowlevel PEAK CAN interface More...
## Namespaces
namespace | SDH
## Defines
#define | USE_HANDLES(H_)
#define | USE_HANDLE(H_)
#define | SDH_CANSERIAL_PEAK_DEBUG 1
#define | DBG(...)
#define | M_CMSG_MSG() m_cmsg
## Typedefs
typedef void * | SDH::PCAN_HANDLE
| Linux libpcan uses HANDLE where Windows Pcan_usb.h uses no handle at all:
## Functions
char const * | PEAK_strerror (DWORD rc)

## Detailed Description

Implementation of class SDH::cCANSerial_PEAK, a class to access a PEAK CAN interface on cygwin/linux and Visual Studio.

## General file information

Author:
  Steffen Ruehl, Dirk Osswald

Date:
  2009-07-29

## Define Documentation

#define DBG | ( |  | ... | ) |

Value:

    do {                    \
            __VA_ARGS__;        \
        } while (0)

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

#define M_CMSG_MSG | ( |  | ) | m_cmsg

#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.

#define USE_HANDLE | ( |  | H_ | ) |

#define USE_HANDLES | ( |  | H_ | ) |

## Function Documentation

char const* PEAK_strerror | ( | DWORD | rc | ) |