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

Defines | Functions

# sdh/rs232-cygwin.cpp File Reference

Implementation of class SDH::cRS232, a class to access serial RS232 port on cygwin/linux. More...

`#include "sdhlibrary_settings.h"`
`#include <fcntl.h>`
`#include <termios.h>`
`#include <stdio.h>`
`#include <unistd.h>`
`#include <errno.h>`
`#include <sys/select.h>`
`#include <sys/ioctl.h>`
`#include <iostream>`
`#include <exception>`
`#include <string>`
`#include <stdarg.h>`
`#include <cstring>`
`#include "rs232-cygwin.h"`
`#include "simpletime.h"`
Include dependency graph for rs232-cygwin.cpp:

## Defines
#define | SDH_RS232_CYGWIN_DEBUG 1
#define | DBG(...)
## Functions
char * | StrDupNew (char *const s)
| helper function, duplicate string s into a char array allocated with new[]

## Detailed Description

Implementation of class SDH::cRS232, a class to access serial RS232 port on cygwin/linux.

## General file information

Author:
  Dirk Osswald

Date:
  2007-02-20

## Copyright

Copyright (c) 2007 SCHUNK GmbH & Co. KG

## Define Documentation

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

Value:

    do {                    \
            __VA_ARGS__;        \
        } while (0)

instead of guarding every debug output with #if SDH_RS232_CYGWIN_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_RS232_CYGWIN_DEBUG

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

## Function Documentation

char* StrDupNew | ( | char *const | s | ) |

helper function, duplicate string s into a char array allocated with new[]