MAK RTIspy API Documentation for HLA Evolved
simpleDDMFedAmb13.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2006 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: simpleDDMFedAmb13.h,v $ $Revision: 1.1 $ $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 
00016 #include "NullFederateAmbassador.hh"
00017 
00018 #include <map>
00019 #include <string>
00020 
00021 
00022 // Data exchanged between federate and Federate Ambassador
00023 class DtTalkAmbData
00024 {
00025 public:
00026    std::map<RTI::ObjectClassHandle, std::string> objectClassMap;
00027    std::map<RTI::ObjectHandle, std::string> objectInstanceMap;
00028    std::map<RTI::InteractionClassHandle, std::string> interactionClassMap;
00029    RTI::AttributeHandle myPositionHandle;
00030    int position;
00031    int lowerListen;
00032    int upperListen;
00033    int lowerSend;
00034    int upperSend;
00035    bool enableScopeAdvisories;
00036    bool isPublisher;
00037 
00038 };
00039 
00040 class MyFederateAmbassador : public NullFederateAmbassador
00041 {
00042 public:
00043 
00044    MyFederateAmbassador(DtTalkAmbData & data);
00045 
00046    virtual ~MyFederateAmbassador()
00047      throw (RTI::FederateInternalError);
00048 
00049 
00051    // Object Management Services //
00053 
00054    virtual void discoverObjectInstance (
00055            RTI::ObjectHandle          theObject,      // supplied C1
00056            RTI::ObjectClassHandle     theObjectClass, // supplied C1
00057      const char*                      theObjectName)  // supplied C4
00058    throw (
00059      RTI::CouldNotDiscover,
00060      RTI::ObjectClassNotKnown,
00061      RTI::FederateInternalError);
00062 
00063    virtual void reflectAttributeValues (
00064            RTI::ObjectHandle                 theObject,     // supplied C1
00065      const RTI::AttributeHandleValuePairSet& theAttributes, // supplied C4
00066      const RTI::FedTime&                     theTime,       // supplied C1
00067      const char                             *theTag,        // supplied C4
00068            RTI::EventRetractionHandle        theHandle)     // supplied C1
00069    throw (
00070      RTI::ObjectNotKnown,
00071      RTI::AttributeNotKnown,
00072      RTI::FederateOwnsAttributes,
00073      RTI::InvalidFederationTime,
00074      RTI::FederateInternalError);
00075 
00076    virtual void reflectAttributeValues (
00077            RTI::ObjectHandle                 theObject,     // supplied C1
00078      const RTI::AttributeHandleValuePairSet& theAttributes, // supplied C4
00079      const char                             *theTag)        // supplied C4
00080    throw (
00081      RTI::ObjectNotKnown,
00082      RTI::AttributeNotKnown,
00083      RTI::FederateOwnsAttributes,
00084      RTI::FederateInternalError);
00085 
00086    // 4.6
00087    virtual void receiveInteraction (
00088            RTI::InteractionClassHandle       theInteraction, // supplied C1
00089      const RTI::ParameterHandleValuePairSet& theParameters,  // supplied C4
00090      const RTI::FedTime&                     theTime,        // supplied C4
00091      const char                             *theTag,         // supplied C4
00092            RTI::EventRetractionHandle        theHandle)      // supplied C1
00093    throw (
00094      RTI::InteractionClassNotKnown,
00095      RTI::InteractionParameterNotKnown,
00096      RTI::InvalidFederationTime,
00097      RTI::FederateInternalError);
00098 
00099    virtual void receiveInteraction (
00100            RTI::InteractionClassHandle       theInteraction, // supplied C1
00101      const RTI::ParameterHandleValuePairSet& theParameters,  // supplied C4
00102      const char                             *theTag)         // supplied C4
00103    throw (
00104      RTI::InteractionClassNotKnown,
00105      RTI::InteractionParameterNotKnown,
00106      RTI::FederateInternalError);
00107 
00108    virtual void removeObjectInstance (
00109            RTI::ObjectHandle          theObject, // supplied C1
00110      const RTI::FedTime&              theTime,   // supplied C4
00111      const char                      *theTag,    // supplied C4
00112            RTI::EventRetractionHandle theHandle) // supplied C1
00113    throw (
00114      RTI::ObjectNotKnown,
00115      RTI::InvalidFederationTime,
00116      RTI::FederateInternalError);
00117 
00118    virtual void removeObjectInstance (
00119            RTI::ObjectHandle          theObject, // supplied C1
00120      const char                      *theTag)    // supplied C4
00121    throw (
00122      RTI::ObjectNotKnown,
00123      RTI::FederateInternalError);
00124 
00125    virtual void attributesInScope (
00126            RTI::ObjectHandle        theObject,     // supplied C1
00127            const RTI::AttributeHandleSet& theAttributes) // supplied C4
00128          throw (
00129            RTI::ObjectNotKnown,
00130            RTI::AttributeNotKnown,
00131            RTI::FederateInternalError) ;
00132 
00133    virtual void attributesOutOfScope (
00134            RTI::ObjectHandle        theObject,     // supplied C1
00135            const RTI::AttributeHandleSet& theAttributes) // supplied C4
00136          throw (
00137            RTI::ObjectNotKnown,
00138            RTI::AttributeNotKnown,
00139            RTI::FederateInternalError) ;
00140 
00141 
00142 public:
00143    DtTalkAmbData & myData;
00144 };
00145 
00146 
00147 
00148 #endif

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)