MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simpleDDMFedAmb1516e.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2010 MaK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: simpleDDMFedAmb1516e.h,v $ $Revision: 1.0 $ $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 #ifdef DtHLA1516E
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<rti1516e::ObjectClassHandle, std::wstring> objectClassMap;
30  std::map<rti1516e::ObjectInstanceHandle, std::wstring> objectInstanceMap;
31  std::map<rti1516e::InteractionClassHandle, std::wstring> interactionClassMap;
32  rti1516e::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 rti1516e::NullFederateAmbassador
43 {
44 public:
46 
47  virtual ~MyFederateAmbassador()
48  throw();
49 
50 
51  // 6.3
53  std::wstring const & theObjectInstanceName)
54  throw (
55  rti1516e::FederateInternalError);
56 
58  std::wstring const & theObjectInstanceName)
59  throw (
60  rti1516e::FederateInternalError);
61 
62  // 6.9
63  virtual void discoverObjectInstance (
64  rti1516e::ObjectInstanceHandle theObject,
65  rti1516e::ObjectClassHandle theObjectClass,
66  std::wstring const & theObjectInstanceName)
67  throw (
68  rti1516e::FederateInternalError);
69 
70  virtual void discoverObjectInstance (
71  rti1516e::ObjectInstanceHandle theObject,
72  rti1516e::ObjectClassHandle theObjectClass,
73  std::wstring const & theObjectInstanceName,
74  rti1516e::FederateHandle producingFederate)
75  throw (
76  rti1516e::FederateInternalError);
77 
78  // 6.11
79  virtual void reflectAttributeValues (
80  rti1516e::ObjectInstanceHandle theObject,
81  rti1516e::AttributeHandleValueMap const & theAttributeValues,
82  rti1516e::VariableLengthData const & theUserSuppliedTag,
83  rti1516e::OrderType sentOrder,
84  rti1516e::TransportationType theType,
85  rti1516e::SupplementalReflectInfo theReflectInfo)
86  throw (
87  rti1516e::FederateInternalError);
88 
89  virtual void reflectAttributeValues (
90  rti1516e::ObjectInstanceHandle theObject,
91  rti1516e::AttributeHandleValueMap const & theAttributeValues,
92  rti1516e::VariableLengthData const & theUserSuppliedTag,
93  rti1516e::OrderType sentOrder,
94  rti1516e::TransportationType theType,
95  rti1516e::LogicalTime const & theTime,
96  rti1516e::OrderType receivedOrder,
97  rti1516e::SupplementalReflectInfo theReflectInfo)
98  throw (
99  rti1516e::FederateInternalError);
100 
101  virtual void reflectAttributeValues (
102  rti1516e::ObjectInstanceHandle theObject,
103  rti1516e::AttributeHandleValueMap const & theAttributeValues,
104  rti1516e::VariableLengthData const & theUserSuppliedTag,
105  rti1516e::OrderType sentOrder,
106  rti1516e::TransportationType theType,
107  rti1516e::LogicalTime const & theTime,
108  rti1516e::OrderType receivedOrder,
109  rti1516e::MessageRetractionHandle theHandle,
110  rti1516e::SupplementalReflectInfo theReflectInfo)
111  throw (
112  rti1516e::FederateInternalError);
113 
114  // 6.13
115  virtual void receiveInteraction (
116  rti1516e::InteractionClassHandle theInteraction,
117  rti1516e::ParameterHandleValueMap const & theParameterValues,
118  rti1516e::VariableLengthData const & theUserSuppliedTag,
119  rti1516e::OrderType sentOrder,
120  rti1516e::TransportationType theType,
121  rti1516e::SupplementalReceiveInfo theReceiveInfo)
122  throw (
123  rti1516e::FederateInternalError);
124 
125  virtual void receiveInteraction (
126  rti1516e::InteractionClassHandle theInteraction,
127  rti1516e::ParameterHandleValueMap const & theParameterValues,
128  rti1516e::VariableLengthData const & theUserSuppliedTag,
129  rti1516e::OrderType sentOrder,
130  rti1516e::TransportationType theType,
131  rti1516e::LogicalTime const & theTime,
132  rti1516e::OrderType receivedOrder,
133  rti1516e::SupplementalReceiveInfo theReceiveInfo)
134  throw (
135  rti1516e::FederateInternalError);
136 
137  virtual void receiveInteraction (
138  rti1516e::InteractionClassHandle theInteraction,
139  rti1516e::ParameterHandleValueMap const & theParameterValues,
140  rti1516e::VariableLengthData const & theUserSuppliedTag,
141  rti1516e::OrderType sentOrder,
142  rti1516e::TransportationType theType,
143  rti1516e::LogicalTime const & theTime,
144  rti1516e::OrderType receivedOrder,
145  rti1516e::MessageRetractionHandle theHandle,
146  rti1516e::SupplementalReceiveInfo theReceiveInfo)
147  throw (
148  rti1516e::FederateInternalError);
149 
150  // 6.15
151  virtual void removeObjectInstance (
152  rti1516e::ObjectInstanceHandle theObject,
153  rti1516e::VariableLengthData const & theUserSuppliedTag,
154  rti1516e::OrderType sentOrder,
155  rti1516e::SupplementalRemoveInfo theRemoveInfo)
156  throw (
157  rti1516e::FederateInternalError);
158 
159  virtual void removeObjectInstance (
160  rti1516e::ObjectInstanceHandle theObject,
161  rti1516e::VariableLengthData const & theUserSuppliedTag,
162  rti1516e::OrderType sentOrder,
163  rti1516e::LogicalTime const & theTime,
164  rti1516e::OrderType receivedOrder,
165  rti1516e::SupplementalRemoveInfo theRemoveInfo)
166  throw (
167  rti1516e::FederateInternalError);
168 
169  virtual void removeObjectInstance (
170  rti1516e::ObjectInstanceHandle theObject,
171  rti1516e::VariableLengthData const & theUserSuppliedTag,
172  rti1516e::OrderType sentOrder,
173  rti1516e::LogicalTime const & theTime,
174  rti1516e::OrderType receivedOrder,
175  rti1516e::MessageRetractionHandle theHandle,
176  rti1516e::SupplementalRemoveInfo theRemoveInfo)
177  throw (
178  rti1516e::FederateInternalError);
179 
180  // 6.17
181  virtual void attributesInScope (
182  rti1516e::ObjectInstanceHandle theObject,
183  rti1516e::AttributeHandleSet const & theAttributes)
184  throw (
185  rti1516e::FederateInternalError);
186 
187  // 6.18
188  virtual void attributesOutOfScope (
189  rti1516e::ObjectInstanceHandle theObject,
190  rti1516e::AttributeHandleSet const & theAttributes)
191  throw (
192  rti1516e::FederateInternalError);
193 
194 public:
196 };
197 
198 #endif
199 #endif
200 
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)
std::map< ObjectClassHandle, std::string > objectClassMap
Definition: rtiSimpleFedAmb13dlc.h:33
int upperSend
Definition: simpleDDMFedAmb13.h:34
Basic federate ambassador service callback implementation.
Definition: rtiSimpleFedAmb13.h:35
std::map< ObjectHandle, std::string > objectInstanceMap
Definition: rtiSimpleFedAmb13dlc.h:34
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)
std::map< InteractionClassHandle, std::string > interactionClassMap
Definition: rtiSimpleFedAmb13dlc.h:35
virtual void throw(rti1516::InvalidLogicalTime, rti1516::NoRequestToEnableTimeRegulationWasPending, rti1516::FederateInternalError)
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
RTI::AttributeHandle myPositionHandle
Definition: simpleDDMFedAmb13.h:29
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::map< ParameterHandle, VariableLengthData > ParameterHandleValueMap
Definition: Typedefs.h:41
std::map< AttributeHandle, VariableLengthData > AttributeHandleValueMap
Definition: Typedefs.h:36
Definition: rtiSimpleFedAmb13dlc.h:15
virtual void attributesOutOfScope(RTI::ObjectHandle theObject, const RTI::AttributeHandleSet &theAttributes)
std::set< AttributeHandle > AttributeHandleSet
Definition: Typedefs.h:27
bool isPublisher
Definition: simpleDDMFedAmb13.h:36
int upperListen
Definition: simpleDDMFedAmb13.h:32
virtual ~MyFederateAmbassador()
bool myNameReservationSucceeded
Definition: simpleDDMFedAmb1516.h:28
This file provides an example derivation of the rti1516_2025::FederateAmbassador with NULL actions fo...
MyFederateAmbassador(DtSimpleData &data)
bool myNameReservationReturned
Definition: simpleDDMFedAmb1516.h:27

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)