Public Member Functions | Private Attributes
SerialDevice Class Reference

#include <serial_device.h>

List of all members.

Public Member Functions

bool checkIfStillThere ()
void closePort ()
bool FlushInBuffer ()
bool FlushOutBuffer ()
unsigned char GetChar ()
void GetString (std::string &rxstr)
void GetStringWithEndline (std::string &rxstr)
int openPort (std::string, int, int, int)
int PutString (std::string)
 SerialDevice ()
 standard includes
 ~SerialDevice ()

Private Attributes

int fd_

Detailed Description

Definition at line 6 of file serial_device.h.


Constructor & Destructor Documentation

standard includes

self includes

Definition at line 15 of file serial_device.cpp.

Definition at line 20 of file serial_device.cpp.


Member Function Documentation

Definition at line 126 of file serial_device.cpp.

Definition at line 121 of file serial_device.cpp.

Definition at line 171 of file serial_device.cpp.

Definition at line 180 of file serial_device.cpp.

unsigned char SerialDevice::GetChar ( )

Definition at line 188 of file serial_device.cpp.

void SerialDevice::GetString ( std::string &  rxstr)

Definition at line 141 of file serial_device.cpp.

void SerialDevice::GetStringWithEndline ( std::string &  rxstr)

Definition at line 156 of file serial_device.cpp.

int SerialDevice::openPort ( std::string  device,
int  baud,
int  Parity,
int  StopBits 
)

inserts '/dev/' infront of device name

attempt to open the serial device

open(2) returns <0 if the port could NOT be opened

linux serial port stuff

sets serial port baudrate

for input

for output

adjust stop bits

set data to 8-bit

load configuration. tcsetattr(3) returns <0 if error

Canonical mode

load configuration. tcsetattr(3) returns <0 if error

alles richtig!

Definition at line 29 of file serial_device.cpp.

int SerialDevice::PutString ( std::string  str)

write(3) returns the number of bytes that were actually written

Definition at line 131 of file serial_device.cpp.


Member Data Documentation

int SerialDevice::fd_ [private]

Definition at line 31 of file serial_device.h.


The documentation for this class was generated from the following files:


cob_3d_mapping_demonstrator
Author(s): Georg Arbeiter
autogenerated on Wed Aug 26 2015 11:03:46