OpenJAUS Software Development Kit  4.3.1
Public Member Functions | Protected Attributes | Friends | List of all members
openjaus::system::SerialPort Class Reference

This is a brief description. More...

#include <SerialPort.h>

Public Member Functions

 SerialPort ()
 
virtual ~SerialPort ()
 
bool open (int portNumber, int baudRate_bps)
 Operation open. More...
 
bool open (std::string portName, int baudRate_bps)
 Operation open. More...
 
bool close ()
 Operation close. More...
 
int send (Buffer &packet)
 Operation send. More...
 
int receive (Buffer &packet)
 Operation receive. More...
 
bool setPortSettings (int baudRate_bps, int byteSize_bits, int parity, int stopBits)
 Operation setPortSettings. More...
 
int getBaudRate_bps ()
 Operation getBaudRate_bps. More...
 
int getByteSize_bits ()
 Operation getByteSize_bits. More...
 
int getParity ()
 Operation getParity. More...
 
int getStopBits ()
 Operation getStopBits. More...
 
bool setSendTimeouts (int multiplier_ms, int constant_ms)
 Operation setSendTimeouts. More...
 
bool setRecvTimeouts (int multiplier_ms, int constant_ms)
 Operation setRecvTimeouts. More...
 
bool isOpen ()
 Operation isOpen. More...
 
virtual std::string toString () const
 

Protected Attributes

int portFile
 

Friends

OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const SerialPort &object)
 
OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const SerialPort *object)
 

Detailed Description

Detailed description.

Author
Name (name@.nosp@m.emai.nosp@m.l.com)

Constructor & Destructor Documentation

§ SerialPort()

openjaus::system::SerialPort::SerialPort ( )

§ ~SerialPort()

openjaus::system::SerialPort::~SerialPort ( )
virtual

Member Function Documentation

§ close()

bool openjaus::system::SerialPort::close ( )

§ getBaudRate_bps()

int openjaus::system::SerialPort::getBaudRate_bps ( )

§ getByteSize_bits()

int openjaus::system::SerialPort::getByteSize_bits ( )

§ getParity()

int openjaus::system::SerialPort::getParity ( )

§ getStopBits()

int openjaus::system::SerialPort::getStopBits ( )

§ isOpen()

bool openjaus::system::SerialPort::isOpen ( )

§ open() [1/2]

bool openjaus::system::SerialPort::open ( int  portNumber,
int  baudRate_bps 
)
Parameters
portNumber
baudRate_bps

§ open() [2/2]

bool openjaus::system::SerialPort::open ( std::string  portName,
int  baudRate_bps 
)
Parameters
portName
baudRate_bps

§ receive()

int openjaus::system::SerialPort::receive ( Buffer packet)
Parameters
packet

§ send()

int openjaus::system::SerialPort::send ( Buffer packet)
Parameters
packet

§ setPortSettings()

bool openjaus::system::SerialPort::setPortSettings ( int  baudRate_bps,
int  byteSize_bits,
int  parity,
int  stopBits 
)
Parameters
baudRate_bps
byteSize_bits
parity
stopBits

§ setRecvTimeouts()

bool openjaus::system::SerialPort::setRecvTimeouts ( int  multiplier_ms,
int  constant_ms 
)
Parameters
multiplier_ms
constant_ms

§ setSendTimeouts()

bool openjaus::system::SerialPort::setSendTimeouts ( int  multiplier_ms,
int  constant_ms 
)
Parameters
multiplier_ms
constant_ms

§ toString()

std::string openjaus::system::SerialPort::toString ( ) const
virtual

Friends And Related Function Documentation

§ operator<< [1/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const SerialPort object 
)
friend

§ operator<< [2/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const SerialPort object 
)
friend

Member Data Documentation

§ portFile

int openjaus::system::SerialPort::portFile
protected

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