MAK RTIspy API Documentation for HLA 1.3
simpleTimeFedAmb13.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2004 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: simpleTimeFedAmb13.h,v $ $Revision: 1.2 $ $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, RTI::AttributeHandle> DtAttrNameHandleMap;
22 typedef std::map<std::string, RTI::ParameterHandle> DtParamNameHandleMap;
23 
24 class DtTalkAmbData{
25 
26 public :
27  DtTalkAmbData();
29 
30 
31 public:
32  std::map<RTI::ObjectClassHandle, std::string> objectClassMap;
33  std::map<RTI::ObjectHandle, std::string> objectInstanceMap;
34  std::map<RTI::InteractionClassHandle, std::string> interactionClassMap;
35  std::map<RTI::ObjectHandle, RTI::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.
58 
59 
62 
72 };
73 
74 
76 {
77 public:
78 
80 
81  virtual ~MyFederateAmbassador()
82  throw (RTI::FederateInternalError);
83 
84 
86  // Object Management Services //
88 
89  virtual void discoverObjectInstance (
90  RTI::ObjectHandle theObject, // supplied C1
91  RTI::ObjectClassHandle theObjectClass, // supplied C1
92  const char* theObjectName) // supplied C4
93  throw (
94  RTI::CouldNotDiscover,
95  RTI::ObjectClassNotKnown,
96  RTI::FederateInternalError);
97 
98  virtual void reflectAttributeValues (
99  RTI::ObjectHandle theObject, // supplied C1
100  const RTI::AttributeHandleValuePairSet& theAttributes, // supplied C4
101  const RTI::FedTime& theTime, // supplied C1
102  const char *theTag, // supplied C4
103  RTI::EventRetractionHandle theHandle) // supplied C1
104  throw (
105  RTI::ObjectNotKnown,
106  RTI::AttributeNotKnown,
107  RTI::FederateOwnsAttributes,
108  RTI::InvalidFederationTime,
109  RTI::FederateInternalError);
110 
111  virtual void reflectAttributeValues (
112  RTI::ObjectHandle theObject, // supplied C1
113  const RTI::AttributeHandleValuePairSet& theAttributes, // supplied C4
114  const char *theTag) // supplied C4
115  throw (
116  RTI::ObjectNotKnown,
117  RTI::AttributeNotKnown,
118  RTI::FederateOwnsAttributes,
119  RTI::FederateInternalError);
120 
121  // 4.6
122  virtual void receiveInteraction (
123  RTI::InteractionClassHandle theInteraction, // supplied C1
124  const RTI::ParameterHandleValuePairSet& theParameters, // supplied C4
125  const RTI::FedTime& theTime, // supplied C4
126  const char *theTag, // supplied C4
127  RTI::EventRetractionHandle theHandle) // supplied C1
128  throw (
129  RTI::InteractionClassNotKnown,
130  RTI::InteractionParameterNotKnown,
131  RTI::InvalidFederationTime,
132  RTI::FederateInternalError);
133 
134  virtual void receiveInteraction (
135  RTI::InteractionClassHandle theInteraction, // supplied C1
136  const RTI::ParameterHandleValuePairSet& theParameters, // supplied C4
137  const char *theTag) // supplied C4
138  throw (
139  RTI::InteractionClassNotKnown,
140  RTI::InteractionParameterNotKnown,
141  RTI::FederateInternalError);
142 
143  virtual void removeObjectInstance (
144  RTI::ObjectHandle theObject, // supplied C1
145  const RTI::FedTime& theTime, // supplied C4
146  const char *theTag, // supplied C4
147  RTI::EventRetractionHandle theHandle) // supplied C1
148  throw (
149  RTI::ObjectNotKnown,
150  RTI::InvalidFederationTime,
151  RTI::FederateInternalError);
152 
153  virtual void removeObjectInstance (
154  RTI::ObjectHandle theObject, // supplied C1
155  const char *theTag) // supplied C4
156  throw (
157  RTI::ObjectNotKnown,
158  RTI::FederateInternalError);
159 
160 virtual void provideAttributeValueUpdate (
161  RTI::ObjectHandle theObject,
162  const RTI::AttributeHandleSet& theAttributes)
163 throw (
164  RTI::ObjectNotKnown,
165  RTI::AttributeNotKnown,
166  RTI::AttributeNotOwned,
167  RTI::FederateInternalError);
168 
169 virtual void timeRegulationEnabled (
170  const RTI::FedTime& theFederateTime) // supplied C4
171 throw (
172  RTI::InvalidFederationTime,
173  RTI::EnableTimeRegulationWasNotPending,
174  RTI::FederateInternalError);
175 
176 virtual void timeConstrainedEnabled (
177  const RTI::FedTime& theFederateTime) // supplied C4
178 throw (
179  RTI::InvalidFederationTime,
180  RTI::EnableTimeConstrainedWasNotPending,
181  RTI::FederateInternalError);
182 
183 virtual void timeAdvanceGrant (
184  const RTI::FedTime& theTime) // supplied C4
185 throw (
186  RTI::InvalidFederationTime,
187  RTI::TimeAdvanceWasNotInProgress,
188  RTI::FederateInternalError);
189 
191  const char *label) // supplied C4)
192 throw (
193  RTI::FederateInternalError);
194 
195 
197  const char *label) // supplied C4)
198 throw (
199  RTI::FederateInternalError);
200 
201 virtual void announceSynchronizationPoint (
202  const char *label, // supplied C4
203  const char *tag) // supplied C4
204 throw (
205  RTI::FederateInternalError);
206 
207 virtual void federationSynchronized (
208  const char *label) // supplied C4)
209 throw (
210  RTI::FederateInternalError);
211 
212 
213 public:
215 };
216 

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)