Macros
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:

Go to the source code of this file.

Macros

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

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


Definition in file tcpserial.cpp.

Macro Definition Documentation

◆ DBG

#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

Definition at line 91 of file tcpserial.cpp.

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

Definition at line 83 of file tcpserial.cpp.



sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Wed Mar 2 2022 01:00:59