Public Member Functions | Private Member Functions | Private Attributes
PtyPort Class Reference

#include <port.h>

Inheritance diagram for PtyPort:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PtyPort (const char *path, struct pollfd *pollfd_ptr)
virtual ssize_t read (void *buf, size_t count)
virtual ssize_t write (void *buf, size_t count)
virtual ~PtyPort ()

Private Member Functions

void _create_pty ()
void _respawn_pty ()

Private Attributes

const char * m_path
int m_slavefd

Detailed Description

Pseudo terminal port class

Definition at line 73 of file port.h.


Constructor & Destructor Documentation

PtyPort::PtyPort ( const char *  path,
struct pollfd *  pollfd_ptr 
)

Create a pseudo terminal enpoint.

Parameters:
pathPath where a symlink to the pty device should be created.

Definition at line 115 of file port.cpp.

PtyPort::~PtyPort ( ) [virtual]

Close this pseudo terminal endpoint.

Definition at line 128 of file port.cpp.


Member Function Documentation

void PtyPort::_create_pty ( ) [private]

Creates a pseudo terminal device and sets the symlink at m_path to point to it

Definition at line 139 of file port.cpp.

void PtyPort::_respawn_pty ( ) [private]

Re-creates the pty, if a user process has closed it

Definition at line 193 of file port.cpp.

ssize_t PtyPort::read ( void *  buf,
size_t  count 
) [virtual]

Reads a single char from this PTY. May respawn the pty if it has been closed by a user process.

Parameters:
chA pointer to a single char. If a char is available, it will be written here.

Implements Port.

Definition at line 205 of file port.cpp.

ssize_t PtyPort::write ( void *  buf,
size_t  count 
) [virtual]

Writes a single char to this PTY. May respawn the pty if it has been closed by a user process.

Parameters:
chThe char to write

Implements Port.

Definition at line 227 of file port.cpp.


Member Data Documentation

const char* PtyPort::m_path [private]

Definition at line 75 of file port.h.

int PtyPort::m_slavefd [private]

Definition at line 76 of file port.h.


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


kingfisher_bringup
Author(s): Mike Purvis, Ryan Gariepy
autogenerated on Sat Dec 28 2013 17:08:06