Stellarium  0.17.0
Public Member Functions | Protected Member Functions
SerialPort Class Reference

Serial interface connection.

#include <SerialPort.hpp>

Public Member Functions

 SerialPort (Server &server, const char *serial_device)
 Class constructor. More...
 
virtual bool isClosed (void) const
 Returns true if the connection is closed. More...
 
- Public Member Functions inherited from Connection
 Connection (Server &server, SOCKET fd)
 
long long int getServerMinusClientTime (void) const
 
- Public Member Functions inherited from Socket
void hangup ()
 

Protected Member Functions

void prepareSelectFds (fd_set &, fd_set &, int &)
 
- Protected Member Functions inherited from Connection
void performReading (void)
 Receives data from a TCP/IP connection and stores it in the read buffer.
 
void performWriting (void)
 Sends the contents of the write buffer over a TCP/IP connection.
 
- Protected Member Functions inherited from Socket
 Socket (Server &server, SOCKET fd)
 
int readNonblocking (void *buf, int count)
 
int writeNonblocking (const void *buf, int count)
 

Additional Inherited Members

- Protected Attributes inherited from Connection
char read_buff [120]
 
char * read_buff_end
 
char write_buff [120]
 
char * write_buff_end
 
- Protected Attributes inherited from Socket
Serverserver
 
SOCKET fd
 

Constructor & Destructor Documentation

SerialPort::SerialPort ( Server server,
const char *  serial_device 
)
Parameters
serial_deviceA string containing the name of a serial port. On UNIX systems, this should be something like "/dev/ttyS0". On Microsoft Windows systems, this should be something like "COM1:".

Member Function Documentation

virtual bool SerialPort::isClosed ( void  ) const
inlinevirtual

This method has different platform-dependent implementations.

Reimplemented from Socket.