MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rtiSimpleFedAmb13.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: 4786)
9 #pragma warning(disable: 4290)
10 
11 #include "NullFederateAmbassador.hh"
12 #include <string>
13 #include <map>
14 
16 {
17 public:
18  std::map<RTI::ObjectClassHandle, std::string> objectClassMap;
19  std::map<RTI::ObjectHandle, std::string> objectInstanceMap;
20  std::map<RTI::InteractionClassHandle, std::string> interactionClassMap;
21 
23  {
24  clear();
25  }
26 
27  void clear()
28  {
29  objectClassMap.clear();
30  objectInstanceMap.clear();
31  interactionClassMap.clear();
32  }
33 };
34 
35 class MyFederateAmbassador : public NullFederateAmbassador
36 {
37 public:
38 
40 
41  virtual ~MyFederateAmbassador()
42  throw (RTI::FederateInternalError);
43 
45  // Object Management Services //
47 
48  virtual void discoverObjectInstance(
49  RTI::ObjectHandle theObject, // supplied C1
50  RTI::ObjectClassHandle theObjectClass, // supplied C1
51  const char* theObjectName) // supplied C4
52  throw (RTI::CouldNotDiscover, RTI::ObjectClassNotKnown, RTI::FederateInternalError);
53 
54  virtual void reflectAttributeValues(
55  RTI::ObjectHandle theObject, // supplied C1
56  const RTI::AttributeHandleValuePairSet& theAttributes, // supplied C4
57  const RTI::FedTime& theTime, // supplied C1
58  const char *theTag, // supplied C4
59  RTI::EventRetractionHandle theHandle) // supplied C1
60  throw (RTI::ObjectNotKnown, RTI::AttributeNotKnown, RTI::FederateOwnsAttributes, RTI::InvalidFederationTime,
61  RTI::FederateInternalError);
62 
63  virtual void reflectAttributeValues(
64  RTI::ObjectHandle theObject, // supplied C1
65  const RTI::AttributeHandleValuePairSet& theAttributes, // supplied C4
66  const char *theTag) // supplied C4
67  throw (RTI::ObjectNotKnown, RTI::AttributeNotKnown, RTI::FederateOwnsAttributes, RTI::FederateInternalError);
68 
69  // 4.6
70  virtual void receiveInteraction(
71  RTI::InteractionClassHandle theInteraction, // supplied C1
72  const RTI::ParameterHandleValuePairSet& theParameters, // supplied C4
73  const RTI::FedTime& theTime, // supplied C4
74  const char *theTag, // supplied C4
75  RTI::EventRetractionHandle theHandle) // supplied C1
76  throw (RTI::InteractionClassNotKnown, RTI::InteractionParameterNotKnown, RTI::InvalidFederationTime,
77  RTI::FederateInternalError);
78 
79  virtual void receiveInteraction(
80  RTI::InteractionClassHandle theInteraction, // supplied C1
81  const RTI::ParameterHandleValuePairSet& theParameters, // supplied C4
82  const char *theTag) // supplied C4
83  throw (RTI::InteractionClassNotKnown, RTI::InteractionParameterNotKnown, RTI::FederateInternalError);
84 
85  virtual void removeObjectInstance(
86  RTI::ObjectHandle theObject, // supplied C1
87  const RTI::FedTime& theTime, // supplied C4
88  const char *theTag, // supplied C4
89  RTI::EventRetractionHandle theHandle) // supplied C1
90  throw (RTI::ObjectNotKnown, RTI::InvalidFederationTime, RTI::FederateInternalError);
91 
92  virtual void removeObjectInstance(
93  RTI::ObjectHandle theObject, // supplied C1
94  const char *theTag) // supplied C4
95  throw (RTI::ObjectNotKnown, RTI::FederateInternalError);
96 
97 public:
99 };
100 
Data for interacting with the federate ambassador.
Definition: rtiSimpleFedAmb13.h:15
Basic federate ambassador service callback implementation.
Definition: rtiSimpleFedAmb13.h:35
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 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: rtiSimpleFedAmb13.h:22
std::map< RTI::ObjectClassHandle, std::string > objectClassMap
Definition: rtiSimpleFedAmb13.h:18
virtual ~MyFederateAmbassador()
MyFederateAmbassador(DtSimpleData &data)
std::map< RTI::InteractionClassHandle, std::string > interactionClassMap
Definition: rtiSimpleFedAmb13.h:20

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)