MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
connectMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1998 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: connectMsg.h,v $ $Revision: 1.8 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtConnectMsg_H_
13 #define DtConnectMsg_H_
14 
15 #include "rtiMsg.h"
16 #include "netConnectMsg.h"
17 
18 class DtConnectionMgr;
19 class DtConnectMsg;
20 typedef void (*DtConnectCb)(const DtConnectMsg& inter, void* usr);
21 
23 {
24 public:
25 
27  DtConnectMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
28 
30  DtConnectMsg(const DtNetConnectMsg* netRep,
31  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
32 
34  DtConnectMsg(DtHandle handle,
35  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
36 
38  virtual ~DtConnectMsg();
39 
41  virtual DtRtiMsg* clone(bool copy = true) const;
42 
44  virtual void set(DtHandle handle);
45 
47 
48  virtual DtHandle connectionHandle() const;
49  virtual void setConnectionHandle(DtHandle handle);
51 
53 
54  virtual bool authorizationIsEnabled() const;
55  virtual void setAuthorizationIsEnabled(bool isEnabled);
57 
59  virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
60 
61 public:
62 
64  static DtRtiMsg* create(const DtNetMsgHeader* initial,
65  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
66 
67  static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
68 
70  static void addCallback(DtConnectionMgr* conn,
71  DtConnectCb cb, void* usr, bool isMomCallback=false);
72  static void removeCallback(DtConnectionMgr* conn,
73  DtConnectCb cb, void* usr, bool isMomCallback=false);
74 
75  // Encode a connection handle using the forwarder handle and an offset
76  static unsigned long encodeConnectionHandle(DtU16 forwarderHandle, DtU16 connectOffset);
77 
78  // Decode the forwarder handle from a connection handle
79  static unsigned long decodeForwarderHandle(unsigned long connectionHandle);
80 
81 protected:
82 
84  virtual DtNetConnectMsg* netConnectMsg();
85  virtual const DtNetConnectMsg* netConnectMsg() const;
86 
89 
91  virtual int minSize() const;
92 
94  virtual DtConnectMsg* self() const;
95 
96 protected:
97 
98 };
99 
100 
102 {
103  return const_cast<DtConnectMsg*>( this );
104 }
105 
106 #endif
107 
DtRtiMsgKind
Definition: rtiMsgKind.h:9
Definition: netRtiMsgHdr.h:23
Definition: fedTimeFactory.h:73
virtual void printData(DtLogicalTimeFactory *logicalTimeFactory) const
Definition: netConnectMsg.h:15
Instances of DtConnectionMgr manage the communication objects that the RTI will use to either communi...
Definition: connectMgr.h:67
DtRtiMsg is the base class for messages between RTI components.
Definition: rtiMsg.h:34
Definition: connectMsg.h:22
virtual DtRtiMsg * clone(bool copy=true) const =0
Return a copy/empty object of the same type as this.
virtual DtRtiMsgKind internalDtRtiMsgKind()=0
virtual DtConnectMsg * self() const
Casts away const-ness.
Definition: connectMsg.h:101
void(* DtConnectCb)(const DtConnectMsg &inter, void *usr)
Definition: connectMsg.h:20
unsigned long DtHandle
The internal types.
Definition: internalTypes.h:41
#define DT_DLL_LRC
Definition: rtiMsConfig.h:155

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)