You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#ifndef __SERIALPORT_H_INCL__
#define __SERIALPORT_H_INCL__
#include <stdio.h> // standard input / output functions
#include <stdlib.h>
#include <string.h> // string function definitions
#include <fcntl.h> // File control definitions
#include <errno.h> // Error number definitions
#ifdef __linux__
#include <unistd.h> // UNIX standard function definitions
#include <termios.h> // POSIX terminal control definitions
#else
#endif
#ifdef DEBUG
//#define _DEBUG_SERIAL_COMMUNICATION_
#endif
#include "../../data/transport/transportSerial.h"
/**
* TODO: Add class description * * @author gagua */class serialPort: public transportSerial { private: basicLogCollection *m_pLog;#ifdef __linux__
struct termios m_sTTY; int m_iInFID; int m_iOutFID;#else
DCB PortDCB; HANDLE m_ioFID;#endif
CSTR m_sDevicePath; int m_iLineSpeed; bool m_bInitComplete; bool HW_init( CSTR DevicePath, int Speed ); protected: int sendBlock( unsigned char *Data, int DataSize ); int recptBlock( unsigned char *Buffer, int *BufferLength ); public: serialPort(); serialPort( CSTR DevicePath, int Speed ); ~serialPort(); bool addRecipient( protocolParser *ProtoParser );};
#endif // __SERIALPORT_H_INCL__
|