MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simpleTimeFedAmb13.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2018 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: simpleTimeFedAmb13.h,v $ $Revision: 1.2 $ $State: Exp $
7 *******************************************************************************/
8 
9 #pragma once
10 #pragma warning(disable: 4786)
11 #pragma warning(disable: 4290)
12 
13 #include "NullFederateAmbassador.hh"
14 #include <map>
15 #include <set>
16 #include <string>
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 
27  public :
28  DtTalkAmbData();
30 
31 
32  public:
33  std::map<RTI::ObjectClassHandle, std::string> objectClassMap;
34  std::map<RTI::ObjectHandle, std::string> objectInstanceMap;
35  std::map<RTI::InteractionClassHandle, std::string> interactionClassMap;
36  std::map<RTI::ObjectHandle, RTI::AttributeHandleSet*> updateRequestMap;
37 
38  // Map between strings and attribute handles
40 
41  // Map between strings and attribute handles
43 
44  // The set of Attributes that this federate's published objects will contain.
45  std::set <std::string> ourAttrs;
46 
47  // The set of Parameters that this federate's published interactions will contain.
48  std::set <std::string> ourParms;
49 
50  // This federation of simple objects has a single master object, (determined by command line arguments)
51  // The master federate will keep the other federates from entering their main loop of execution until
52  // all of numFederates have joined.
53  bool isMaster;
54 
55  // numFederates is the number of federates (including the master) that the master should wait to join the
56  // federation before it allows any federate to enter its main loop.
57  // This variable is only used by the master federate.
59 
60  RTI::AttributeHandleValuePairSet* attrValues;
61  RTI::ParameterHandleValuePairSet* paramValues;
62 
66  RTI::FedTime* time;
73 };
74 
75 
77 {
78 public:
79 
81 
82  virtual ~MyFederateAmbassador()
83  throw (RTI::FederateInternalError);
84 
85  virtual void discoverObjectInstance (
86  RTI::ObjectHandle theObject,
87  RTI::ObjectClassHandle theObjectClass,
88  const char* theObjectName)
89  throw (
90  RTI::CouldNotDiscover,
91  RTI::ObjectClassNotKnown,
92  RTI::FederateInternalError);
93 
94  virtual void reflectAttributeValues (
95  RTI::ObjectHandle theObject,
96  const RTI::AttributeHandleValuePairSet& theAttributes,
97  const RTI::FedTime& theTime,
98  const char *theTag,
100  throw (
101  RTI::ObjectNotKnown,
102  RTI::AttributeNotKnown,
103  RTI::FederateOwnsAttributes,
104  RTI::InvalidFederationTime,
105  RTI::FederateInternalError);
106 
107  virtual void reflectAttributeValues (
108  RTI::ObjectHandle theObject,
109  const RTI::AttributeHandleValuePairSet& theAttributes,
110  const char *theTag)
111  throw (
112  RTI::ObjectNotKnown,
113  RTI::AttributeNotKnown,
114  RTI::FederateOwnsAttributes,
115  RTI::FederateInternalError);
116 
117  // 4.6
118  virtual void receiveInteraction (
119  RTI::InteractionClassHandle theInteraction,
120  const RTI::ParameterHandleValuePairSet& theParameters,
121  const RTI::FedTime& theTime,
122  const char *theTag,
123  RTI::EventRetractionHandle theHandle)
124  throw (
125  RTI::InteractionClassNotKnown,
126  RTI::InteractionParameterNotKnown,
127  RTI::InvalidFederationTime,
128  RTI::FederateInternalError);
129 
130  virtual void receiveInteraction (
131  RTI::InteractionClassHandle theInteraction,
132  const RTI::ParameterHandleValuePairSet& theParameters,
133  const char *theTag)
134  throw (
135  RTI::InteractionClassNotKnown,
136  RTI::InteractionParameterNotKnown,
137  RTI::FederateInternalError);
138 
139  virtual void removeObjectInstance (
140  RTI::ObjectHandle theObject,
141  const RTI::FedTime& theTime,
142  const char *theTag,
143  RTI::EventRetractionHandle theHandle)
144  throw (
145  RTI::ObjectNotKnown,
146  RTI::InvalidFederationTime,
147  RTI::FederateInternalError);
148 
149  virtual void removeObjectInstance (
150  RTI::ObjectHandle theObject,
151  const char *theTag)
152  throw (
153  RTI::ObjectNotKnown,
154  RTI::FederateInternalError);
155 
156  virtual void provideAttributeValueUpdate (
157  RTI::ObjectHandle theObject,
158  const RTI::AttributeHandleSet& theAttributes)
159  throw (
160  RTI::ObjectNotKnown,
161  RTI::AttributeNotKnown,
162  RTI::AttributeNotOwned,
163  RTI::FederateInternalError);
164 
165  virtual void timeRegulationEnabled (
166  const RTI::FedTime& theFederateTime)
167  throw (
168  RTI::InvalidFederationTime,
169  RTI::EnableTimeRegulationWasNotPending,
170  RTI::FederateInternalError);
171 
172  virtual void timeConstrainedEnabled (
173  const RTI::FedTime& theFederateTime)
174  throw (
175  RTI::InvalidFederationTime,
176  RTI::EnableTimeConstrainedWasNotPending,
177  RTI::FederateInternalError);
178 
179  virtual void timeAdvanceGrant (
180  const RTI::FedTime& theTime)
181  throw (
182  RTI::InvalidFederationTime,
183  RTI::TimeAdvanceWasNotInProgress,
184  RTI::FederateInternalError);
185 
187  const char *label)
188  throw (
189  RTI::FederateInternalError);
190 
191 
193  const char *label)
194  throw (
195  RTI::FederateInternalError);
196 
197  virtual void announceSynchronizationPoint (
198  const char *label,
199  const char *tag)
200  throw (
201  RTI::FederateInternalError);
202 
203  virtual void federationSynchronized (
204  const char *label)
205  throw (
206  RTI::FederateInternalError);
207 
208 public:
210 };
211 

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)