MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
desgFedMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1998 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: desgFedMsg.h,v $ $Revision: 1.6 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtDesignatedFederateMsg_H_
13 #define DtDesignatedFederateMsg_H_
14 
15 #include "rtiMsg.h"
16 #include "netDesgFedMsg.h"
17 
18 class DtConnectionMgr;
20 typedef void (*DtDesignatedFederateCb)(const DtDesignatedFederateMsg& msg, void* usr);
21 
23 {
24 public:
25 
27  DtDesignatedFederateMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
28 
31  DtFederateHandle fedHandle,
32  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
33 
36  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
37 
39  virtual ~DtDesignatedFederateMsg();
40 
42  virtual DtRtiMsg* clone(bool copy = true) const;
43 
45  virtual void set(DtFederateHandle fedHandle);
46 
48  virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
49 
51  virtual DtFederateHandle designatedFederate() const;
52  virtual void setDesignatedFederate(DtFederateHandle fedHandle);
53 
54 public:
55 
57  static DtRtiMsg* create(const DtNetMsgHeader* initial,
58  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
60  static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
61 
63  static void addCallback(DtConnectionMgr *conn,
64  DtDesignatedFederateCb cb, void *usr);
65  static void removeCallback(DtConnectionMgr *conn,
66  DtDesignatedFederateCb cb, void *usr);
67 
68 protected:
70  virtual DtNetDesignatedFederateMsg* netDesignatedFederateMsg();
71  virtual const DtNetDesignatedFederateMsg* netDesignatedFederateMsg() const;
72 
75 
77  virtual int minSize() const;
78 
80  virtual DtDesignatedFederateMsg* self() const;
81 
82 
83 
84 protected:
85 
86  char* myLabel;
87 };
88 
90 {
91  return const_cast<DtDesignatedFederateMsg*>( this );
92 }
93 
94 #endif
DtRtiMsgKind
Definition: rtiMsgKind.h:9
Definition: netRtiMsgHdr.h:23
!DtIFSPEC1516
Definition: fedTimeFactory.h:190
virtual void printData(DtLogicalTimeFactory *logicalTimeFactory) const
virtual DtDesignatedFederateMsg * self() const
Casts away const-ness.
Definition: desgFedMsg.h:89
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
DtHandle DtFederateHandle
Definition: internalTypes.h:29
Definition: netDesgFedMsg.h:19
virtual DtRtiMsg * clone(bool copy=true) const =0
Return a copy/empty object of the same type as this.
virtual DtRtiMsgKind internalDtRtiMsgKind()=0
void(* DtDesignatedFederateCb)(const DtDesignatedFederateMsg &msg, void *usr)
Definition: desgFedMsg.h:20
#define DT_DLL_LRC
Definition: rtiMsConfig.h:126
Definition: desgFedMsg.h:22
char * myLabel
Definition: desgFedMsg.h:86

Document ID: Generated on Thu May 11 15:55:32 EDT 2023 from SVN revision 254743
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)