SDHLibrary-CPP 0.0.2.10SCHUNK GmbH & Co. KG
C++ access library for SCHUNK Dextrous Hand SDH

sdh/tcpserial.cpp File Reference

Implementation of class SDH::cTCPSerial, a class to access a TCP port on cygwin/linux and Visual Studio. More...

#include "sdhlibrary_settings.h"
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <unistd.h>
#include <fcntl.h>
#include <iostream>
#include <exception>
#include <string>
#include <assert.h>
#include "tcpserial.h"
#include "simpletime.h"
Include dependency graph for tcpserial.cpp:

Defines

#define SDH_TCP_DEBUG   1
#define DBG(...)

Detailed Description

Implementation of class SDH::cTCPSerial, a class to access a TCP port on cygwin/linux and Visual Studio.

General file information

Author:
Dirk Osswald
Date:
2010-10-30

Copyright

Copyright (c) 2010 SCHUNK GmbH & Co. KG



Define Documentation

#define DBG (   ...)
Value:
do {                    \
        __VA_ARGS__;        \
    } while (0)

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

#define SDH_TCP_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_cTCPSerial_object.dbg.SetFlag(1).

This 2 level scheme is used since this is the lowlevel communication, so debug outputs might really steal some performance.