// -*- C++ -*- // // $Id$ // **** Code generated by the The ACE ORB (TAO) IDL Compiler **** // TAO and the TAO IDL Compiler have been developed by: // Center for Distributed Object Computing // Washington University // St. Louis, MO // USA // http://www.cs.wustl.edu/~schmidt/doc-center.html // and // Distributed Object Computing Laboratory // University of California at Irvine // Irvine, CA // USA // http://doc.ece.uci.edu/ // and // Institute for Software Integrated Systems // Vanderbilt University // Nashville, TN // USA // http://www.isis.vanderbilt.edu/ // // Information about TAO is available at: // http://www.cs.wustl.edu/~schmidt/TAO.html // TAO_IDL - Generated from // be/be_codegen.cpp:1063 #include "Executor_i.h" #include "orbsvcs/CosNamingC.h" #include #include // Implementation skeleton constructor Executor_ExecCmd_i::Executor_ExecCmd_i () { } Executor_ExecCmd_i::Executor_ExecCmd_i (int argc, char* argv[], CORBA::ORB_var orb) { try{ // get RTORB CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); std::cout<<"RTORB ok"<resolve_initial_references("NameService"); CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); CosNaming::Name name(1); name.length(1); // Connect to Receiver name[0].id = CORBA::string_dup("Receiver"); // receive Object CORBA::Object_var benchObj = namingContext->resolve(name); put = Receiver::Put::_narrow(benchObj.in()); std::cout<<"TransferObjekt ok"<resolve(name); display = Controller::Display::_narrow(benchObj.in()); std::cout<<"DisplayObjekt ok"<connect(); put->allPorts(0, 0, 0); sleep(1); put->allPorts(255, 255, 255); sleep(1); put->allPorts(0, 0, 0); display->show("ready!!!"); }catch(CORBA::Exception &e){ std::cout<show("moving..."); for(int i = 0; i<255; i++){ put->allPorts(i,i,i); } break; case 2: display->show("blinking..."); std::cout<<"blink"<allPorts(255,255,255); else put->allPorts(0,0,0); } break; case 3: display->show("flashing..."); std::cout<<"flash"<allPorts(255,255,255); else put->allPorts(0,0,0); } break; default: std::cout<<"Mode not implemented"<allPorts(one, two, three); return true; }