MAK RTIspy API Documentation for HLA 1.3
simpleDDMFedAmb1516e.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2010 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: simpleDDMFedAmb1516e.h,v $ $Revision: 1.0 $ $State: Exp $
00007 ******************************************************************************/
00008 
00009 // The Federate Ambassador discovers and remove objects and
00010 // processes object reflects and recieve interactions. It also notes
00011 // attribute scope advisories
00012 
00013 #ifndef MyFederateAmbassador_H_
00014 #define MyFederateAmbassador_H_
00015 #ifdef DtHLA1516E
00016 #include "simpleDDMStringUtil.h"
00017 
00018 #include <map>
00019 #include <RTI/RTI1516.h>
00020 #include <RTI/NullFederateAmbassador.h>
00021 #include <string>
00022 
00023 using namespace rti1516e;
00024 
00025 // Data exchanged between federate and Federate Ambassador
00026 class DtTalkAmbData
00027 {
00028 public:
00029     bool myNameReservationReturned;
00030     bool myNameReservationSucceeded;
00031     std::map<rti1516e::ObjectClassHandle, std::wstring> objectClassMap;
00032     std::map<rti1516e::ObjectInstanceHandle, std::wstring> objectInstanceMap;
00033     std::map<rti1516e::InteractionClassHandle, std::wstring> interactionClassMap;
00034     rti1516e::AttributeHandle myPositionHandle;
00035     int position;
00036     int lowerListen;
00037     int upperListen;
00038     int lowerSend;
00039     int upperSend;
00040     bool enableScopeAdvisories;
00041     bool isPublisher;
00042 };
00043 
00044 class MyFederateAmbassador : public rti1516e::NullFederateAmbassador
00045 {
00046 public:
00047     MyFederateAmbassador(DtTalkAmbData & data);
00048 
00049       virtual ~MyFederateAmbassador()
00050           throw(); 
00051 
00052     
00053     // 6.3
00054     virtual void objectInstanceNameReservationSucceeded (
00055         std::wstring const & theObjectInstanceName)
00056         throw (
00057         FederateInternalError);
00058 
00059     virtual void objectInstanceNameReservationFailed (
00060         std::wstring const & theObjectInstanceName)
00061         throw (
00062         FederateInternalError);
00063 
00064     // 6.9
00065     virtual void discoverObjectInstance (
00066         ObjectInstanceHandle theObject,
00067         ObjectClassHandle theObjectClass,
00068         std::wstring const & theObjectInstanceName)
00069         throw (
00070         FederateInternalError);
00071 
00072     virtual void discoverObjectInstance (
00073         ObjectInstanceHandle theObject,
00074         ObjectClassHandle theObjectClass,
00075         std::wstring const & theObjectInstanceName,
00076         FederateHandle producingFederate)
00077         throw (
00078         FederateInternalError);
00079 
00080     // 6.11
00081     virtual void reflectAttributeValues (
00082         ObjectInstanceHandle theObject,
00083         AttributeHandleValueMap const & theAttributeValues,
00084         VariableLengthData const & theUserSuppliedTag,
00085         OrderType sentOrder,
00086         TransportationType theType,
00087         SupplementalReflectInfo theReflectInfo)
00088         throw (
00089         FederateInternalError);
00090 
00091     virtual void reflectAttributeValues (
00092         ObjectInstanceHandle theObject,
00093         AttributeHandleValueMap const & theAttributeValues,
00094         VariableLengthData const & theUserSuppliedTag,
00095         OrderType sentOrder,
00096         TransportationType theType,
00097         LogicalTime const & theTime,
00098         OrderType receivedOrder,
00099         SupplementalReflectInfo theReflectInfo)
00100         throw (
00101         FederateInternalError);
00102 
00103     virtual void reflectAttributeValues (
00104         ObjectInstanceHandle theObject,
00105         AttributeHandleValueMap const & theAttributeValues,
00106         VariableLengthData const & theUserSuppliedTag,
00107         OrderType sentOrder,
00108         TransportationType theType,
00109         LogicalTime const & theTime,
00110         OrderType receivedOrder,
00111         MessageRetractionHandle theHandle,
00112         SupplementalReflectInfo theReflectInfo)
00113         throw (
00114         FederateInternalError);
00115 
00116     // 6.13
00117     virtual void receiveInteraction (
00118         InteractionClassHandle theInteraction,
00119         ParameterHandleValueMap const & theParameterValues,
00120         VariableLengthData const & theUserSuppliedTag,
00121         OrderType sentOrder,
00122         TransportationType theType,
00123         SupplementalReceiveInfo theReceiveInfo)
00124         throw (
00125         FederateInternalError);
00126 
00127     virtual void receiveInteraction (
00128         InteractionClassHandle theInteraction,
00129         ParameterHandleValueMap const & theParameterValues,
00130         VariableLengthData const & theUserSuppliedTag,
00131         OrderType sentOrder,
00132         TransportationType theType,
00133         LogicalTime const & theTime,
00134         OrderType receivedOrder,
00135         SupplementalReceiveInfo theReceiveInfo)
00136         throw (
00137         FederateInternalError);
00138 
00139     virtual void receiveInteraction (
00140         InteractionClassHandle theInteraction,
00141         ParameterHandleValueMap const & theParameterValues,
00142         VariableLengthData const & theUserSuppliedTag,
00143         OrderType sentOrder,
00144         TransportationType theType,
00145         LogicalTime const & theTime,
00146         OrderType receivedOrder,
00147         MessageRetractionHandle theHandle,
00148         SupplementalReceiveInfo theReceiveInfo)
00149         throw (
00150         FederateInternalError);
00151 
00152     // 6.15
00153     virtual void removeObjectInstance (
00154         ObjectInstanceHandle theObject,
00155         VariableLengthData const & theUserSuppliedTag,
00156         OrderType sentOrder,
00157         SupplementalRemoveInfo theRemoveInfo)
00158         throw (
00159         FederateInternalError);
00160 
00161     virtual void removeObjectInstance (
00162         ObjectInstanceHandle theObject,
00163         VariableLengthData const & theUserSuppliedTag,
00164         OrderType sentOrder,
00165         LogicalTime const & theTime,
00166         OrderType receivedOrder,
00167         SupplementalRemoveInfo theRemoveInfo)
00168         throw (
00169         FederateInternalError);
00170 
00171     virtual void removeObjectInstance (
00172         ObjectInstanceHandle theObject,
00173         VariableLengthData const & theUserSuppliedTag,
00174         OrderType sentOrder,
00175         LogicalTime const & theTime,
00176         OrderType receivedOrder,
00177         MessageRetractionHandle theHandle,
00178         SupplementalRemoveInfo theRemoveInfo)
00179         throw (
00180         FederateInternalError);
00181 
00182     // 6.17
00183     virtual void attributesInScope (
00184         ObjectInstanceHandle theObject,
00185         AttributeHandleSet const & theAttributes)
00186         throw (
00187         FederateInternalError);
00188 
00189     // 6.18
00190     virtual void attributesOutOfScope (
00191         ObjectInstanceHandle theObject,
00192         AttributeHandleSet const & theAttributes)
00193         throw (
00194         FederateInternalError);
00195 
00196 public:
00197     DtTalkAmbData & myData;
00198 };
00199 
00200 #endif
00201 #endif
00202 

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)