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 using namespace rti1516e;
24 
25 // Data exchanged between federate and Federate Ambassador
26 class DtTalkAmbData
27 {
28 public:
29  bool myNameReservationReturned;
30  bool myNameReservationSucceeded;
31  std::map<rti1516e::ObjectClassHandle, std::wstring> objectClassMap;
32  std::map<rti1516e::ObjectInstanceHandle, std::wstring> objectInstanceMap;
33  std::map<rti1516e::InteractionClassHandle, std::wstring> interactionClassMap;
34  rti1516e::AttributeHandle myPositionHandle;
35  int position;
36  int lowerListen;
37  int upperListen;
38  int lowerSend;
39  int upperSend;
40  bool enableScopeAdvisories;
41  bool isPublisher;
42 };
43 
44 class MyFederateAmbassador : public rti1516e::NullFederateAmbassador
45 {
46 public:
48 
49  virtual ~MyFederateAmbassador()
50  throw();
51 
52 
53  // 6.3
54  virtual void objectInstanceNameReservationSucceeded (
55  std::wstring const & theObjectInstanceName)
56  throw (
57  FederateInternalError);
58 
59  virtual void objectInstanceNameReservationFailed (
60  std::wstring const & theObjectInstanceName)
61  throw (
62  FederateInternalError);
63 
64  // 6.9
65  virtual void discoverObjectInstance (
66  ObjectInstanceHandle theObject,
67  ObjectClassHandle theObjectClass,
68  std::wstring const & theObjectInstanceName)
69  throw (
70  FederateInternalError);
71 
72  virtual void discoverObjectInstance (
73  ObjectInstanceHandle theObject,
74  ObjectClassHandle theObjectClass,
75  std::wstring const & theObjectInstanceName,
76  FederateHandle producingFederate)
77  throw (
78  FederateInternalError);
79 
80  // 6.11
81  virtual void reflectAttributeValues (
82  ObjectInstanceHandle theObject,
83  AttributeHandleValueMap const & theAttributeValues,
84  VariableLengthData const & theUserSuppliedTag,
85  OrderType sentOrder,
86  TransportationType theType,
87  SupplementalReflectInfo theReflectInfo)
88  throw (
89  FederateInternalError);
90 
91  virtual void reflectAttributeValues (
92  ObjectInstanceHandle theObject,
93  AttributeHandleValueMap const & theAttributeValues,
94  VariableLengthData const & theUserSuppliedTag,
95  OrderType sentOrder,
96  TransportationType theType,
97  LogicalTime const & theTime,
98  OrderType receivedOrder,
99  SupplementalReflectInfo theReflectInfo)
100  throw (
101  FederateInternalError);
102 
103  virtual void reflectAttributeValues (
104  ObjectInstanceHandle theObject,
105  AttributeHandleValueMap const & theAttributeValues,
106  VariableLengthData const & theUserSuppliedTag,
107  OrderType sentOrder,
108  TransportationType theType,
109  LogicalTime const & theTime,
110  OrderType receivedOrder,
111  MessageRetractionHandle theHandle,
112  SupplementalReflectInfo theReflectInfo)
113  throw (
114  FederateInternalError);
115 
116  // 6.13
117  virtual void receiveInteraction (
118  InteractionClassHandle theInteraction,
119  ParameterHandleValueMap const & theParameterValues,
120  VariableLengthData const & theUserSuppliedTag,
121  OrderType sentOrder,
122  TransportationType theType,
123  SupplementalReceiveInfo theReceiveInfo)
124  throw (
125  FederateInternalError);
126 
127  virtual void receiveInteraction (
128  InteractionClassHandle theInteraction,
129  ParameterHandleValueMap const & theParameterValues,
130  VariableLengthData const & theUserSuppliedTag,
131  OrderType sentOrder,
132  TransportationType theType,
133  LogicalTime const & theTime,
134  OrderType receivedOrder,
135  SupplementalReceiveInfo theReceiveInfo)
136  throw (
137  FederateInternalError);
138 
139  virtual void receiveInteraction (
140  InteractionClassHandle theInteraction,
141  ParameterHandleValueMap const & theParameterValues,
142  VariableLengthData const & theUserSuppliedTag,
143  OrderType sentOrder,
144  TransportationType theType,
145  LogicalTime const & theTime,
146  OrderType receivedOrder,
147  MessageRetractionHandle theHandle,
148  SupplementalReceiveInfo theReceiveInfo)
149  throw (
150  FederateInternalError);
151 
152  // 6.15
153  virtual void removeObjectInstance (
154  ObjectInstanceHandle theObject,
155  VariableLengthData const & theUserSuppliedTag,
156  OrderType sentOrder,
157  SupplementalRemoveInfo theRemoveInfo)
158  throw (
159  FederateInternalError);
160 
161  virtual void removeObjectInstance (
162  ObjectInstanceHandle theObject,
163  VariableLengthData const & theUserSuppliedTag,
164  OrderType sentOrder,
165  LogicalTime const & theTime,
166  OrderType receivedOrder,
167  SupplementalRemoveInfo theRemoveInfo)
168  throw (
169  FederateInternalError);
170 
171  virtual void removeObjectInstance (
172  ObjectInstanceHandle theObject,
173  VariableLengthData const & theUserSuppliedTag,
174  OrderType sentOrder,
175  LogicalTime const & theTime,
176  OrderType receivedOrder,
177  MessageRetractionHandle theHandle,
178  SupplementalRemoveInfo theRemoveInfo)
179  throw (
180  FederateInternalError);
181 
182  // 6.17
183  virtual void attributesInScope (
184  ObjectInstanceHandle theObject,
185  AttributeHandleSet const & theAttributes)
186  throw (
187  FederateInternalError);
188 
189  // 6.18
190  virtual void attributesOutOfScope (
191  ObjectInstanceHandle theObject,
192  AttributeHandleSet const & theAttributes)
193  throw (
194  FederateInternalError);
195 
196 public:
197  DtTalkAmbData & myData;
198 };
199 
200 #endif
201 #endif
202 
A convenience header provided for developers that would like to include everything all at once...
virtual void attributesOutOfScope(ObjectHandle theObject, const AttributeHandleSet &theAttributes)=0
6.14
Definition: rtiSimpleFedAmb13.h:37
OrderType
Definition: Enums.h:13
virtual void attributesInScope(ObjectHandle theObject, const AttributeHandleSet &theAttributes)=0
6.13
virtual void receiveInteraction(InteractionClassHandle theInteraction, const ParameterHandleValuePairSet &theParameters, const FedTime &theTime, const char *theTag, EventRetractionHandle theHandle)=0
6.7
virtual void removeObjectInstance(ObjectHandle theObject, const FedTime &theTime, const char *theTag, EventRetractionHandle theHandle)=0
6.9
std::map< ParameterHandle, VariableLengthData > ParameterHandleValueMap
Definition: Typedefs.h:41
virtual void discoverObjectInstance(ObjectHandle theObject, ObjectClassHandle theObjectClass, const char *theObjectName)=0
! Object Management Services //!
virtual void reflectAttributeValues(ObjectHandle theObject, const AttributeHandleValuePairSet &theAttributes, const FedTime &theTime, const char *theTag, EventRetractionHandle theHandle)=0
6.5
std::map< AttributeHandle, VariableLengthData > AttributeHandleValueMap
Definition: Typedefs.h:36
Definition: rtiSimpleFedAmb13.h:13
std::set< AttributeHandle > AttributeHandleSet
Definition: Typedefs.h:27
This file provides an example derivation of the rti1516e::FederateAmbassador with NULL actions for ea...
TransportationType
Definition: Enums.h:84

Document ID: Generated on Mon Sep 7 15:40:32 EDT 2020 from SVN revision 217499
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)