MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simpleDDMFedAmb1516.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2006 MaK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: simpleDDMFedAmb1516.h,v $ $Revision: 1.1 $ $State: Exp $
7 ******************************************************************************/
8 
9 // The Federate Ambassador discovers and remove objects and
10 // processes object reflects and recieve interactions. It also notes
11 // attribute scope advisories
12 
13 #ifndef MyFederateAmbassador_H_
14 #define MyFederateAmbassador_H_
15 
16 #include "simpleDDMStringUtil.h"
17 
18 #include <map>
19 #include <RTI/RTI1516.h>
21 #include <string>
22 
23 // Data exchanged between federate and Federate Ambassador
24 class DtTalkAmbData
25 {
26 public:
29  std::map<rti1516::ObjectClassHandle, std::wstring> objectClassMap;
30  std::map<rti1516::ObjectInstanceHandle, std::wstring> objectInstanceMap;
31  std::map<rti1516::InteractionClassHandle, std::wstring> interactionClassMap;
32  rti1516::AttributeHandle myPositionHandle;
33  int position;
34  int lowerListen;
35  int upperListen;
36  int lowerSend;
37  int upperSend;
39  bool isPublisher;
40 };
41 
42 class MyFederateAmbassador : public rti1516::NullFederateAmbassador
43 {
44 public:
45 
47 
48  virtual ~MyFederateAmbassador()
49  throw ();
50 
51  virtual
52  void
54  (std::wstring const & theObjectInstanceName)
55  throw (rti1516::UnknownName,
56  rti1516::FederateInternalError);
57 
58  virtual
59  void
61  (std::wstring const & theObjectInstanceName)
62  throw (rti1516::UnknownName,
63  rti1516::FederateInternalError);
64 
65  virtual
66  void
68  (rti1516::ObjectInstanceHandle theObject,
69  rti1516::ObjectClassHandle theObjectClass,
70  std::wstring const & theObjectInstanceName)
71  throw (rti1516::CouldNotDiscover,
72  rti1516::ObjectClassNotKnown,
73  rti1516::FederateInternalError);
74 
75 
76  virtual
77  void
79  (rti1516::ObjectInstanceHandle theObject,
80  rti1516::AttributeHandleValueMap const & theAttributeValues,
81  rti1516::VariableLengthData const & theUserSuppliedTag,
82  rti1516::OrderType sentOrder,
84  throw (rti1516::ObjectInstanceNotKnown,
85  rti1516::AttributeNotRecognized,
86  rti1516::AttributeNotSubscribed,
87  rti1516::FederateInternalError);
88 
89  virtual
90  void
92  (rti1516::ObjectInstanceHandle theObject,
93  rti1516::AttributeHandleValueMap const & theAttributeValues,
94  rti1516::VariableLengthData const & theUserSuppliedTag,
95  rti1516::OrderType sentOrder,
97  rti1516::RegionHandleSet const & theSentRegionHandleSet)
98  throw (rti1516::ObjectInstanceNotKnown,
99  rti1516::AttributeNotRecognized,
100  rti1516::AttributeNotSubscribed,
101  rti1516::FederateInternalError);
102 
103  virtual
104  void
106  (rti1516::ObjectInstanceHandle theObject,
107  rti1516::AttributeHandleValueMap const & theAttributeValues,
108  rti1516::VariableLengthData const & theUserSuppliedTag,
109  rti1516::OrderType sentOrder,
111  rti1516::LogicalTime const & theTime,
112  rti1516::OrderType receivedOrder)
113  throw (rti1516::ObjectInstanceNotKnown,
114  rti1516::AttributeNotRecognized,
115  rti1516::AttributeNotSubscribed,
116  rti1516::FederateInternalError);
117 
118  virtual
119  void
121  (rti1516::ObjectInstanceHandle theObject,
122  rti1516::AttributeHandleValueMap const & theAttributeValues,
123  rti1516::VariableLengthData const & theUserSuppliedTag,
124  rti1516::OrderType sentOrder,
126  rti1516::LogicalTime const & theTime,
127  rti1516::OrderType receivedOrder,
128  rti1516::RegionHandleSet const & theSentRegionHandleSet)
129  throw (rti1516::ObjectInstanceNotKnown,
130  rti1516::AttributeNotRecognized,
131  rti1516::AttributeNotSubscribed,
132  rti1516::FederateInternalError);
133 
134  virtual
135  void
137  (rti1516::ObjectInstanceHandle theObject,
138  rti1516::AttributeHandleValueMap const & theAttributeValues,
139  rti1516::VariableLengthData const & theUserSuppliedTag,
140  rti1516::OrderType sentOrder,
142  rti1516::LogicalTime const & theTime,
143  rti1516::OrderType receivedOrder,
144  rti1516::MessageRetractionHandle theHandle)
145  throw (rti1516::ObjectInstanceNotKnown,
146  rti1516::AttributeNotRecognized,
147  rti1516::AttributeNotSubscribed,
148  rti1516::InvalidLogicalTime,
149  rti1516::FederateInternalError);
150 
151  virtual
152  void
154  (rti1516::ObjectInstanceHandle theObject,
155  rti1516::AttributeHandleValueMap const & theAttributeValues,
156  rti1516::VariableLengthData const & theUserSuppliedTag,
157  rti1516::OrderType sentOrder,
159  rti1516::LogicalTime const & theTime,
160  rti1516::OrderType receivedOrder,
161  rti1516::MessageRetractionHandle theHandle,
162  rti1516::RegionHandleSet const & theSentRegionHandleSet)
163  throw (rti1516::ObjectInstanceNotKnown,
164  rti1516::AttributeNotRecognized,
165  rti1516::AttributeNotSubscribed,
166  rti1516::InvalidLogicalTime,
167  rti1516::FederateInternalError);
168 
169  virtual
170  void
172  (rti1516::InteractionClassHandle theInteraction,
173  rti1516::ParameterHandleValueMap const & theParameterValues,
174  rti1516::VariableLengthData const & theUserSuppliedTag,
175  rti1516::OrderType sentOrder,
177  throw (rti1516::InteractionClassNotRecognized,
178  rti1516::InteractionParameterNotRecognized,
179  rti1516::InteractionClassNotSubscribed,
180  rti1516::FederateInternalError);
181 
182  virtual
183  void
185  (rti1516::InteractionClassHandle theInteraction,
186  rti1516::ParameterHandleValueMap const & theParameterValues,
187  rti1516::VariableLengthData const & theUserSuppliedTag,
188  rti1516::OrderType sentOrder,
190  rti1516::RegionHandleSet const & theSentRegionHandleSet)
191  throw (rti1516::InteractionClassNotRecognized,
192  rti1516::InteractionParameterNotRecognized,
193  rti1516::InteractionClassNotSubscribed,
194  rti1516::FederateInternalError);
195 
196  virtual
197  void
199  (rti1516::InteractionClassHandle theInteraction,
200  rti1516::ParameterHandleValueMap const & theParameterValues,
201  rti1516::VariableLengthData const & theUserSuppliedTag,
202  rti1516::OrderType sentOrder,
204  rti1516::LogicalTime const & theTime,
205  rti1516::OrderType receivedOrder)
206  throw (rti1516::InteractionClassNotRecognized,
207  rti1516::InteractionParameterNotRecognized,
208  rti1516::InteractionClassNotSubscribed,
209  rti1516::FederateInternalError);
210 
211  virtual
212  void
214  (rti1516::InteractionClassHandle theInteraction,
215  rti1516::ParameterHandleValueMap const & theParameterValues,
216  rti1516::VariableLengthData const & theUserSuppliedTag,
217  rti1516::OrderType sentOrder,
219  rti1516::LogicalTime const & theTime,
220  rti1516::OrderType receivedOrder,
221  rti1516::RegionHandleSet const & theSentRegionHandleSet)
222  throw (rti1516::InteractionClassNotRecognized,
223  rti1516::InteractionParameterNotRecognized,
224  rti1516::InteractionClassNotSubscribed,
225  rti1516::FederateInternalError);
226 
227  virtual
228  void
230  (rti1516::InteractionClassHandle theInteraction,
231  rti1516::ParameterHandleValueMap const & theParameterValues,
232  rti1516::VariableLengthData const & theUserSuppliedTag,
233  rti1516::OrderType sentOrder,
235  rti1516::LogicalTime const & theTime,
236  rti1516::OrderType receivedOrder,
237  rti1516::MessageRetractionHandle theHandle)
238  throw (rti1516::InteractionClassNotRecognized,
239  rti1516::InteractionParameterNotRecognized,
240  rti1516::InteractionClassNotSubscribed,
241  rti1516::InvalidLogicalTime,
242  rti1516::FederateInternalError);
243 
244  virtual
245  void
247  (rti1516::InteractionClassHandle theInteraction,
248  rti1516::ParameterHandleValueMap const & theParameterValues,
249  rti1516::VariableLengthData const & theUserSuppliedTag,
250  rti1516::OrderType sentOrder,
252  rti1516::LogicalTime const & theTime,
253  rti1516::OrderType receivedOrder,
254  rti1516::MessageRetractionHandle theHandle,
255  rti1516::RegionHandleSet const & theSentRegionHandleSet)
256  throw (rti1516::InteractionClassNotRecognized,
257  rti1516::InteractionParameterNotRecognized,
258  rti1516::InteractionClassNotSubscribed,
259  rti1516::InvalidLogicalTime,
260  rti1516::FederateInternalError);
261 
262  virtual
263  void
264  removeObjectInstance(rti1516::ObjectInstanceHandle theObject,
265  rti1516::VariableLengthData const & theUserSuppliedTag,
266  rti1516::OrderType sentOrder)
267  throw (rti1516::ObjectInstanceNotKnown,
268  rti1516::FederateInternalError);
269 
270  virtual
271  void
272  removeObjectInstance(rti1516::ObjectInstanceHandle theObject,
273  rti1516::VariableLengthData const & theUserSuppliedTag,
274  rti1516::OrderType sentOrder,
275  rti1516::LogicalTime const & theTime,
276  rti1516::OrderType receivedOrder)
277  throw (rti1516::ObjectInstanceNotKnown,
278  rti1516::FederateInternalError);
279 
280  virtual
281  void
282  removeObjectInstance(rti1516::ObjectInstanceHandle theObject,
283  rti1516::VariableLengthData const & theUserSuppliedTag,
284  rti1516::OrderType sentOrder,
285  rti1516::LogicalTime const & theTime,
286  rti1516::OrderType receivedOrder,
287  rti1516::MessageRetractionHandle theHandle)
288  throw (rti1516::ObjectInstanceNotKnown,
289  rti1516::InvalidLogicalTime,
290  rti1516::FederateInternalError);
291 
292  virtual
293  void
295  (rti1516::ObjectInstanceHandle theObject,
296  rti1516::AttributeHandleSet const & theAttributes)
297  throw (rti1516::ObjectInstanceNotKnown,
298  rti1516::AttributeNotRecognized,
299  rti1516::AttributeNotSubscribed,
300  rti1516::FederateInternalError) ;
301 
302  virtual
303  void
305  (rti1516::ObjectInstanceHandle theObject,
306  rti1516::AttributeHandleSet const & theAttributes)
307  throw (rti1516::ObjectInstanceNotKnown,
308  rti1516::AttributeNotRecognized,
309  rti1516::AttributeNotSubscribed,
310  rti1516::FederateInternalError) ;
311 
312 public:
314 };
315 
316 #endif
bool enableScopeAdvisories
Definition: simpleDDMFedAmb13.h:35
virtual void objectInstanceNameReservationFailed(std::wstring const &theObjectInstanceName)
A convenience header provided for developers that would like to include everything all at once...
OrderType
Definition: datatypes.pb.h:472
virtual void attributesInScope(RTI::ObjectHandle theObject, const RTI::AttributeHandleSet &theAttributes)
int upperSend
Definition: simpleDDMFedAmb13.h:34
Basic federate ambassador service callback implementation.
Definition: rtiSimpleFedAmb13.h:35
std::set< AttributeHandle > AttributeHandleSet
Definition: Typedefs.h:35
virtual void receiveInteraction(RTI::InteractionClassHandle theInteraction, const RTI::ParameterHandleValuePairSet &theParameters, const RTI::FedTime &theTime, const char *theTag, RTI::EventRetractionHandle theHandle)
virtual void objectInstanceNameReservationSucceeded(std::wstring const &theObjectInstanceName)
TransportationType
Definition: rtiAmbassadorFedProBase.h:43
virtual void removeObjectInstance(RTI::ObjectHandle theObject, const RTI::FedTime &theTime, const char *theTag, RTI::EventRetractionHandle theHandle)
int lowerListen
Definition: simpleDDMFedAmb13.h:31
virtual void reflectAttributeValues(RTI::ObjectHandle theObject, const RTI::AttributeHandleValuePairSet &theAttributes, const RTI::FedTime &theTime, const char *theTag, RTI::EventRetractionHandle theHandle)
int position
Definition: simpleDDMFedAmb13.h:30
std::map< rti1516::InteractionClassHandle, std::wstring > interactionClassMap
Definition: simpleDDMFedAmb1516.h:31
DtSimpleData & myData
Definition: rtiSimpleFedAmb13.h:98
virtual void discoverObjectInstance(RTI::ObjectHandle theObject, RTI::ObjectClassHandle theObjectClass, const char *theObjectName)
int lowerSend
Definition: simpleDDMFedAmb13.h:33
std::set< RegionHandle > RegionHandleSet
Definition: Typedefs.h:39
std::map< rti1516::ObjectClassHandle, std::wstring > objectClassMap
Definition: simpleDDMFedAmb1516.h:29
Definition: rtiSimpleFedAmb13dlc.h:15
virtual void attributesOutOfScope(RTI::ObjectHandle theObject, const RTI::AttributeHandleSet &theAttributes)
bool isPublisher
Definition: simpleDDMFedAmb13.h:36
int upperListen
Definition: simpleDDMFedAmb13.h:32
std::map< AttributeHandle, VariableLengthData > AttributeHandleValueMap
Definition: Typedefs.h:44
virtual ~MyFederateAmbassador()
bool myNameReservationSucceeded
Definition: simpleDDMFedAmb1516.h:28
rti1516::AttributeHandle myPositionHandle
Definition: simpleDDMFedAmb1516.h:32
This file provides an example derivation of the rti1516_2025::FederateAmbassador with NULL actions fo...
MyFederateAmbassador(DtSimpleData &data)
bool myNameReservationReturned
Definition: simpleDDMFedAmb1516.h:27
std::map< rti1516::ObjectInstanceHandle, std::wstring > objectInstanceMap
Definition: simpleDDMFedAmb1516.h:30
std::map< ParameterHandle, VariableLengthData > ParameterHandleValueMap
Definition: Typedefs.h:49

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)