My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::mediator::ReceiverControl::Script Struct Reference

Public Types

enum  Status { NONE, FAILED, OK }
 
enum  State { DONE, START, BODY, END }
 
enum  Type { ERROR, MESSAGE, STATUS }
 

Public Member Functions

 Script (std::string script, unsigned seq, std::string dir)
 
int stdInFd ()
 
int stdOutFd ()
 
int stdErrFd ()
 
void open (std::string fileName)
 
void close ()
 
unsigned copyFromStdoutToFile ()
 
unsigned readFromStdErr ()
 
void processMessage ()
 
void setMessageType ()
 

Public Attributes

gcp::util::CoProcproc_
 
std::ofstream outFile_
 
gcp::util::PortstdOut_
 
gcp::util::PortstdErr_
 
unsigned tagCount_
 
std::ostringstream startTag_
 
std::ostringstream message_
 
std::ostringstream endTag_
 
State messageState_
 
Type messageType_
 
unsigned seq_
 
Status status_
 
bool stdOutWasClosed_
 
bool stdErrWasClosed_
 
std::string script_
 

Member Function Documentation

void ReceiverControl::Script::close ( )

....................................................................... Open a file for this register in the requested directory

unsigned ReceiverControl::Script::copyFromStdoutToFile ( )

....................................................................... Copy data from the stdout pipe of the process to the output file

void ReceiverControl::Script::open ( std::string  fileName)

....................................................................... Open a file for this register in the requested directory

void ReceiverControl::Script::processMessage ( )

....................................................................... Process a message received on stderr

unsigned ReceiverControl::Script::readFromStdErr ( )

....................................................................... Read the next available data from stderr

Look for message strings of the form

%%BEGIN_ERROR %%BEGIN_MESSAGE %%BEGIN_STATUS


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