chat.cc File Reference

#include "config.h"
#include "robIO.h"
#include "term.h"

Include dependency graph for chat.cc:

Go to the source code of this file.

Functions

void printUsage (string path)
void termWrite (IWriter *writer, const string &data)
 write datat to terminal
bool termRead (ICharReader *reader)
 read data from terminal
int main (int argc, char *argv[])

Variables

static const char * stty = "stty"
 stty(1) command
static const char * sttyInitString = "5:4:800004bf:a30:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0"
 stty(1) tty init argument
static const int dtPingTimeout = 1000
 timeout per read begin
static const int dtCharTimeout = 100
 timeout per read of char
static const char * histFile = ".rob08_terminal_history"
 readline history file


Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 84 of file chat.cc.

References StreamDecorator::C_LIGHT_GREEN, StreamDecorator::C_NO_COLOR, TermFactory::createTerm(), StreamDecorator::E_ERROR, StreamDecorator::E_NOTE, StreamDecorator::E_WARNING, ICharReader::getChar(), ICharReader::hasInput(), histFile, printUsage(), stty, sttyInitString, termRead(), and termWrite().

Here is the call graph for this function:

void printUsage ( string  path  ) 

print application usage in usual way

Parameters:
path path to application

Definition at line 58 of file chat.cc.

Referenced by main().

Here is the caller graph for this function:

bool termRead ( ICharReader reader  ) 

read data from terminal

Definition at line 72 of file chat.cc.

References StreamDecorator::C_LIGHT_BLUE, StreamDecorator::C_NO_COLOR, dtCharTimeout, dtPingTimeout, ICharReader::getChar(), and ICharReader::hasInput().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void termWrite ( IWriter writer,
const string &  data 
)

write datat to terminal

Definition at line 63 of file chat.cc.

References StreamDecorator::C_NO_COLOR, StreamDecorator::C_YELLOW, and IWriter::writeText().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const int dtCharTimeout = 100 [static]

timeout per read of char

Definition at line 49 of file chat.cc.

Referenced by termRead().

const int dtPingTimeout = 1000 [static]

timeout per read begin

Definition at line 46 of file chat.cc.

Referenced by termRead().

const char* histFile = ".rob08_terminal_history" [static]

readline history file

Definition at line 52 of file chat.cc.

Referenced by main().

const char* stty = "stty" [static]

stty(1) command

Definition at line 40 of file chat.cc.

Referenced by main().

const char* sttyInitString = "5:4:800004bf:a30:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0" [static]

stty(1) tty init argument

Definition at line 43 of file chat.cc.

Referenced by main().


Generated on Fri Jul 10 22:42:02 2009 for rob08 by  doxygen 1.5.4