MAK RTIspy API Documentation for HLA 1.3
testInteraction.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2008 VT MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: testInteraction.h,v $ $Revision: 1.4 $ $State: Exp $
00007 *******************************************************************************/
00008 
00012 
00013 #ifndef DtTestInteraction_H_
00014 #define DtTestInteraction_H_
00015 
00016 
00017 #include "rtiMsConfig.h"
00018 #include <vlutil/vlString.h>
00019 #include <vlutil/vlFedTarget.h>
00020 #include "internalTypes.h"
00021 #include "pHandValSet.h"
00022 #include "attrHandSet.h"
00023 
00024 class DtFomClassMgr;
00025 
00026 
00033 class DT_DLL_LRC DtTestInteraction
00034 {
00035 public:
00036 
00038    DtTestInteraction(DtFomClassMgr* fomMgr, MAKRti::DtString className);
00039 
00041    virtual ~DtTestInteraction();
00042 
00044    virtual const MAKRti::DtString& className() const;
00045 
00047    virtual DtInteractionClassHandle classHandle() const;
00048 
00052    virtual const DtPhvps& parameters() = 0;
00053 
00056    virtual bool setFromParameters(const DtPhvps& phvps) = 0;
00057 
00059    virtual DtFederateHandle targetFederate() const;
00060 
00062    virtual void setTargetFederate(DtFederateHandle handle);
00063 
00065    virtual void setTransportType(MAKRti::DtTransportType transport);
00066 
00068    virtual void setPayloadSize(unsigned int payload);
00069 
00071    virtual unsigned int payloadSize() const;
00072 
00074    virtual MAKRti::DtU32 testId() const;
00075 
00077    virtual void setTestId(unsigned int id);
00078 
00079 protected:
00080 
00082    virtual void encodeTargetFederate();
00083 
00085    virtual void encodeTestId();
00086 
00088    virtual void encodePayload();
00089 
00092    static bool decodeU32(
00093       const DtPhvps& parameters,
00094       int index,
00095       MAKRti::DtU32& value);
00096 
00099    static bool decodeU64(
00100       const DtPhvps& parameters,
00101       int index,
00102       MAKRti::DtU64& value);
00103 
00106    virtual bool decodeTargetFederate(
00107       const DtPhvps& parameters,
00108       int index);
00109 
00112    virtual bool decodeTestId(
00113       const DtPhvps& parameters,
00114       int index);
00115 
00118    virtual bool decodePayload(
00119       const DtPhvps& parameters,
00120       int index );
00121 
00122 private:
00124    DtTestInteraction(DtTestInteraction const& orig);
00125 
00127    DtTestInteraction& operator= (DtTestInteraction const& orig);
00128 
00129 public:
00130 
00132 
00133    static const MAKRti::DtString theNameTargetFederate;
00134    static const MAKRti::DtString theNameTestId;
00135    static const MAKRti::DtString theNamePayload;
00137 
00138 protected:
00139 
00140    DtFomClassMgr* myFomMgr;
00141    MAKRti::DtString myClassName;
00142    DtInteractionClassHandle myClassHandle;
00143    DtPhvps *myParameters;
00144 #ifdef DtIFSPEC1516
00145    rti1516::ParameterHandleValueMap myValueMap;
00146 #elif defined(DtIFSPEC1516E)
00147    rti1516e::ParameterHandleValueMap myValueMap;
00148 #endif
00149 
00151 
00152    DtParameterHandle myHandleTargetFederate;
00153    DtParameterHandle myHandleTestId;
00154    DtParameterHandle myHandlePayload;
00156 
00158 
00159    DtFederateHandle myTargetFederate;
00160    MAKRti::DtU32 myTestId;
00161    MAKRti::DtU32 myPayloadSize;
00163 };
00165 class DT_DLL_LRC DtLatencyTestInteraction : public DtTestInteraction
00166 {
00167 public:
00168 
00170    DtLatencyTestInteraction(DtFomClassMgr* fomMgr);
00171 
00173    virtual ~DtLatencyTestInteraction();
00174 
00176    virtual const DtPhvps& parameters();
00177 
00180    virtual bool setFromParameters(const DtPhvps& phvps);
00181 
00182 
00183 private:
00185    DtLatencyTestInteraction(DtLatencyTestInteraction const& orig);
00186 
00188    DtLatencyTestInteraction& operator= (DtLatencyTestInteraction const& orig);
00189 
00190 public:
00191    static const MAKRti::DtString theInteractionName;
00192 
00193 protected:
00194 
00195    DtParameterHandle myDataHandle;
00196 
00197 };
00198 
00200 void addTestToFom(DtFomClassMgr& fom);
00201 
00202 
00203 #endif
00204 

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)