MAK RTIspy API Documentation for HLA 1516
assistantConnectionAssocData.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2009 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: assistantConnectionAssocData.h,v $ $Revision: 1.2 $ $State: Exp $
7 *********************************************************************/
8 
9 #ifndef assistantConnectionAssocData_H_
10 #define assistantConnectionAssocData_H_
11 
14 
15 #include <rtiUtil.h>
16 #include <vlutil/vlString.h>
17 #include <vlutil/vlMutex.h>
18 #include "assistantUtil.h"
19 #include "assistantInfo.h"
20 #include <hostNameAddress.h>
21 
25 {
26 
27 public:
28 
30  {
31  // It is not known whether this connection is in use
33 
34  // This connection conflicts with an active connection and can't be used
36 
37  // A forwarder is using this connection, but not an rtiexec
39 
40  // Both a forwarder and rtiexec are using this connection, or this is a
41  // lightweight connection that has recently been used
42  DtConnectionVerified
43  };
44 
47 
49  virtual bool operator==(const DtRtiAssociatedConnectionData& other) const;
50 
52  virtual bool operator!=(const DtRtiAssociatedConnectionData& other) const;
53 
55  MAKRti::DtString name( bool withOwner = false ) const;
56 
58  void setName( const MAKRti::DtString& connName );
59 
61  bool isNamed() const;
62 
64  MAKRti::DtString ownerHost() const;
65  void setOwnerHost( const MAKRti::DtString& host );
66 
68  DtConnectionState connectionState() const;
69  void setConnectionState( DtConnectionState state );
70 
72 
73  bool isStateVerified() const;
74  bool isStateForwarderVerified() const;
75  bool isStateConflicting() const;
76  bool isStateUnknown() const;
78  bool isStateActive() const;
80  bool isStateInactive() const;
82 
84  MAKRti::DtString conflictReason() const;
85  void setConflictReason( const MAKRti::DtString& reason );
86 
88  bool isSaved() const;
89  void setIsSaved( bool saved );
90 
92  bool isChosen() const;
93  void setIsChosen( bool chosen );
94 
96  bool isPredefined() const;
97  void setIsPredefined( bool predefined );
98 
100  MAKRti::DtInetAddr optionalForwarderToConnectTo() const;
101  void setOptionalForwarderToConnectTo( const MAKRti::DtInetAddr& forwarder );
102 
104  unsigned numLocalFederates() const;
105  void addLocalFederate(int compId);
106  void removeLocalFederate(int compId);
107  void clearLocalFederates();
108  const std::set<int>& localFederates() const;
109 
111  bool wasRtiexecRemotelyHeartbeated() const;
112  void setWasRtiexecRemotelyHeartbeated( bool heartbeated );
113 
116  bool wasRemotelyHeartbeated() const;
117  void setWasRemotelyHeartbeated( bool heartbeated );
118 
120  DtAssistantInfo rtiexecsAssistant() const;
121  void setRtiexecsAssistant( const DtAssistantInfo& assistant );
122 
124  DtAssistantInfo forwardersAssistant() const;
125  void setForwardersAssistant( const DtAssistantInfo& assistant );
126 
128  int rtiexecCompId() const;
129  void setRtiexecCompId( int id );
130 
132  int forwarderCompId() const;
133  void setForwarderCompId( int id );
134 
135 protected:
136 
138  MAKRti::DtString myName;
139 
141  MAKRti::DtString myOwnerHost;
142 
147 
148  // The reason for the conflict.
149  MAKRti::DtString myConflictReason;
150 
152  bool myIsSaved;
153 
156 
159 
163 
165  std::set<int> myLocalFederates;
166 
170 
174 
177 
180 
183 
186 };
187 
189 {
191 }
192 
194 {
196 }
197 
199 {
201 }
202 
204 {
205  return (myConnectionState == DtUnknownState);
206 }
207 
209 {
212 }
213 
215 {
218 }
219 
220 
221 #endif

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)