MAK RTIspy API Documentation for HLA 1516
execObserver.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2008 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: execObserver.h,v $ $Revision: 1.3 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00012 #ifndef DtRtiexecObserver_H_
00013 #define DtRtiexecObserver_H_
00014 
00015 #include "rtiMsConfig.h"
00016 #include "rtiMsg.h"
00017 #include "rtiMsgCbMgr.h"
00018 #include "execObserverMgr.h"
00019 
00020 class DtFedExec;
00021 class DtFederate;
00022 namespace MAKRti
00023 {
00024    class DtInetAddr;
00025 }
00026 class DtSyncPt;
00027 
00030 class DT_DLL_EXEC DtRtiexecObserver
00031 {
00032 
00033 public:
00034 
00036    DtRtiexecObserver();
00037 
00039    virtual ~DtRtiexecObserver();
00040 
00042    virtual void setMgr( DtRtiexecObserverMgr* mgr );
00043 
00045    virtual void removeMgr();
00046 
00048    virtual void startObservation() {};
00049 
00052 
00053 
00054    virtual void processFedExCreatedEvent( DtFedExec* exec ) {}
00055 
00057    virtual void processFedExDestroyedEvent( DtFedExec* exec ) {}
00058 
00060    virtual void processFederateJoinedEvent( DtFedExec* exec, DtFederate* federate ) {}
00061 
00063    virtual void processFederateResignedEvent( DtFedExec* exec, DtFederate* federate ) {}
00064 
00066    virtual void processSyncPtRegisteredEvent( DtFedExec* exec, DtSyncPt* pt ) {}
00067 
00069    virtual void processFederationSynchronizedEvent( DtFedExec* exec, DtSyncPt* pt ) {}
00070    
00072    virtual void processSyncPtAchievedEvent( DtFedExec* exec, DtFederate* fed, DtSyncPt* pt ) {}
00073 
00075    virtual void processFederateDisconnectedEvent( DtFedExec* exec, DtFederate* fed ) {}
00076 
00078    virtual void processFederateReconnectSucceededEvent( DtFedExec* exec, DtFederate* fed ) {}
00079 
00081    virtual void processFederateReconnectFailedEvent( DtFedExec* exec, DtFederate* fed ) {}
00082 
00084    virtual void processLogFileUpdatedEvent( const MAKRti::DtFilename& logFile ) {}
00085 
00087    virtual void processWebServerUpdatedEvent( const MAKRti::DtInetAddr& webSpyIpAddr,
00088       int webSpyPort ) {}
00090       
00093    virtual void addRtiMsgCallback( DtRtiMsgKind msgKind, 
00094       DtRtiMsgCbMgr::DtCallbackFcn fcn, bool isMomCallback = false );
00095 
00098    virtual void removeRtiMsgCallback( DtRtiMsgKind msgKind,
00099       DtRtiMsgCbMgr::DtCallbackFcn fcn, bool isMomCallback = false );
00100 
00103    virtual void addTickCallback( DtTickCbFn fcn, DtTime interval );
00104 
00106    virtual void removeTickCallback( DtTickCbFn fcn );
00107 
00110    virtual void addTickCallback( DtTickWithExecCbFn fcn, DtTime interval );
00111 
00113    virtual void removeTickCallback( DtTickWithExecCbFn fcn );
00114 
00116    virtual unsigned long connectionId() const;
00117 
00118 protected:
00119 
00121    virtual void addCallbacks() = 0;
00122 
00125    virtual void removeCallbacks() = 0;
00126 
00127 private:
00128    
00130    DtRtiexecObserver( const DtRtiexecObserver& orig );
00131 
00133    DtRtiexecObserver& operator=( const DtRtiexecObserver& orig );
00134 
00135 protected:
00136 
00138    DtRtiexecObserverMgr* myMgr;
00139 
00140 };
00141 
00142 
00143 inline unsigned long DtRtiexecObserver::connectionId() const
00144 {
00145    if( myMgr )
00146    {
00147       return myMgr->connectionId();
00148    }
00149    else
00150    {
00151       return 0;
00152    }
00153 }
00154 
00155 
00156 #endif //! DtRtiexecObserver_H_
00157 
00158 

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)