summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2003-05-14 20:54:02 +0000
committerbala <balanatarajan@users.noreply.github.com>2003-05-14 20:54:02 +0000
commit0fb4fcb279e596e2dcf3b043662b706e1f642e4b (patch)
tree29ff42f68fd1cf4277ce676aa5c0cd460e31a4f5
parentaadea181b71047952d5171ba1db7d97c2b384192 (diff)
downloadATCD-0fb4fcb279e596e2dcf3b043662b706e1f642e4b.tar.gz
ChangeLogTag:Wed May 14 15:50:12 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
-rw-r--r--TAO/CIAO/examples/handcrafted/BasicSP/BMClosedED/GPS.idl25
-rw-r--r--TAO/CIAO/examples/handcrafted/BasicSP/BMClosedED/GPS_tracing_exec.cpp137
-rw-r--r--TAO/CIAO/examples/handcrafted/BasicSP/BMClosedED/GPS_tracing_exec.h125
3 files changed, 0 insertions, 287 deletions
diff --git a/TAO/CIAO/examples/handcrafted/BasicSP/BMClosedED/GPS.idl b/TAO/CIAO/examples/handcrafted/BasicSP/BMClosedED/GPS.idl
deleted file mode 100644
index 8a2f2f50361..00000000000
--- a/TAO/CIAO/examples/handcrafted/BasicSP/BMClosedED/GPS.idl
+++ /dev/null
@@ -1,25 +0,0 @@
-// $Id$
-
-/**
- * @file GPS.idl
- *
- * Definition of the GPS component.
- *
- * @author Nanbor Wang <nanbor@cs.wustl.edu>
- */
-
-#include "../HUDisplay.idl"
-
-module HUDisplay
-{
- component GPS
- {
- provides position MyLocation;
- publishes tick Ready;
- consumes tick Refresh;
- };
-
- home GPSHome manages GPS
- {
- };
-};
diff --git a/TAO/CIAO/examples/handcrafted/BasicSP/BMClosedED/GPS_tracing_exec.cpp b/TAO/CIAO/examples/handcrafted/BasicSP/BMClosedED/GPS_tracing_exec.cpp
deleted file mode 100644
index e0e2a642999..00000000000
--- a/TAO/CIAO/examples/handcrafted/BasicSP/BMClosedED/GPS_tracing_exec.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-// $Id$
-
-#include "GPS_tracing_exec.h"
-
-#define DISPLACEMENT 256
-
-/// Default constructor.
-MyImpl::GPS_tracing_exec_i::GPS_tracing_exec_i () : dx_(1), dy_(1)
-{
- ACE_OS::srand ((u_int) ACE_OS::time ());
-
- this->positionx_ = 20;
- this->positiony_ = 25;
-}
-
-/// Default destructor.
-MyImpl::GPS_tracing_exec_i::~GPS_tracing_exec_i ()
-{
-}
-
-// Operations from HUDisplay::GPS
-
-HUDisplay::CCM_position_ptr
-MyImpl::GPS_tracing_exec_i::get_MyLocation (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return HUDisplay::CCM_position::_duplicate (this);
-}
-
-void
-MyImpl::GPS_tracing_exec_i::push_Refresh (HUDisplay::tick *
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Refresh position
- if(this->positionx_ > 500) this->dx_ = -1;
- if(this->positionx_ < 10) this->dx_ = 1;
- if(this->positiony_ > 300) this->dy_ = -1;
- if(this->positiony_ < 10) this->dy_ = 1;
-
- this->positionx_ += this->dx_;
- this->positiony_ += this->dy_;
-
- // Nitify others
- HUDisplay::tick_var event = new OBV_HUDisplay::tick;
-
- this->context_->push_Ready (event
- ACE_ENV_ARG_PARAMETER);
-}
-
-// Operations from HUDisplay::position
-
-CORBA::Long
-MyImpl::GPS_tracing_exec_i::posx (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->positionx_;
-}
-
-CORBA::Long
-MyImpl::GPS_tracing_exec_i::posy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->positiony_;
-}
-
-// Operations from Components::SessionComponent
-void
-MyImpl::GPS_tracing_exec_i::set_session_context (Components::SessionContext_ptr ctx
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Components::CCMException))
-{
- ACE_DEBUG ((LM_DEBUG, "MyImpl::GPS_tracing_exec_i::set_session_context\n"));
-
- this->context_ =
- HUDisplay::CCM_GPS_Context::_narrow (ctx
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (this->context_.in ()))
- ACE_THROW (CORBA::INTERNAL ());
- // Urm, we actually discard exceptions thown from this operation.
-}
-
-void
-MyImpl::GPS_tracing_exec_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Components::CCMException))
-{
- ACE_DEBUG ((LM_DEBUG, "MyImpl::GPS_tracing_exec_i::ccm_activate\n"));
-}
-
-void
-MyImpl::GPS_tracing_exec_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Components::CCMException))
-{
- ACE_DEBUG ((LM_DEBUG, "MyImpl::GPS_tracing_exec_i::ccm_passivate\n"));
-}
-
-void
-MyImpl::GPS_tracing_exec_i::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Components::CCMException))
-{
- ACE_DEBUG ((LM_DEBUG, "MyImpl::GPS_tracing_exec_i::ccm_remove\n"));
-}
-
-/// Default ctor.
-MyImpl::GPSHome_tracing_exec_i::GPSHome_tracing_exec_i ()
-{
-}
-
-/// Default dtor.
-MyImpl::GPSHome_tracing_exec_i::~GPSHome_tracing_exec_i ()
-{
-}
-
-// Explicit home operations.
-
-// Implicit home operations.
-
-::Components::EnterpriseComponent_ptr
-MyImpl::GPSHome_tracing_exec_i::create (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Components::CCMException))
-{
- return new MyImpl::GPS_tracing_exec_i;
-}
-
-
-extern "C" GPS_EXEC_Export ::Components::HomeExecutorBase_ptr
-createGPSHome_Tracing_Impl (void)
-{
- return new MyImpl::GPSHome_tracing_exec_i;
-}
diff --git a/TAO/CIAO/examples/handcrafted/BasicSP/BMClosedED/GPS_tracing_exec.h b/TAO/CIAO/examples/handcrafted/BasicSP/BMClosedED/GPS_tracing_exec.h
deleted file mode 100644
index 07b81437cec..00000000000
--- a/TAO/CIAO/examples/handcrafted/BasicSP/BMClosedED/GPS_tracing_exec.h
+++ /dev/null
@@ -1,125 +0,0 @@
-// $Id$
-
-/**
- * @file GPS_tracing_exec.h
- *
- * Header file for the actual GPS and GPSHome component
- * implementations.
- *
- * @author Nanbor Wang <nanbor@cse.wustl.edu>
- */
-
-#ifndef GPS_TRACING_EXEC_H
-#define GPS_TRACING_EXEC_H
-
-#include "GPSEIC.h"
-#include "tao/LocalObject.h"
-
-namespace MyImpl
-{
- /**
- * @class GPS_tracing_exec_i
- *
- * RateGen executor implementation class.
- */
- class GPS_EXEC_Export GPS_tracing_exec_i :
- public virtual HUDisplay::GPS_Exec,
- public virtual TAO_Local_RefCounted_Object
- {
- public:
- /// Default constructor.
- GPS_tracing_exec_i ();
-
- /// Default destructor.
- ~GPS_tracing_exec_i ();
-
- // Operations from HUDisplay::GPS
-
- virtual HUDisplay::CCM_position_ptr
- get_MyLocation (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- push_Refresh (HUDisplay::tick *ev
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- // Operations from HUDisplay::position
-
- virtual CORBA::Long
- posx (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::Long
- posy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- // Operations from Components::SessionComponent
-
- virtual void
- set_session_context (Components::SessionContext_ptr ctx
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Components::CCMException));
-
- virtual void
- ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Components::CCMException));
-
- virtual void
- ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Components::CCMException));
-
- virtual void
- ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Components::CCMException));
- protected:
- /// Current GPS reading.
- CORBA::Long positionx_;
- CORBA::Long positiony_;
-
- /// Delta amounts to emulate the position shift of each reading.
- int dx_;
- int dy_;
-
- /// Copmponent specific context
- HUDisplay::CCM_GPS_Context_var context_;
- };
-
- /**
- * @class GPSHome_tracing_exec_i
- *
- * GPS home executor implementation class.
- */
- class GPS_EXEC_Export GPSHome_tracing_exec_i :
- public virtual HUDisplay::CCM_GPSHome,
- public virtual TAO_Local_RefCounted_Object
- {
- public:
- /// Default ctor.
- GPSHome_tracing_exec_i ();
-
- /// Default dtor.
- ~GPSHome_tracing_exec_i ();
-
- // Explicit home operations.
-
- // Implicit home operations.
-
- virtual ::Components::EnterpriseComponent_ptr
- create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Components::CCMException));
- };
-
-}
-
-// Executor DLL entry point. CIAO's deployment and assembly framework
-// invokes this function on the resulting DLL to get the home executor.
-extern "C" GPS_EXEC_Export ::Components::HomeExecutorBase_ptr
-createGPSHome_Tracing_Impl (void);
-
-#endif /* GPS_TRACING_EXEC_H */