ControlTaskI.h

00001 /***************************************************************************
00002   tag: Peter Soetens  Wed Jan 18 14:09:48 CET 2006  ControlTaskI.h
00003 
00004                         ControlTaskI.h -  description
00005                            -------------------
00006     begin                : Wed January 18 2006
00007     copyright            : (C) 2006 Peter Soetens
00008     email                : peter.soetens@fmtc.be
00009 
00010  ***************************************************************************
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU General Public                   *
00013  *   License as published by the Free Software Foundation;                 *
00014  *   version 2 of the License.                                             *
00015  *                                                                         *
00016  *   As a special exception, you may use this file as part of a free       *
00017  *   software library without restriction.  Specifically, if other files   *
00018  *   instantiate templates or use macros or inline functions from this     *
00019  *   file, or you compile this file and link it with other files to        *
00020  *   produce an executable, this file does not by itself cause the         *
00021  *   resulting executable to be covered by the GNU General Public          *
00022  *   License.  This exception does not however invalidate any other        *
00023  *   reasons why the executable file might be covered by the GNU General   *
00024  *   Public License.                                                       *
00025  *                                                                         *
00026  *   This library is distributed in the hope that it will be useful,       *
00027  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00028  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00029  *   Lesser General Public License for more details.                       *
00030  *                                                                         *
00031  *   You should have received a copy of the GNU General Public             *
00032  *   License along with this library; if not, write to the Free Software   *
00033  *   Foundation, Inc., 59 Temple Place,                                    *
00034  *   Suite 330, Boston, MA  02111-1307  USA                                *
00035  *                                                                         *
00036  ***************************************************************************/
00037 
00038 
00039 // -*- C++ -*-
00040 //
00041 // $Id$
00042 
00043 // ****  Code generated by the The ACE ORB (TAO) IDL Compiler ****
00044 // TAO and the TAO IDL Compiler have been developed by:
00045 //       Center for Distributed Object Computing
00046 //       Washington University
00047 //       St. Louis, MO
00048 //       USA
00049 //       http://www.cs.wustl.edu/~schmidt/doc-center.html
00050 // and
00051 //       Distributed Object Computing Laboratory
00052 //       University of California at Irvine
00053 //       Irvine, CA
00054 //       USA
00055 //       http://doc.ece.uci.edu/
00056 // and
00057 //       Institute for Software Integrated Systems
00058 //       Vanderbilt University
00059 //       Nashville, TN
00060 //       USA
00061 //       http://www.isis.vanderbilt.edu/
00062 //
00063 // Information about TAO is available at:
00064 //     http://www.cs.wustl.edu/~schmidt/TAO.html
00065 
00066 // TAO_IDL - Generated from
00067 // be/be_codegen.cpp:844
00068 
00069 #ifndef CONTROLTASKI_H_
00070 #define CONTROLTASKI_H_
00071 
00072 #include "../rtt-config.h"
00073 #include "corba.h"
00074 #include "corba.h"
00075 #ifdef CORBA_IS_TAO
00076 #include "ControlTaskS.h"
00077 #else
00078 #include "ControlTaskC.h"
00079 #endif
00080 
00081 #include "OperationInterfaceC.h"
00082 #include "AttributesC.h"
00083 #include "ScriptingAccessC.h"
00084 #include "ServicesC.h"
00085 #include "DataFlowC.h"
00086 #include "../TaskContext.hpp"
00087 #include <utility>
00088 
00089 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00090 #pragma once
00091 #endif /* ACE_LACKS_PRAGMA_ONCE */
00092 
00093 class  Orocos_ControlObject_i : public virtual POA_RTT::Corba::ControlObject, public virtual PortableServer::RefCountServantBase
00094 {
00095 protected:
00096     RTT::OperationInterface* mobj;
00097     ::RTT::Corba::AttributeInterface_var mAttrs;
00098     ::RTT::Corba::MethodInterface_var mMFact;
00099     ::RTT::Corba::CommandInterface_var mCFact;
00100 
00101     // refcounts servants
00102     PortableServer::ServantBase_var mAttrs_i;
00103     PortableServer::ServantBase_var mMFact_i;
00104     PortableServer::ServantBase_var mCFact_i;
00105     PortableServer::POA_var mpoa;
00106     // stores name, servant and servant base for refcounting.
00107     typedef std::map<std::string, std::pair<Orocos_ControlObject_i*,PortableServer::ServantBase_var> > CTObjMap;
00108     CTObjMap ctobjmap;
00109 
00110 public:
00111   //Constructor
00112   Orocos_ControlObject_i (RTT::OperationInterface* orig, PortableServer::POA_ptr the_poa);
00113 
00114   //Destructor
00115   virtual ~Orocos_ControlObject_i (void);
00116 
00117     PortableServer::POA_ptr _default_POA()
00118     {
00119         return PortableServer::POA::_duplicate(mpoa);
00120     }
00121 
00122   virtual
00123   char * getName (
00124 
00125     )
00126     ACE_THROW_SPEC ((
00127       CORBA::SystemException
00128     ));
00129 
00130   virtual
00131   char * getDescription (
00132 
00133     )
00134     ACE_THROW_SPEC ((
00135       CORBA::SystemException
00136     ));
00137 
00138   virtual
00139   ::RTT::Corba::AttributeInterface_ptr attributes (
00140 
00141     )
00142     ACE_THROW_SPEC ((
00143       CORBA::SystemException
00144     ));
00145 
00146   virtual
00147   ::RTT::Corba::MethodInterface_ptr methods (
00148 
00149     )
00150     ACE_THROW_SPEC ((
00151       CORBA::SystemException
00152     ));
00153 
00154   virtual
00155   ::RTT::Corba::CommandInterface_ptr commands (
00156 
00157     )
00158     ACE_THROW_SPEC ((
00159       CORBA::SystemException
00160     ));
00161 
00162   virtual
00163   ::RTT::Corba::ObjectList* getObjectList()
00164     ACE_THROW_SPEC ((
00165       CORBA::SystemException
00166     ));
00167 
00168   virtual
00169   ::RTT::Corba::ControlObject_ptr getObject(const char*)
00170     ACE_THROW_SPEC ((
00171       CORBA::SystemException
00172     ));
00173 
00174   virtual
00175   CORBA::Boolean hasObject(const char*)
00176     ACE_THROW_SPEC ((
00177       CORBA::SystemException
00178     ));
00179 
00180 };
00181 
00182 class  Orocos_ControlTask_i
00183 : public virtual POA_RTT::Corba::ControlTask,
00184   public Orocos_ControlObject_i
00185 {
00186 protected:
00187     RTT::TaskContext* mtask;
00188 
00189     ::RTT::Corba::ScriptingAccess_var mEEFact;
00190     ::RTT::Corba::ServiceInterface_var mService;
00191     ::RTT::Corba::DataFlowInterface_var mDataFlow;
00192     // refcounts servants:
00193     PortableServer::ServantBase_var mEEFact_i;
00194     PortableServer::ServantBase_var mService_i;
00195     PortableServer::ServantBase_var mDataFlow_i;
00196 public:
00197   //Constructor
00198   Orocos_ControlTask_i (RTT::TaskContext* orig, PortableServer::POA_ptr the_poa);
00199 
00200   //Destructor
00201   virtual ~Orocos_ControlTask_i (void);
00202 
00203   void shutdownCORBA();
00204 
00205   virtual
00206   ::RTT::Corba::TaskState getTaskState (
00207     )
00208     ACE_THROW_SPEC ((
00209       CORBA::SystemException
00210     ));
00211 
00212   virtual
00213   CORBA::Boolean start (
00214     )
00215     ACE_THROW_SPEC ((
00216       CORBA::SystemException
00217     ));
00218 
00219   virtual
00220   CORBA::Boolean stop (
00221     )
00222     ACE_THROW_SPEC ((
00223       CORBA::SystemException
00224     ));
00225 
00226   virtual
00227   CORBA::Boolean isActive (
00228     )
00229     ACE_THROW_SPEC ((
00230       CORBA::SystemException
00231     ));
00232 
00233   virtual
00234   CORBA::Boolean isRunning (
00235     )
00236     ACE_THROW_SPEC ((
00237       CORBA::SystemException
00238     ));
00239 
00240   virtual
00241   CORBA::Boolean configure (
00242     )
00243     ACE_THROW_SPEC ((
00244       CORBA::SystemException
00245     ));
00246 
00247   virtual
00248   CORBA::Boolean cleanup (
00249     )
00250     ACE_THROW_SPEC ((
00251       CORBA::SystemException
00252     ));
00253 
00254   virtual
00255   CORBA::Boolean resetError (
00256     )
00257     ACE_THROW_SPEC ((
00258       CORBA::SystemException
00259     ));
00260 
00261   virtual
00262   CORBA::Boolean activate (
00263     )
00264     ACE_THROW_SPEC ((
00265       CORBA::SystemException
00266     ));
00267 
00268   virtual
00269   CORBA::Boolean isConfigured (
00270     )
00271     ACE_THROW_SPEC ((
00272       CORBA::SystemException
00273     ));
00274 
00275   virtual
00276   CORBA::Boolean inFatalError (
00277     )
00278     ACE_THROW_SPEC ((
00279       CORBA::SystemException
00280     ));
00281 
00282     virtual
00283   CORBA::Boolean inRunTimeWarning (
00284     )
00285     ACE_THROW_SPEC ((
00286       CORBA::SystemException
00287     ));
00288 
00289     virtual
00290   CORBA::Boolean inRunTimeError (
00291     )
00292     ACE_THROW_SPEC ((
00293       CORBA::SystemException
00294     ));
00295 
00296     virtual
00297   CORBA::Long getWarningCount (
00298     )
00299     ACE_THROW_SPEC ((
00300       CORBA::SystemException
00301     ));
00302 
00303     virtual
00304   CORBA::Long getErrorCount (
00305     )
00306     ACE_THROW_SPEC ((
00307       CORBA::SystemException
00308     ));
00309 
00310 
00311   virtual
00312   ::RTT::Corba::ScriptingAccess_ptr scripting (
00313 
00314     )
00315     ACE_THROW_SPEC ((
00316       CORBA::SystemException
00317     ));
00318 
00319   virtual
00320   ::RTT::Corba::ServiceInterface_ptr services (
00321 
00322     )
00323     ACE_THROW_SPEC ((
00324       CORBA::SystemException
00325     ));
00326 
00327   virtual
00328   ::RTT::Corba::DataFlowInterface_ptr ports (
00329 
00330     )
00331     ACE_THROW_SPEC ((
00332       CORBA::SystemException
00333     ));
00334 
00335 
00336   virtual
00337   ::RTT::Corba::ControlTask::ControlTaskNames * getPeerList (
00338 
00339     )
00340     ACE_THROW_SPEC ((
00341       CORBA::SystemException
00342     ));
00343 
00344   virtual
00345   ::RTT::Corba::ControlTask_ptr getPeer (
00346       const char * name
00347     )
00348     ACE_THROW_SPEC ((
00349       CORBA::SystemException
00350     ));
00351 
00352   virtual
00353   CORBA::Boolean addPeer (
00354       ::RTT::Corba::ControlTask_ptr p,
00355       const char * alias
00356     )
00357     ACE_THROW_SPEC ((
00358       CORBA::SystemException
00359     ));
00360 
00361   virtual
00362   CORBA::Boolean hasPeer (
00363       const char * name
00364     )
00365     ACE_THROW_SPEC ((
00366       CORBA::SystemException
00367     ));
00368 
00369   virtual
00370   CORBA::Boolean removePeer (
00371       const char * name
00372     )
00373     ACE_THROW_SPEC ((
00374       CORBA::SystemException
00375     ));
00376 
00377   virtual
00378   CORBA::Boolean connectPeers (
00379       ::RTT::Corba::ControlTask_ptr p
00380     )
00381     ACE_THROW_SPEC ((
00382       CORBA::SystemException
00383     ));
00384 
00385   virtual
00386   CORBA::Boolean disconnectPeers (
00387       const char * name
00388     )
00389     ACE_THROW_SPEC ((
00390       CORBA::SystemException
00391     ));
00392 
00393   virtual
00394   CORBA::Boolean connectPorts (
00395       ::RTT::Corba::ControlTask_ptr p
00396     )
00397     ACE_THROW_SPEC ((
00398       CORBA::SystemException
00399     ));
00400 
00401 };
00402 
00403 
00404 #endif /* CONTROLTASKI_H_  */
00405 
Generated on Thu Dec 23 13:22:36 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3