MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simpleTimeFedAmb13dlc.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2009 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: simpleTimeFedAmb13dlc.h,v $ $Revision: 1.1 $ $State: Exp $
7 *******************************************************************************/
8 
9 #pragma warning(disable: 4786)
10 #pragma warning(disable: 4290)
11 
13 #include <map>
14 #include <set>
15 #include <string>
17 
18 
19 
20 // Map between strings and attribute handles
21 typedef std::map<std::string, rti13::AttributeHandle> DtAttrNameHandleMap;
22 typedef std::map<std::string, rti13::ParameterHandle> DtParamNameHandleMap;
23 
24 class DtTalkAmbData{
25 
26 public :
27  DtTalkAmbData();
29 
30 
31 public:
32  std::map<rti13::ObjectClassHandle, std::string> objectClassMap;
33  std::map<rti13::ObjectHandle, std::string> objectInstanceMap;
34  std::map<rti13::InteractionClassHandle, std::string> interactionClassMap;
35  std::map<rti13::ObjectHandle, rti13::AttributeHandleSet*> updateRequestMap;
36 
37  // Map between strings and attribute handles
39 
40  // Map between strings and attribute handles
42 
43  // The set of Attributes that this federate's published objects will contain.
44  std::set <std::string> ourAttrs;
45 
46  // The set of Parameters that this federate's published interactions will contain.
47  std::set <std::string> ourParms;
48 
49  // This federation of simple objects has a single master object, (determined by command line arguments)
50  // The master federate will keep the other federates from entering their main loop of execution until
51  // all of numFederates have joined.
52  bool isMaster;
53 
54  // numFederates is the number of federates (including the master) that the master should wait to join the
55  // federation before it allows any federate to enter its main loop.
56  // This variable is only used by the master federate.
57  int numFederates;
58 
59 
62 
63  bool isConstrained;
64  bool isRegulating;
65  bool timeAdvanced;
67  bool registerFailed;
68  bool registerSucceeded;
72 };
73 
74 
76 {
77 public:
78 
80 
81  virtual ~MyFederateAmbassador()
82  throw (rti13::FederateInternalError);
83 
84 
86  // Object Management Services //
88 
89  virtual void discoverObjectInstance (
90  rti13::ObjectHandle theObject, // supplied C1
91  rti13::ObjectClassHandle theObjectClass, // supplied C1
92  const char* theObjectName) // supplied C4
93  throw (
94  rti13::CouldNotDiscover,
95  rti13::ObjectClassNotKnown,
96  rti13::FederateInternalError);
97 
98  virtual void reflectAttributeValues (
99  rti13::ObjectHandle theObject, // supplied C1
100  const rti13::AttributeHandleValuePairSet& theAttributes, // supplied C4
101  const rti13::FedTime& theTime, // supplied C1
102  const char *theTag, // supplied C4
103  rti13::EventRetractionHandle theHandle) // supplied C1
104  throw (
105  rti13::ObjectNotKnown,
106  rti13::AttributeNotKnown,
107  rti13::FederateOwnsAttributes,
108  rti13::InvalidFederationTime,
109  rti13::FederateInternalError);
110 
111  virtual void reflectAttributeValues (
112  rti13::ObjectHandle theObject, // supplied C1
113  const rti13::AttributeHandleValuePairSet& theAttributes, // supplied C4
114  const char *theTag) // supplied C4
115  throw (
116  rti13::ObjectNotKnown,
117  rti13::AttributeNotKnown,
118  rti13::FederateOwnsAttributes,
119  rti13::FederateInternalError);
120 
121  // 4.6
122  virtual void receiveInteraction (
123  rti13::InteractionClassHandle theInteraction, // supplied C1
124  const rti13::ParameterHandleValuePairSet& theParameters, // supplied C4
125  const rti13::FedTime& theTime, // supplied C4
126  const char *theTag, // supplied C4
127  rti13::EventRetractionHandle theHandle) // supplied C1
128  throw (
129  rti13::InteractionClassNotKnown,
130  rti13::InteractionParameterNotKnown,
131  rti13::InvalidFederationTime,
132  rti13::FederateInternalError);
133 
134  virtual void receiveInteraction (
135  rti13::InteractionClassHandle theInteraction, // supplied C1
136  const rti13::ParameterHandleValuePairSet& theParameters, // supplied C4
137  const char *theTag) // supplied C4
138  throw (
139  rti13::InteractionClassNotKnown,
140  rti13::InteractionParameterNotKnown,
141  rti13::FederateInternalError);
142 
143  virtual void removeObjectInstance (
144  rti13::ObjectHandle theObject, // supplied C1
145  const rti13::FedTime& theTime, // supplied C4
146  const char *theTag, // supplied C4
147  rti13::EventRetractionHandle theHandle) // supplied C1
148  throw (
149  rti13::ObjectNotKnown,
150  rti13::InvalidFederationTime,
151  rti13::FederateInternalError);
152 
153  virtual void removeObjectInstance (
154  rti13::ObjectHandle theObject, // supplied C1
155  const char *theTag) // supplied C4
156  throw (
157  rti13::ObjectNotKnown,
158  rti13::FederateInternalError);
159 
160 virtual void provideAttributeValueUpdate (
161  rti13::ObjectHandle theObject,
162  const rti13::AttributeHandleSet& theAttributes)
163 throw (
164  rti13::ObjectNotKnown,
165  rti13::AttributeNotKnown,
166  rti13::AttributeNotOwned,
167  rti13::FederateInternalError);
168 
169 virtual void timeRegulationEnabled (
170  const rti13::FedTime& theFederateTime) // supplied C4
171 throw (
172  rti13::InvalidFederationTime,
173  rti13::EnableTimeRegulationWasNotPending,
174  rti13::FederateInternalError);
175 
176 virtual void timeConstrainedEnabled (
177  const rti13::FedTime& theFederateTime) // supplied C4
178 throw (
179  rti13::InvalidFederationTime,
180  rti13::EnableTimeConstrainedWasNotPending,
181  rti13::FederateInternalError);
182 
183 virtual void timeAdvanceGrant (
184  const rti13::FedTime& theTime) // supplied C4
185 throw (
186  rti13::InvalidFederationTime,
187  rti13::TimeAdvanceWasNotInProgress,
188  rti13::FederateInternalError);
189 
191  const char *label) // supplied C4)
192 throw (
193  rti13::FederateInternalError);
194 
195 
197  const char *label) // supplied C4)
198 throw (
199  rti13::FederateInternalError);
200 
201 virtual void announceSynchronizationPoint (
202  const char *label, // supplied C4
203  const char *tag) // supplied C4
204 throw (
205  rti13::FederateInternalError);
206 
207 virtual void federationSynchronized (
208  const char *label) // supplied C4)
209 throw (
210  rti13::FederateInternalError);
211 
212 
213 public:
215 };
216 
Handle ObjectHandle
Definition: RTItypes13.h:116
std::map< rti13::ObjectHandle, std::string > objectInstanceMap
Definition: simpleTimeFedAmb13dlc.h:33
Definition: RTItypes13.h:236
std::map< std::string, RTI::AttributeHandle > DtAttrNameHandleMap
Definition: simpleDDMSimple13.h:25
std::set< std::string > ourAttrs
Definition: simpleTimeFedAmb13.h:45
Definition: rtiSimpleFedAmb13.h:37
MyFederateAmbassador(DtTalkAmbData &data)
bool isRegulating
Definition: simpleTimeFedAmb13.h:64
DtParamNameHandleMap theParamNameHandleMap
Definition: simpleTimeFedAmb13.h:42
DtAttrNameHandleMap theAttrNameHandleMap
Definition: simpleTimeFedAmb13.h:39
virtual void provideAttributeValueUpdate(RTI::ObjectHandle theObject, const RTI::AttributeHandleSet &theAttributes)
Definition: NullFederateAmbassador13.h:34
virtual void receiveInteraction(RTI::InteractionClassHandle theInteraction, const RTI::ParameterHandleValuePairSet &theParameters, const RTI::FedTime &theTime, const char *theTag, RTI::EventRetractionHandle theHandle)
bool registerSucceeded
Definition: simpleTimeFedAmb13.h:69
std::map< rti13::ObjectClassHandle, std::string > objectClassMap
Definition: simpleTimeFedAmb13dlc.h:32
virtual void synchronizationPointRegistrationSucceeded(const char *label)
virtual void synchronizationPointRegistrationFailed(const char *label)
ULong InteractionClassHandle
Definition: RTItypes13.h:106
virtual void removeObjectInstance(RTI::ObjectHandle theObject, const RTI::FedTime &theTime, const char *theTag, RTI::EventRetractionHandle theHandle)
bool timeAdvanced
Definition: simpleTimeFedAmb13.h:65
Definition: simpleTimeTimeManagedEntity.h:28
virtual void reflectAttributeValues(RTI::ObjectHandle theObject, const RTI::AttributeHandleValuePairSet &theAttributes, const RTI::FedTime &theTime, const char *theTag, RTI::EventRetractionHandle theHandle)
Definition: RTItypes13.h:138
bool isConstrained
Definition: simpleTimeFedAmb13.h:63
Definition: RTItypes13.h:521
DtTalkAmbData & myData
Definition: rtiSimpleFedAmb13.h:174
virtual void discoverObjectInstance(RTI::ObjectHandle theObject, RTI::ObjectClassHandle theObjectClass, const char *theObjectName)
virtual void timeAdvanceGrant(const RTI::FedTime &theTime)
timeManagedEntity timeManagedObject
Definition: simpleTimeFedAmb13.h:72
bool isMaster
Definition: simpleTimeFedAmb13.h:53
bool announceSyncReceived
Definition: simpleTimeFedAmb13.h:70
int numFederates
Definition: simpleTimeFedAmb13.h:58
Definition: rtiSimpleFedAmb13.h:13
std::map< rti13::ObjectHandle, rti13::AttributeHandleSet * > updateRequestMap
Definition: simpleTimeFedAmb13dlc.h:35
int otherFederatesReady
Definition: simpleTimeFedAmb13.h:67
Definition: RTItypes13.h:452
rti13::ParameterHandleValuePairSet * paramValues
Definition: simpleTimeFedAmb13dlc.h:61
std::map< std::string, RTI::ParameterHandle > DtParamNameHandleMap
Definition: simpleDDMSimple13.h:27
bool registerFailed
Definition: simpleTimeFedAmb13.h:68
virtual ~MyFederateAmbassador()
std::map< rti13::InteractionClassHandle, std::string > interactionClassMap
Definition: simpleTimeFedAmb13dlc.h:34
virtual void timeConstrainedEnabled(const RTI::FedTime &theFederateTime)
ULong ObjectClassHandle
Definition: RTItypes13.h:104
virtual void announceSynchronizationPoint(const char *label, const char *tag)
bool federationIsSynchronized
Definition: simpleTimeFedAmb13.h:71
virtual void federationSynchronized(const char *label)
std::set< std::string > ourParms
Definition: simpleTimeFedAmb13.h:48
Definition: RTItypes13.h:304
rti13::AttributeHandleValuePairSet * attrValues
Definition: simpleTimeFedAmb13dlc.h:60
virtual void timeRegulationEnabled(const RTI::FedTime &theFederateTime)

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)