MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
execHandshakeMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2005 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: execHandshakeMsg.h,v $ $Revision: 1.7 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtRtiExecHandshakeMsg_H_
13 #define DtRtiExecHandshakeMsg_H_
14 
15 #include "rtiMsg.h"
16 
17 
18 class DtConnectionMgr;
21 typedef void (*DtRtiExecHsCb)(const DtRtiExecHandshakeMsg& inter, void* usr);
22 
24 {
25 public:
27  {
28  HsRequest = 0,
30  HsResponseDenied
31  };
32 
34  DtRtiExecHandshakeMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
35 
38  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
39 
41  DtRtiExecHandshakeMsg(DtHandle srcHandle, DtHandle destHandle,
42  DtHandshakeStatus hsStatus, const MAKRti::DtString& sourceHostName,
43  bool fullyCompliant, DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
44 
46  virtual ~DtRtiExecHandshakeMsg();
47 
49  virtual DtRtiMsg* clone(bool copy = true) const;
50 
52  virtual void set( DtHandle srcHandle, DtHandle destHandle,
53  DtHandshakeStatus hsStatus,
54  const MAKRti::DtString& sourceHost,
55  bool fullyCompliant );
56 
58  virtual DtHandle srcConnectionHandle() const;
59  virtual void setSrcConnectionHandle( DtHandle handle );
60 
62  virtual DtHandle destConnectionHandle() const;
63  virtual void setDestConnectionHandle( DtHandle handle );
64 
65  virtual MAKRti::DtString sourceHostName() const;
66 
68  virtual DtHandshakeStatus handshakeStatus() const;
69  virtual void setHandshakeStatus( DtHandshakeStatus hsStatus );
70 
72  virtual bool fullyCompliant() const;
73  virtual void setFullyCompliant( bool fullComplianceEnabled );
74 
76  virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
77 
78 public:
79 
81  static DtRtiMsg* create(const DtNetMsgHeader* initial,
82  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
83 
84  static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
85 
87  static void addCallback(DtConnectionMgr* conn,
88  DtRtiExecHsCb cb, void* usr, bool isMomCallback=false);
89  static void removeCallback(DtConnectionMgr* conn,
90  DtRtiExecHsCb cb, void* usr, bool isMomCallback=false);
91 
92 protected:
93 
95  virtual DtNetExecHandshakeMsg* netExecHandshakeMsg();
96  virtual const DtNetExecHandshakeMsg* netExecHandshakeMsg() const;
97 
98 
99  virtual char* sourceHostNamePtr();
100  virtual const char* sourceHostNamePtr() const;
101  virtual int sourceHostNameSize() const;
102  virtual void setSourceHostName(const MAKRti::DtString& hostName);
103 
106 
108  virtual int minSize() const;
109 
111  virtual DtRtiExecHandshakeMsg* self() const;
112 
113 protected:
114 
115 };
116 
117 
119 {
120  return const_cast<DtRtiExecHandshakeMsg*>( this );
121 }
122 
123 #endif
124 

Document ID: Generated on Wed Mar 11 20:26:49 EDT 2015 from SVN revision 150939
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)