MAK RTIspy API Documentation for HLA 4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
federationShadowHandshakeMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2022 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
8 
9 #pragma once
10 #include "rtiMsg.h"
11 
12 
13 class DtConnectionMgr;
16 typedef void (*DtFederationShadowHsCb)(const DtFederationShadowHandshakeMsg& inter, void* usr);
17 
19 {
20 public:
22  {
23  HsRequest = 0,
25  HsResponseDenied
26  };
27 
29  DtFederationShadowHandshakeMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
30 
32  DtFederationShadowHandshakeMsg(const DtNetFederationShadowHandshakeMsg* netRep, DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
33 
35  DtFederationShadowHandshakeMsg(DtHandle srcHandle, DtHandle destHandle, HandshakeStatus hsStatus,
36  DtHandle federationHandle, const MAKRti::DtString& federationName, DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
37 
40 
42  virtual DtRtiMsg* clone(bool copy = true) const;
43 
45  virtual void set(DtHandle srcHandle, DtHandle destHandle, HandshakeStatus hsStatus,
46  DtHandle federationHandle, const MAKRti::DtString& federationName);
47 
49  virtual DtHandle srcConnectionHandle() const;
50  virtual void setSrcConnectionHandle( DtHandle handle );
51 
53  virtual DtHandle destConnectionHandle() const;
54  virtual void setDestConnectionHandle(DtHandle handle );
55 
57  virtual HandshakeStatus handshakeStatus() const;
58  virtual void setHandshakeStatus(HandshakeStatus hsStatus );
59 
61  virtual DtHandle federationHandle() const;
62  virtual void setFederationHandle(DtHandle handle);
63 
65  virtual MAKRti::DtString federationName() const;
66  virtual void setFederationName(const MAKRti::DtString& name);
67 
69  virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
70 
71 public:
72 
74  static DtRtiMsg* create(const DtNetMsgHeader* initial, DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
75 
76  static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
77 
79  static void addCallback(DtConnectionMgr* conn, DtFederationShadowHsCb cb, void* usr, bool isMomCallback=false);
80  static void removeCallback(DtConnectionMgr* conn, DtFederationShadowHsCb cb, void* usr, bool isMomCallback=false);
81 
82 protected:
83 
85  virtual DtNetFederationShadowHandshakeMsg* netMsg();
86  virtual const DtNetFederationShadowHandshakeMsg* netMsg() const;
87 
88  virtual char* federationNamePtr();
89  virtual const char* federationNamePtr() const;
90  virtual int federationNameSize() const;
91 
94 
96  virtual int minSize() const;
97 
99  virtual DtFederationShadowHandshakeMsg* self() const;
100 
101 protected:
102 
103 };
104 
106 {
107  return const_cast<DtFederationShadowHandshakeMsg*>( this );
108 }
109 
void(* DtFederationShadowHsCb)(const DtFederationShadowHandshakeMsg &inter, void *usr)
Definition: federationShadowHandshakeMsg.h:16
DtRtiMsgKind
Definition: rtiMsgKind.h:9
Definition: netRtiMsgHdr.h:23
Definition: fedTimeFactory.h:73
virtual void printData(DtLogicalTimeFactory *logicalTimeFactory) const
Definition: federationShadowHandshakeMsg.h:24
virtual DtFederationShadowHandshakeMsg * self() const
Casts away const-ness.
Definition: federationShadowHandshakeMsg.h:105
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
virtual DtRtiMsg * clone(bool copy=true) const =0
Return a copy/empty object of the same type as this.
virtual DtRtiMsgKind internalDtRtiMsgKind()=0
unsigned long DtHandle
The internal types.
Definition: internalTypes.h:41
#define DT_DLL_LRC
Definition: rtiMsConfig.h:155
Definition: netFederationShadowHandshakeMsg.h:14
Definition: federationShadowHandshakeMsg.h:18
HandshakeStatus
Definition: federationShadowHandshakeMsg.h:21

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)