-loorb $(ORBLIBS) #include "oorb.h" namespace Oorb
class Orb class OrbPacket class OrbConnection class Queue class Configure
class Task class ConfigMgrTask class Master class OrbConnectionTask class OrbReaderTask class OrbWriterTask class LogMgrTask class SignalMgrTask class StateMgrTask class StatusMgrTask class CommandMgrTask
class Exception class EOFException class StuffException
% cat Makefile BIN= simple_orb2orb MAN1= ldlibs= -loorb $(ORBLIBS) CLEAN= include $(ANTELOPEMAKE) OBJS= simple_orb2orb.o $(BIN): $(OBJS) $(CXX) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) %.o: %.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ % cat simple_orb2orb.cc #include "oorb.h" class SimpleConfigMgrTask : public Oorb::ConfigMgrTask { public: SimpleConfigMgrTask( int argc, char** argv ) : Oorb::ConfigMgrTask( argc, argv ) { return; }; ~SimpleConfigMgrTask( void ) { return; }; void run( void ); std::string usage( void ) { return std::string( this->m_programName ) + " orbin orbout"; }; }; void SimpleConfigMgrTask::run( void ) { std::string reader; std::string writer; Pf* pfconnection; this->init_run(); if( m_argc != 3 ) { Om->log()->die_initializing( true, "Two orb names required" ); } else { Om->addOrb( m_argv[1] ); Om->addOrb( m_argv[2] ); } reader = std::string( "" ) + "name reader \n" + "direction read \n" + "run true \n" + "read_from_orbname " + m_argv[1] + "\n" + "read_from_orbtag \n" + "write_to_queue mainq \n" + "match \n" + "reject \n" + "starttime \n" + "endtime \n" + "too_old \n" + "too_new \n" + "check_unstuff false \n" + "suppress_unstuff_errors true \n" + "verbose notify \n" ; pfconnection = pfnew( PFARR ); pfcompile( (char*) reader.c_str(), &pfconnection ); Om->addConnection( pfconnection ); pffree( pfconnection ); writer = std::string( "" ) + "name writer \n" + "direction write \n" + "run true \n" + "read_from_queue mainq \n" + "write_to_orbname " + m_argv[2] + "\n" + "write_to_orbtag \n" + "max_queue 100 \n" + "match \n" + "reject \n" + "acknowledge false \n" + "verbose notify \n" ; pfconnection = pfnew( PFARR ); pfcompile( (char*) writer.c_str(), &pfconnection ); Om->addConnection( pfconnection ); pffree( pfconnection ); this->announceTaskReady(); this->finalize_run(); } std::shared_ptr<Oorb::Master> Om; int main( int argc, char** argv ) { std::shared_ptr<SimpleConfigMgrTask> config; config = std::make_shared<SimpleConfigMgrTask>( argc, argv ); Om = std::make_shared<Oorb::Master>( config ); Om->log()->startMsg(); Om->run(); Om->log()->finishMsg(); return( 0 ); } %
orb2orb(1), orbserver(1), orb(3), OorbBasics(3), OorbExceptions(3), Oorb::Configure(3), Oorb::OrbPacket(3), Oorb::Queue(3), Oorb::OrbConnection(3), Oorb::Task(3), Oorb::Master(3), Oorb::ConfigMgrTask(3), Oorb::LogMgrTask(3), Oorb::SignalMgrTask(3), Oorb::StateMgrTask(3), Oorb::StatusMgrTask(3), Oorb::CommandMgrTask(3), Oorb::OrbConnectionTask(3), Oorb::OrbReaderTask(3), Oorb::OrbWriterTask(3), Oorb::Filter(3), OorbFilters(3)