MAK RTIspy API Documentation for HLA 1516
rtiSimpleFedAmb1516e.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 rti1516e;
19 
20 class DtTalkAmbData
21 {
22 public:
23  bool myNameReservationReturned;
24  bool myNameReservationSucceeded;
25  bool myReceivedInitiateFederateSave;
26  bool myReceivedFederationSaved;
27  bool myReceivedFederationNotSaved;
28  bool myReceivedFederationSaveStatusResponse;
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;
39  bool myReceivedFederationRestoreStatusResponse;
40  std::wstring myRestoreLabel;
41  FederateHandle myRestoreFederateHandle;
42  RestoreFailureReason myRestoreFailureReason;
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  // 4.17
60  virtual void initiateFederateSave(
61  std::wstring const & label)
62  throw (FederateInternalError);
63 
64  // 4.20
65  virtual void federationSaved()
66  throw (FederateInternalError);
67 
68  virtual void federationNotSaved(SaveFailureReason theSaveFailureReason)
69  throw (FederateInternalError);
70 
71  // 4.23
72  virtual void federationSaveStatusResponse(
73  FederateHandleSaveStatusPairVector const & theFederateStatusVector)
74  throw (FederateInternalError);
75 
76  // 4.25
77  virtual void requestFederationRestoreSucceeded(std::wstring const & label)
78  throw (FederateInternalError);
79 
80  virtual void requestFederationRestoreFailed(std::wstring const & label)
81  throw (FederateInternalError);
82 
83  // 4.26
84  virtual void federationRestoreBegun()
85  throw (FederateInternalError);
86 
87  // 4.27
88  virtual void initiateFederateRestore(
89  std::wstring const & label,
90  std::wstring const & federateName,
91  FederateHandle handle)
92  throw (FederateInternalError);
93 
94  // 4.29
95  virtual void federationRestored()
96  throw (FederateInternalError);
97 
98  virtual void federationNotRestored(RestoreFailureReason theRestoreFailureReason)
99  throw (FederateInternalError);
100 
101  // 4.32
102  virtual void federationRestoreStatusResponse(
104  theFederateRestoreStatusVector)
105  throw (FederateInternalError);
106 
107 
108  // 6.3
109  virtual void objectInstanceNameReservationSucceeded(
110  std::wstring const & theObjectInstanceName)
111  throw (FederateInternalError);
112 
113  virtual void objectInstanceNameReservationFailed(
114  std::wstring const & theObjectInstanceName)
115  throw (FederateInternalError);
116 
117  // 6.9
118  virtual void discoverObjectInstance (
119  ObjectInstanceHandle theObject,
120  ObjectClassHandle theObjectClass,
121  std::wstring const & theObjectInstanceName)
122  throw (FederateInternalError);
123 
124  virtual void discoverObjectInstance (
125  ObjectInstanceHandle theObject,
126  ObjectClassHandle theObjectClass,
127  std::wstring const & theObjectInstanceName,
128  FederateHandle producingFederate)
129  throw (FederateInternalError);
130 
131 
132  // 6.11
133  virtual void reflectAttributeValues(
134  ObjectInstanceHandle theObject,
135  AttributeHandleValueMap const & theAttributeValues,
136  VariableLengthData const & theUserSuppliedTag,
137  OrderType sentOrder,
138  TransportationType theType,
139  SupplementalReflectInfo theReflectInfo)
140  throw (FederateInternalError);
141 
142  virtual void reflectAttributeValues(
143  ObjectInstanceHandle theObject,
144  AttributeHandleValueMap const & theAttributeValues,
145  VariableLengthData const & theUserSuppliedTag,
146  OrderType sentOrder,
147  TransportationType theType,
148  LogicalTime const & theTime,
149  OrderType receivedOrder,
150  SupplementalReflectInfo theReflectInfo)
151  throw (FederateInternalError);
152 
153  virtual void reflectAttributeValues(
154  ObjectInstanceHandle theObject,
155  AttributeHandleValueMap const & theAttributeValues,
156  VariableLengthData const & theUserSuppliedTag,
157  OrderType sentOrder,
158  TransportationType theType,
159  LogicalTime const & theTime,
160  OrderType receivedOrder,
161  MessageRetractionHandle theHandle,
162  SupplementalReflectInfo theReflectInfo)
163  throw (FederateInternalError);
164 
165 
166  // 6.13
167  virtual void receiveInteraction (
168  InteractionClassHandle theInteraction,
169  ParameterHandleValueMap const & theParameterValues,
170  VariableLengthData const & theUserSuppliedTag,
171  OrderType sentOrder,
172  TransportationType theType,
173  SupplementalReceiveInfo theReceiveInfo)
174  throw (FederateInternalError);
175 
176  virtual void receiveInteraction (
177  InteractionClassHandle theInteraction,
178  ParameterHandleValueMap const & theParameterValues,
179  VariableLengthData const & theUserSuppliedTag,
180  OrderType sentOrder,
181  TransportationType theType,
182  LogicalTime const & theTime,
183  OrderType receivedOrder,
184  SupplementalReceiveInfo theReceiveInfo)
185  throw (FederateInternalError);
186 
187  virtual void receiveInteraction (
188  InteractionClassHandle theInteraction,
189  ParameterHandleValueMap const & theParameterValues,
190  VariableLengthData const & theUserSuppliedTag,
191  OrderType sentOrder,
192  TransportationType theType,
193  LogicalTime const & theTime,
194  OrderType receivedOrder,
195  MessageRetractionHandle theHandle,
196  SupplementalReceiveInfo theReceiveInfo)
197  throw (FederateInternalError);
198 
199 
200  // 6.15
201  virtual void removeObjectInstance (
202  ObjectInstanceHandle theObject,
203  VariableLengthData const & theUserSuppliedTag,
204  OrderType sentOrder,
205  SupplementalRemoveInfo theRemoveInfo)
206  throw (FederateInternalError);
207 
208  virtual void removeObjectInstance (
209  ObjectInstanceHandle theObject,
210  VariableLengthData const & theUserSuppliedTag,
211  OrderType sentOrder,
212  LogicalTime const & theTime,
213  OrderType receivedOrder,
214  SupplementalRemoveInfo theRemoveInfo)
215  throw (FederateInternalError);
216 
217  virtual void removeObjectInstance (
218  ObjectInstanceHandle theObject,
219  VariableLengthData const & theUserSuppliedTag,
220  OrderType sentOrder,
221  LogicalTime const & theTime,
222  OrderType receivedOrder,
223  MessageRetractionHandle theHandle,
224  SupplementalRemoveInfo theRemoveInfo)
225  throw (FederateInternalError);
226 
227  virtual void reportAttributeTransportationType (
228  ObjectInstanceHandle theObject,
229  AttributeHandle theAttribute,
230  TransportationType theTransportation)
231  throw (FederateInternalError);
232 
233  virtual void confirmAttributeTransportationTypeChange (
234  ObjectInstanceHandle theObject,
235  AttributeHandleSet theAttributes,
236  TransportationType theTransportation)
237  throw (
238  FederateInternalError);
239 
240  virtual void confirmInteractionTransportationTypeChange (
241  InteractionClassHandle theInteraction,
242  TransportationType theTransportation)
243  throw (
244  FederateInternalError);
245 
246  // 6.30
247  virtual void reportInteractionTransportationType (
248  FederateHandle federateHandle,
249  InteractionClassHandle theInteraction,
250  TransportationType theTransportation)
251  throw (
252  FederateInternalError);
253 
254  virtual void multipleObjectInstanceNameReservationSucceeded (
255  std::set<std::wstring> const & theObjectInstanceNames)
256  throw (
257  FederateInternalError);
258 
259  virtual void multipleObjectInstanceNameReservationFailed (
260  std::set<std::wstring> const & theObjectInstanceNames)
261  throw (
262  FederateInternalError);
263 
264 public:
265  DtTalkAmbData & myData;
266 };
267 
268 #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)