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 #pragma once
7 
8 #pragma warning(disable: 4251)
9 #pragma warning(disable: 4786)
10 #pragma warning(disable: 4290)
11 
12 #include <RTI/RTI1516.h>
13 #include <RTI/NullFederateAmbassador.h>
14 #include <string>
15 #include <map>
16 
17 class DtSimpleData
18 {
19 public:
22 
23  std::map<rti1516::ObjectClassHandle, std::wstring> objectClassMap;
24  std::map<rti1516::ObjectInstanceHandle, std::wstring> objectInstanceMap;
25 
27  {
28  clear();
29  }
30 
31  void clear()
32  {
35  objectClassMap.clear();
36  objectInstanceMap.clear();
37  }
38 };
39 
40 class MyFederateAmbassador : public rti1516::NullFederateAmbassador
41 {
42 public:
43 
45 
46  virtual ~MyFederateAmbassador()
47  throw ();
48 
49  // 6.3
51  std::wstring const & theObjectInstanceName)
52  throw (rti1516::UnknownName, rti1516::FederateInternalError);
53 
55  std::wstring const & theObjectInstanceName)
56  throw (rti1516::UnknownName, rti1516::FederateInternalError);
57 
58  // 6.5
59  virtual void discoverObjectInstance(
60  rti1516::ObjectInstanceHandle theObject,
61  rti1516::ObjectClassHandle theObjectClass,
62  std::wstring const & theObjectInstanceName)
63  throw (rti1516::CouldNotDiscover, rti1516::ObjectClassNotKnown, rti1516::FederateInternalError);
64 
65  // 6.7
66  virtual void reflectAttributeValues(
67  rti1516::ObjectInstanceHandle theObject,
68  rti1516::AttributeHandleValueMap const & theAttributeValues,
69  rti1516::VariableLengthData const & theUserSuppliedTag,
70  rti1516::OrderType sentOrder,
71  rti1516::TransportationType theType)
72  throw (rti1516::ObjectInstanceNotKnown, rti1516::AttributeNotRecognized, rti1516::AttributeNotSubscribed,
73  rti1516::FederateInternalError);
74 
75  virtual void reflectAttributeValues(
76  rti1516::ObjectInstanceHandle theObject,
77  rti1516::AttributeHandleValueMap const & theAttributeValues,
78  rti1516::VariableLengthData const & theUserSuppliedTag,
79  rti1516::OrderType sentOrder,
80  rti1516::TransportationType theType,rti1516::RegionHandleSet const & theSentRegionHandleSet)
81  throw (rti1516::ObjectInstanceNotKnown,rti1516::AttributeNotRecognized, rti1516::AttributeNotSubscribed,
82  rti1516::FederateInternalError);
83 
84  virtual void reflectAttributeValues(
85  rti1516::ObjectInstanceHandle theObject,
86  rti1516::AttributeHandleValueMap const & theAttributeValues,
87  rti1516::VariableLengthData const & theUserSuppliedTag,
88  rti1516::OrderType sentOrder,
89  rti1516::TransportationType theType,
90  rti1516::LogicalTime const & theTime,
91  rti1516::OrderType receivedOrder)
92  throw (rti1516::ObjectInstanceNotKnown, rti1516::AttributeNotRecognized, rti1516::AttributeNotSubscribed,
93  rti1516::FederateInternalError);
94 
95  virtual void reflectAttributeValues(
96  rti1516::ObjectInstanceHandle theObject,
97  rti1516::AttributeHandleValueMap const & theAttributeValues,
98  rti1516::VariableLengthData const & theUserSuppliedTag,
99  rti1516::OrderType sentOrder,
100  rti1516::TransportationType theType,
101  rti1516::LogicalTime const & theTime,
102  rti1516::OrderType receivedOrder,
103  rti1516::RegionHandleSet const & theSentRegionHandleSet)
104  throw (rti1516::ObjectInstanceNotKnown, rti1516::AttributeNotRecognized, rti1516::AttributeNotSubscribed,
105  rti1516::FederateInternalError);
106 
107  virtual void reflectAttributeValues(
108  rti1516::ObjectInstanceHandle theObject,
109  rti1516::AttributeHandleValueMap const & theAttributeValues,
110  rti1516::VariableLengthData const & theUserSuppliedTag,
111  rti1516::OrderType sentOrder,
112  rti1516::TransportationType theType,
113  rti1516::LogicalTime const & theTime,
114  rti1516::OrderType receivedOrder,
115  rti1516::MessageRetractionHandle theHandle)
116  throw (rti1516::ObjectInstanceNotKnown, rti1516::AttributeNotRecognized, rti1516::AttributeNotSubscribed,
117  rti1516::InvalidLogicalTime, rti1516::FederateInternalError);
118 
119  virtual void reflectAttributeValues(
120  rti1516::ObjectInstanceHandle theObject,
121  rti1516::AttributeHandleValueMap const & theAttributeValues,
122  rti1516::VariableLengthData const & theUserSuppliedTag,
123  rti1516::OrderType sentOrder,
124  rti1516::TransportationType theType,
125  rti1516::LogicalTime const & theTime,
126  rti1516::OrderType receivedOrder,
127  rti1516::MessageRetractionHandle theHandle,
128  rti1516::RegionHandleSet const & theSentRegionHandleSet)
129  throw (rti1516::ObjectInstanceNotKnown, rti1516::AttributeNotRecognized, rti1516::AttributeNotSubscribed,
130  rti1516::InvalidLogicalTime, rti1516::FederateInternalError);
131 
132  // 6.9
133  virtual void receiveInteraction(
134  rti1516::InteractionClassHandle theInteraction,
135  rti1516::ParameterHandleValueMap const & theParameterValues,
136  rti1516::VariableLengthData const & theUserSuppliedTag,
137  rti1516::OrderType sentOrder,
138  rti1516::TransportationType theType)
139  throw (rti1516::InteractionClassNotRecognized, rti1516::InteractionParameterNotRecognized,
140  rti1516::InteractionClassNotSubscribed, rti1516::FederateInternalError);
141 
142  virtual void receiveInteraction(
143  rti1516::InteractionClassHandle theInteraction,
144  rti1516::ParameterHandleValueMap const & theParameterValues,
145  rti1516::VariableLengthData const & theUserSuppliedTag,
146  rti1516::OrderType sentOrder,
147  rti1516::TransportationType theType,
148  rti1516::RegionHandleSet const & theSentRegionHandleSet)
149  throw (rti1516::InteractionClassNotRecognized, rti1516::InteractionParameterNotRecognized,
150  rti1516::InteractionClassNotSubscribed, rti1516::FederateInternalError);
151 
152  virtual void receiveInteraction(
153  rti1516::InteractionClassHandle theInteraction,
154  rti1516::ParameterHandleValueMap const & theParameterValues,
155  rti1516::VariableLengthData const & theUserSuppliedTag,
156  rti1516::OrderType sentOrder,
157  rti1516::TransportationType theType,
158  rti1516::LogicalTime const & theTime,
159  rti1516::OrderType receivedOrder)
160  throw (rti1516::InteractionClassNotRecognized, rti1516::InteractionParameterNotRecognized,
161  rti1516::InteractionClassNotSubscribed, rti1516::FederateInternalError);
162 
163  virtual void receiveInteraction(
164  rti1516::InteractionClassHandle theInteraction,
165  rti1516::ParameterHandleValueMap const & theParameterValues,
166  rti1516::VariableLengthData const & theUserSuppliedTag,
167  rti1516::OrderType sentOrder,
168  rti1516::TransportationType theType,
169  rti1516::LogicalTime const & theTime,
170  rti1516::OrderType receivedOrder,
171  rti1516::RegionHandleSet const & theSentRegionHandleSet)
172  throw (rti1516::InteractionClassNotRecognized, rti1516::InteractionParameterNotRecognized,
173  rti1516::InteractionClassNotSubscribed, rti1516::FederateInternalError);
174 
175  virtual void receiveInteraction(
176  rti1516::InteractionClassHandle theInteraction,
177  rti1516::ParameterHandleValueMap const & theParameterValues,
178  rti1516::VariableLengthData const & theUserSuppliedTag,
179  rti1516::OrderType sentOrder,
180  rti1516::TransportationType theType,
181  rti1516::LogicalTime const & theTime,
182  rti1516::OrderType receivedOrder,
183  rti1516::MessageRetractionHandle theHandle)
184  throw (rti1516::InteractionClassNotRecognized, rti1516::InteractionParameterNotRecognized,
185  rti1516::InteractionClassNotSubscribed, rti1516::InvalidLogicalTime, rti1516::FederateInternalError);
186 
187  virtual void receiveInteraction(
188  rti1516::InteractionClassHandle theInteraction,
189  rti1516::ParameterHandleValueMap const & theParameterValues,
190  rti1516::VariableLengthData const & theUserSuppliedTag,
191  rti1516::OrderType sentOrder,
192  rti1516::TransportationType theType,
193  rti1516::LogicalTime const & theTime,
194  rti1516::OrderType receivedOrder,
195  rti1516::MessageRetractionHandle theHandle,
196  rti1516::RegionHandleSet const & theSentRegionHandleSet)
197  throw (rti1516::InteractionClassNotRecognized, rti1516::InteractionParameterNotRecognized,
198  rti1516::InteractionClassNotSubscribed, rti1516::InvalidLogicalTime, rti1516::FederateInternalError);
199 
200 
201  // 6.11
202  virtual void removeObjectInstance(
203  rti1516::ObjectInstanceHandle theObject,
204  rti1516::VariableLengthData const & theUserSuppliedTag,
205  rti1516::OrderType sentOrder)
206  throw (rti1516::ObjectInstanceNotKnown, rti1516::FederateInternalError);
207 
208  virtual void removeObjectInstance(
209  rti1516::ObjectInstanceHandle theObject,
210  rti1516::VariableLengthData const & theUserSuppliedTag,
211  rti1516::OrderType sentOrder,
212  rti1516::LogicalTime const & theTime,
213  rti1516::OrderType receivedOrder)
214  throw (rti1516::ObjectInstanceNotKnown, rti1516::FederateInternalError);
215 
216  virtual void removeObjectInstance(
217  rti1516::ObjectInstanceHandle theObject,
218  rti1516::VariableLengthData const & theUserSuppliedTag,
219  rti1516::OrderType sentOrder,
220  rti1516::LogicalTime const & theTime,
221  rti1516::OrderType receivedOrder,
222  rti1516::MessageRetractionHandle theHandle)
223  throw (rti1516::ObjectInstanceNotKnown, rti1516::InvalidLogicalTime, rti1516::FederateInternalError);
224 
225 public:
227 };
virtual void objectInstanceNameReservationFailed(std::wstring const &theObjectInstanceName)
OrderType
Definition: datatypes.pb.h:472
Data for interacting with the federate ambassador.
Definition: rtiSimpleFedAmb13.h:15
Basic federate ambassador service callback implementation.
Definition: rtiSimpleFedAmb13.h:35
bool nameReservationSucceeded
Definition: rtiSimpleFedAmb1516.h:21
virtual void receiveInteraction(RTI::InteractionClassHandle theInteraction, const RTI::ParameterHandleValuePairSet &theParameters, const RTI::FedTime &theTime, const char *theTag, RTI::EventRetractionHandle theHandle)
void clear()
Definition: rtiSimpleFedAmb13.h:27
virtual void objectInstanceNameReservationSucceeded(std::wstring const &theObjectInstanceName)
bool nameReservationReturned
Definition: rtiSimpleFedAmb1516.h:20
virtual void throw(rti1516::InvalidLogicalTime, rti1516::NoRequestToEnableTimeRegulationWasPending, rti1516::FederateInternalError)
ULong InteractionClassHandle
Definition: RTItypes13.h:106
TransportationType
Definition: rtiAmbassadorFedProBase.h:43
virtual void removeObjectInstance(RTI::ObjectHandle theObject, const RTI::FedTime &theTime, const char *theTag, RTI::EventRetractionHandle theHandle)
std::map< RTI::ObjectHandle, std::string > objectInstanceMap
Definition: rtiSimpleFedAmb13.h:19
virtual void reflectAttributeValues(RTI::ObjectHandle theObject, const RTI::AttributeHandleValuePairSet &theAttributes, const RTI::FedTime &theTime, const char *theTag, RTI::EventRetractionHandle theHandle)
DtSimpleData & myData
Definition: rtiSimpleFedAmb13.h:98
virtual void discoverObjectInstance(RTI::ObjectHandle theObject, RTI::ObjectClassHandle theObjectClass, const char *theObjectName)
DtSimpleData()
Definition: rtiSimpleFedAmb1516.h:26
std::map< rti1516::ObjectInstanceHandle, std::wstring > objectInstanceMap
Definition: rtiSimpleFedAmb1516.h:24
std::map< RTI::ObjectClassHandle, std::string > objectClassMap
Definition: rtiSimpleFedAmb13.h:18
std::map< rti1516::ObjectClassHandle, std::wstring > objectClassMap
Definition: rtiSimpleFedAmb1516.h:23
virtual ~MyFederateAmbassador()
ULong ObjectClassHandle
Definition: RTItypes13.h:104
MyFederateAmbassador(DtSimpleData &data)

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)