MAK RTIspy API Documentation for HLA Evolved
mInteraction.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2001 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: mInteraction.h,v $ $Revision: 1.18 $ $State: Exp $
00007 *********************************************************************/
00008 #ifdef DtMOM
00009 
00010 
00011 
00012 #ifndef DtMomInteraction_H_
00013 #define DtMomInteraction_H_
00014 
00015 #include <vlutil/vlList.h>
00016 #include "handleList.h"
00017 #include "momInspector.h"
00018 #include "fomMgr.h"
00019 #include "momNetParam.h"
00020 #if defined(DtIFSPEC1516) || defined(DtIFSPEC1516E)
00021 #include <RTI/Typedefs.h>
00022 #endif
00023 
00024 typedef DtFomClassMgr DtHandleMapper;
00025 
00026 enum DtMomBaseInteractionType
00027 {
00028    DtMomInteractionTypeInvalid,
00029    DtMomInteractionTypeAdjust,
00030    DtMomInteractionTypeRequest,
00031    DtMomInteractionTypeReport,
00032    DtMomInteractionTypeService,
00033    DtMomInteractionTypeFederationAdjust,
00034    DtMomInteractionTypeMax
00035 };
00036 
00037 class DT_DLL_LRC DtMomInteraction
00038 {
00039 public:
00040 
00042    DtMomInteraction(const char* className, int numParams);
00043 
00045    virtual ~DtMomInteraction();
00046 
00048    DtMomInteraction(const DtMomInteraction& orig);
00049  
00051    DtMomInteraction& operator=(const DtMomInteraction& orig);
00052 
00054 
00055 
00056 
00057    virtual void setHandleMapper(DtHandleMapper* mapper);
00058    virtual DtHandleMapper* handleMapper() const;
00060 
00062    virtual DtInteractionClassHandle handle() const;
00063 
00065    virtual unsigned int parameterCount() const;
00066 
00068    virtual const char *name() const;
00069 
00071    virtual const DtPhvps& phvps() = 0;
00072 
00075    virtual bool setFromPhvps(const DtPhvps& set) = 0;
00076 
00079    virtual bool parametersAreInvalid();
00080 
00082    virtual DtFederateHandle federateHandle() const;
00083    virtual void setFederateHandle(DtFederateHandle handle);
00084 
00086    virtual DtMomBaseInteractionType interactionType() const;
00087 
00088 protected:
00089 
00091    virtual void encodeFederateHandle(
00092       const DtMomInteraction& data,
00093       DtPhvps* parameters,
00094       DtParameterHandle parameterHandle);
00095 
00097    virtual void decodeFederateHandle(
00098       DtMomInteraction* data,
00099       const DtPhvps& parameters,
00100       int index);
00101 
00102 protected:
00103 
00104    const char *myName;
00105    DtFederateHandle myFederateHandle;
00106    int myParameterCount;
00107 
00111    DtPhvps *myParameters;
00112 #ifdef DtIFSPEC1516
00113    rti1516::ParameterHandleValueMap myValueMap;
00114 #elif defined(DtIFSPEC1516E)
00115    rti1516e::ParameterHandleValueMap myValueMap;
00116 #endif
00117 
00118    DtHandleMapper* myHandleMapper;
00119 
00120 protected:
00121    const char *FEDERATE_PARAMETER_NAME;
00122    DtMomBaseInteractionType myBaseInteractionType;
00123 
00124 };
00125 
00126 typedef DtMomInteraction DtReportInteraction;
00127 typedef DtMomInteraction DtRequestInteraction;
00128 typedef DtMomInteraction DtAdjustInteraction;
00129 typedef DtMomInteraction DtServiceInteraction;
00130 
00131 #endif
00132 #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)