MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rtiSimpleFedAmb1516.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2010 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #ifndef MyFederateAmbassador_H_
7 #define MyFederateAmbassador_H_
8 
9 #pragma warning(disable: 4251)
10 #pragma warning(disable: 4786)
11 #pragma warning(disable: 4290)
12 
13 #include <RTI/RTI1516.h>
14 #include <RTI/NullFederateAmbassador.h>
15 #include <string>
16 #include <map>
17 
18 using namespace rti1516;
19 
20 class DtTalkAmbData
21 {
22 public:
25  bool myReceivedInitiateFederateSave;
26  bool myReceivedFederationSaved;
27  bool myReceivedFederationNotSaved;
29  std::wstring mySaveLabel;
30  SaveFailureReason mySaveFailureReason;
31  FederateHandleSaveStatusPairVector myFederateHandleSaveStatus;
32 
33  bool myReceivedRequestFederationRestoreSucceeded;
34  bool myReceivedRequestFederationRestoreFailed;
35  bool myReceivedFederationRestoreBegun;
36  bool myReceivedInitiateFederateRestore;
37  bool myReceivedFederationRestored;
38  bool myReceivedFederationNotRestored;
40  std::wstring myRestoreLabel;
41  FederateHandle myRestoreFederateHandle;
42  RestoreFailureReason myRestoreFailureReason;
43  FederateHandleRestoreStatusPairVector myFederateHandleRestoreStatus;
44 
45  std::map<ObjectClassHandle, std::wstring> objectClassMap;
46  std::map<ObjectInstanceHandle, std::wstring> objectInstanceMap;
47  std::map<InteractionClassHandle, std::wstring> interactionClassMap;
48 };
49 
51 {
52 public:
53 
55 
56  virtual ~MyFederateAmbassador()
57  throw ();
58 
59  virtual void initiateFederateSave(
60  std::wstring const & label)
61  throw (UnableToPerformSave, FederateInternalError);
62 
63  virtual void federationSaved()
64  throw (FederateInternalError);
65 
66  virtual void federationNotSaved(SaveFailureReason theSaveFailureReason)
67  throw (FederateInternalError);
68 
69  virtual void federationSaveStatusResponse(
70  FederateHandleSaveStatusPairVector const & theFederateStatusVector)
71  throw (FederateInternalError);
72 
73 
74  // 4.19
75  virtual void requestFederationRestoreSucceeded(std::wstring const & label)
76  throw (FederateInternalError);
77 
78  virtual void requestFederationRestoreFailed(std::wstring const & label)
79  throw (FederateInternalError);
80 
81  // 4.20
82  virtual void federationRestoreBegun()
83  throw (FederateInternalError);
84 
85  // 4.21
86  virtual void initiateFederateRestore(
87  std::wstring const & label,
88  FederateHandle handle)
89  throw (SpecifiedSaveLabelDoesNotExist,
90  CouldNotInitiateRestore,
91  FederateInternalError);
92 
93  // 4.23
94  virtual void federationRestored()
95  throw (FederateInternalError);
96 
97  virtual void federationNotRestored(RestoreFailureReason theRestoreFailureReason)
98  throw (FederateInternalError);
99 
100  // 4.25
101  virtual void federationRestoreStatusResponse(
102  FederateHandleRestoreStatusPairVector const &
103  theFederateStatusVector)
104  throw (FederateInternalError);
105 
106  // 6.3
107  virtual
108  void
109  objectInstanceNameReservationSucceeded(std::wstring const &
110  theObjectInstanceName)
111  throw (UnknownName,
112  FederateInternalError);
113 
114  virtual
115  void
116  objectInstanceNameReservationFailed(std::wstring const &
117  theObjectInstanceName)
118  throw (UnknownName,
119  FederateInternalError);
120 
121  // 6.5
122  virtual void discoverObjectInstance (
123  ObjectInstanceHandle theObject,
124  ObjectClassHandle theObjectClass,
125  std::wstring const & theObjectInstanceName)
126  throw (
127  CouldNotDiscover,
128  ObjectClassNotKnown,
129  FederateInternalError);
130 
131  // 6.7
132  virtual
133  void
135  (ObjectInstanceHandle theObject,
136  AttributeHandleValueMap const & theAttributeValues,
137  VariableLengthData const & theUserSuppliedTag,
138  OrderType sentOrder,
139  TransportationType theType)
140  throw (ObjectInstanceNotKnown,
141  AttributeNotRecognized,
142  AttributeNotSubscribed,
143  FederateInternalError);
144 
145  virtual
146  void
148  (ObjectInstanceHandle theObject,
149  AttributeHandleValueMap const & theAttributeValues,
150  VariableLengthData const & theUserSuppliedTag,
151  OrderType sentOrder,
152  TransportationType theType,
153  RegionHandleSet const & theSentRegionHandleSet)
154  throw (ObjectInstanceNotKnown,
155  AttributeNotRecognized,
156  AttributeNotSubscribed,
157  FederateInternalError);
158 
159  virtual
160  void
162  (ObjectInstanceHandle theObject,
163  AttributeHandleValueMap const & theAttributeValues,
164  VariableLengthData const & theUserSuppliedTag,
165  OrderType sentOrder,
166  TransportationType theType,
167  LogicalTime const & theTime,
168  OrderType receivedOrder)
169  throw (ObjectInstanceNotKnown,
170  AttributeNotRecognized,
171  AttributeNotSubscribed,
172  FederateInternalError);
173 
174  virtual
175  void
177  (ObjectInstanceHandle theObject,
178  AttributeHandleValueMap const & theAttributeValues,
179  VariableLengthData const & theUserSuppliedTag,
180  OrderType sentOrder,
181  TransportationType theType,
182  LogicalTime const & theTime,
183  OrderType receivedOrder,
184  RegionHandleSet const & theSentRegionHandleSet)
185  throw (ObjectInstanceNotKnown,
186  AttributeNotRecognized,
187  AttributeNotSubscribed,
188  FederateInternalError);
189 
190  virtual
191  void
193  (ObjectInstanceHandle theObject,
194  AttributeHandleValueMap const & theAttributeValues,
195  VariableLengthData const & theUserSuppliedTag,
196  OrderType sentOrder,
197  TransportationType theType,
198  LogicalTime const & theTime,
199  OrderType receivedOrder,
200  MessageRetractionHandle theHandle)
201  throw (ObjectInstanceNotKnown,
202  AttributeNotRecognized,
203  AttributeNotSubscribed,
204  InvalidLogicalTime,
205  FederateInternalError);
206 
207  virtual
208  void
210  (ObjectInstanceHandle theObject,
211  AttributeHandleValueMap const & theAttributeValues,
212  VariableLengthData const & theUserSuppliedTag,
213  OrderType sentOrder,
214  TransportationType theType,
215  LogicalTime const & theTime,
216  OrderType receivedOrder,
217  MessageRetractionHandle theHandle,
218  RegionHandleSet const & theSentRegionHandleSet)
219  throw (ObjectInstanceNotKnown,
220  AttributeNotRecognized,
221  AttributeNotSubscribed,
222  InvalidLogicalTime,
223  FederateInternalError);
224 
225 
226  // 6.9
227  virtual
228  void
230  (InteractionClassHandle theInteraction,
231  ParameterHandleValueMap const & theParameterValues,
232  VariableLengthData const & theUserSuppliedTag,
233  OrderType sentOrder,
234  TransportationType theType)
235  throw (InteractionClassNotRecognized,
236  InteractionParameterNotRecognized,
237  InteractionClassNotSubscribed,
238  FederateInternalError);
239 
240  virtual
241  void
243  (InteractionClassHandle theInteraction,
244  ParameterHandleValueMap const & theParameterValues,
245  VariableLengthData const & theUserSuppliedTag,
246  OrderType sentOrder,
247  TransportationType theType,
248  RegionHandleSet const & theSentRegionHandleSet)
249  throw (InteractionClassNotRecognized,
250  InteractionParameterNotRecognized,
251  InteractionClassNotSubscribed,
252  FederateInternalError);
253 
254  virtual
255  void
257  (InteractionClassHandle theInteraction,
258  ParameterHandleValueMap const & theParameterValues,
259  VariableLengthData const & theUserSuppliedTag,
260  OrderType sentOrder,
261  TransportationType theType,
262  LogicalTime const & theTime,
263  OrderType receivedOrder)
264  throw (InteractionClassNotRecognized,
265  InteractionParameterNotRecognized,
266  InteractionClassNotSubscribed,
267  FederateInternalError);
268 
269  virtual
270  void
272  (InteractionClassHandle theInteraction,
273  ParameterHandleValueMap const & theParameterValues,
274  VariableLengthData const & theUserSuppliedTag,
275  OrderType sentOrder,
276  TransportationType theType,
277  LogicalTime const & theTime,
278  OrderType receivedOrder,
279  RegionHandleSet const & theSentRegionHandleSet)
280  throw (InteractionClassNotRecognized,
281  InteractionParameterNotRecognized,
282  InteractionClassNotSubscribed,
283  FederateInternalError);
284 
285  virtual
286  void
288  (InteractionClassHandle theInteraction,
289  ParameterHandleValueMap const & theParameterValues,
290  VariableLengthData const & theUserSuppliedTag,
291  OrderType sentOrder,
292  TransportationType theType,
293  LogicalTime const & theTime,
294  OrderType receivedOrder,
295  MessageRetractionHandle theHandle)
296  throw (InteractionClassNotRecognized,
297  InteractionParameterNotRecognized,
298  InteractionClassNotSubscribed,
299  InvalidLogicalTime,
300  FederateInternalError);
301 
302  virtual
303  void
305  (InteractionClassHandle theInteraction,
306  ParameterHandleValueMap const & theParameterValues,
307  VariableLengthData const & theUserSuppliedTag,
308  OrderType sentOrder,
309  TransportationType theType,
310  LogicalTime const & theTime,
311  OrderType receivedOrder,
312  MessageRetractionHandle theHandle,
313  RegionHandleSet const & theSentRegionHandleSet)
314  throw (InteractionClassNotRecognized,
315  InteractionParameterNotRecognized,
316  InteractionClassNotSubscribed,
317  InvalidLogicalTime,
318  FederateInternalError);
319 
320 
321  // 6.11
322  virtual
323  void
324  removeObjectInstance(ObjectInstanceHandle theObject,
325  VariableLengthData const & theUserSuppliedTag,
326  OrderType sentOrder)
327  throw (ObjectInstanceNotKnown,
328  FederateInternalError);
329 
330  virtual
331  void
332  removeObjectInstance(ObjectInstanceHandle theObject,
333  VariableLengthData const & theUserSuppliedTag,
334  OrderType sentOrder,
335  LogicalTime const & theTime,
336  OrderType receivedOrder)
337  throw (ObjectInstanceNotKnown,
338  FederateInternalError);
339 
340  virtual
341  void
342  removeObjectInstance(ObjectInstanceHandle theObject,
343  VariableLengthData const & theUserSuppliedTag,
344  OrderType sentOrder,
345  LogicalTime const & theTime,
346  OrderType receivedOrder,
347  MessageRetractionHandle theHandle)
348  throw (ObjectInstanceNotKnown,
349  InvalidLogicalTime,
350  FederateInternalError);
351 
352 public:
353  DtTalkAmbData & myData;
354 };
355 
356 #endif

Document ID: Generated on Mon Jul 9 10:30:41 EDT 2018 from SVN revision 190224
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)