pion::plugins::ScriptReactor Class Reference

#include <ScriptReactor.hpp>

Inherits pion::platform::Reactor.

List of all members.


Detailed Description

ScriptReactor: interfaces with an external shell script or program

Definition at line 67 of file ScriptReactor.hpp.

Public Member Functions

 ScriptReactor (void)
 constructs a new ScriptReactor object
virtual ~ScriptReactor ()
 virtual destructor: this class is meant to be extended
virtual void start (void)
 called by the ReactorEngine to start Event processing
virtual void stop (void)
 called by the ReactorEngine to stop Event processing
virtual void setConfig (const pion::platform::Vocabulary &v, const xmlNodePtr config_ptr)
virtual void updateVocabulary (const pion::platform::Vocabulary &v)
virtual void updateCodecs (void)
virtual void process (const pion::platform::EventPtr &e)
void setLogger (PionLogger log_ptr)
 sets the logger to be used
PionLogger getLogger (void)
 returns the logger currently in use

Classes

class  CommandParsingException
 exception thrown if there is a problem parsing arguments out of the command string More...
class  EmptyCommandException
 exception thrown if the Reactor configuration does not define a Command More...
class  EmptyInputCodecException
 exception thrown if the Reactor configuration does not define an Input Codec More...
class  EmptyOutputCodecException
 exception thrown if the Reactor configuration does not define an Output Codec More...
class  OpenPipeException
 exception thrown if opening a pipe to the shell command fails More...
class  ReadFromPipeException
 exception thrown if the Reactor has trouble reading events from the pipe More...
class  WriteToPipeException
 exception thrown if the Reactor has trouble writing events to the pipe More...


Member Function Documentation

void pion::plugins::ScriptReactor::process ( const pion::platform::EventPtr e  )  [virtual]

processes an Event by delivering it to the shell script or program

Parameters:
e pointer to the Event to process

Reimplemented from pion::platform::Reactor.

Definition at line 190 of file ScriptReactor.cpp.

References pion::platform::PlatformPlugin::getId().

void pion::plugins::ScriptReactor::setConfig ( const pion::platform::Vocabulary v,
const xmlNodePtr  config_ptr 
) [virtual]

sets configuration parameters for this Reactor

Parameters:
v the Vocabulary that this Reactor will use to describe Terms
config_ptr pointer to a list of XML nodes containing Reactor configuration parameters

Reimplemented from pion::platform::Reactor.

Definition at line 127 of file ScriptReactor.cpp.

References pion::platform::Reactor::ConfigWriteLock, pion::platform::CodecFactory::getCodec(), pion::platform::PlatformPlugin::getCodecFactory(), pion::platform::PlatformPlugin::getId(), and start().

void pion::plugins::ScriptReactor::updateCodecs ( void   )  [virtual]

this updates the Codecs that are used by this Reactor; it should be called whenever any Codec's configuration is updated

Reimplemented from pion::platform::Reactor.

Definition at line 175 of file ScriptReactor.cpp.

References pion::platform::Reactor::ConfigWriteLock, pion::platform::CodecFactory::getCodec(), pion::platform::PlatformPlugin::getCodecFactory(), and stop().

void pion::plugins::ScriptReactor::updateVocabulary ( const pion::platform::Vocabulary v  )  [virtual]

this updates the Vocabulary information used by this Reactor; it should be called whenever the global Vocabulary is updated

Parameters:
v the Vocabulary that this Reactor will use to describe Terms

Reimplemented from pion::platform::Reactor.

Definition at line 162 of file ScriptReactor.cpp.

References pion::platform::Reactor::ConfigWriteLock.


The documentation for this class was generated from the following files:
Generated on Wed Apr 13 16:38:36 2011 for pion-platform by  doxygen 1.4.7