MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fedAmbCallbackMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2007 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: fedAmbCallbackMsg.h,v $ $Revision: 1.5 $ $State: Exp $
7 *********************************************************************/
8 
9 #ifndef fedAmbCallbackMsg_h
10 #define fedAmbCallbackMsg_h
11 
14 
15 #include "rtiMsg.h"
16 #if defined(DtIFSPEC1516) || defined(DtIFSPEC1516E)
17 #include <RTI/FederateAmbassador.h>
18 #else
19 #ifdef DtIFSPEC13DLC
20 #include "RTI13.h"
21 #define RTI rti13
22 #else
23 #include "RTI.hh"
24 #endif
25 #endif
26 
27 class DtConnectionMgr;
28 class DtFedAmbCallback;
30 
31 typedef void (*DtCallbackCb)(const DtFedAmbCallbackMsg& msg, void* usr);
32 
37 
39 {
40 public:
42  DtFedAmbCallbackMsg(std::auto_ptr<DtFedAmbCallback> callback);
43 
45  virtual ~DtFedAmbCallbackMsg();
46 
47 private:
50  DtFedAmbCallbackMsg& operator = (DtFedAmbCallbackMsg const& orig);
51 
52 public:
56  virtual DtRtiMsg* clone(bool copy = true) const;
57 
60 
61 #ifdef DtIFSPEC1516
62  virtual void evokeCallback(rti1516::FederateAmbassador* fedAmb) const;
64 #elif defined(DtIFSPEC1516E)
65  virtual void evokeCallback(rti1516e::FederateAmbassador* fedAmb) const;
67 #else
68  virtual void evokeCallback(RTI::FederateAmbassador* fedAmb) const;
70 #endif
71 
73  virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
74 
75 public:
77  static void addCallback(DtConnectionMgr *conn,
78  DtCallbackCb cb, void *usr);
79 
81  static void removeCallback(DtConnectionMgr *conn,
82  DtCallbackCb cb, void *usr);
83 
84 protected:
85 
87  std::auto_ptr<DtFedAmbCallback> myCallback;
88 };
89 
90 
91 #endif
92 
DtRtiMsgKind
Definition: rtiMsgKind.h:9
!DtIFSPEC1516
Definition: fedTimeFactory.h:190
virtual void printData(DtLogicalTimeFactory *logicalTimeFactory) const
void(* DtCallbackCb)(const DtFedAmbCallbackMsg &msg, void *usr)
Definition: fedAmbCallbackMsg.h:31
Instances of DtConnectionMgr manage the communication objects that the RTI will use to either communi...
Definition: connectMgr.h:60
DtRtiMsg is the base class for messages between RTI components.
Definition: rtiMsg.h:45
virtual DtRtiMsg * clone(bool copy=true) const =0
Return a copy/empty object of the same type as this.
virtual DtRtiMsgKind internalDtRtiMsgKind()=0
An abstract base class which must be implemented, and used by a federate.
Definition: FederateAmbassador.h:32
#define DT_DLL_LRC
Definition: rtiMsConfig.h:126
std::auto_ptr< DtFedAmbCallback > myCallback
The federate ambassador callback parameters.
Definition: fedAmbCallbackMsg.h:87
A message that delivers stored callbacks generated by asynchronous thread.
Definition: fedAmbCallbackMsg.h:38
his file contains the rti1516e::FederateAmbassador class.

Document ID: Generated on Mon Sep 7 15:40:32 EDT 2020 from SVN revision 217499
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)