MAK RTIspy API Documentation for HLA 1516
List of all members | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
DtTestInteraction Class Reference

DtTestInteraction holds the data needed to send a test interaction An instance of this interaction be used to both send and receive interaction data. More...

+ Inheritance diagram for DtTestInteraction:
+ Collaboration diagram for DtTestInteraction:

Public Member Functions

 DtTestInteraction (DtFomClassMgr *fomMgr, MAKRti::DtString className)
 Constructor.
virtual ~DtTestInteraction ()
 Destructor.
virtual const MAKRti::DtString & className () const
 Return the interaction class name.
virtual DtInteractionClassHandle classHandle () const
 Return the interaction class handle.
virtual const DtPhvps & parameters ()=0
 Return the parameter handle value pair set Calling this accessor results in the encoding of member data into the PHVPS.
virtual bool setFromParameters (const DtPhvps &phvps)=0
 Initialize this interaction using the given parameters Return true if parameters were set successfully.
virtual DtFederateHandle targetFederate () const
 get interaction target federate handle parameter
virtual void setTargetFederate (DtFederateHandle handle)
 set interaction target federate handle parameter
virtual void setTransportType (MAKRti::DtTransportType transport)
 set transport of parameters.
virtual void setPayloadSize (unsigned int payload)
 Set payload size.
virtual unsigned int payloadSize () const
 Get payload size.
virtual MAKRti::DtU32 testId () const
 get test id parameter
virtual void setTestId (unsigned int id)
 set test id parameter

Static Public Attributes

static const MAKRti::DtString theNameTargetFederate
 Parameter name.
static const MAKRti::DtString theNameTestId
 Parameter name.
static const MAKRti::DtString theNamePayload
 Parameter name.

Protected Member Functions

virtual void encodeTargetFederate ()
 Encode target federate value into PHVPS.
virtual void encodeTestId ()
 Encode test id value into PHVPS.
virtual void encodePayload ()
 Encode payload into phvps.
virtual bool decodeTargetFederate (const DtPhvps &parameters, int index)
 Decode target federate from given parameters into this interaction Return true if decoded successfully.
virtual bool decodeTestId (const DtPhvps &parameters, int index)
 Decode test id from given parameters into this interaction Return true if decoded successfully.
virtual bool decodePayload (const DtPhvps &parameters, int index)
 Decode payload from given parameters into this interaction Returns true if decoded successfully.

Static Protected Member Functions

static bool decodeU32 (const DtPhvps &parameters, int index, MAKRti::DtU32 &value)
 Decode a 32 bit unsigned int from the given PHVPS Return true if decoded successfully.
static bool decodeU64 (const DtPhvps &parameters, int index, MAKRti::DtU64 &value)
 Decode a 64 bit unsigned int from the given PHVPS Return true if decoded successfully.

Protected Attributes

DtFomClassMgrmyFomMgr
MAKRti::DtString myClassName
DtInteractionClassHandle myClassHandle
DtPhvps * myParameters
DtParameterHandle myHandleTargetFederate
 Parameter handle.
DtParameterHandle myHandleTestId
 Parameter handle.
DtParameterHandle myHandlePayload
 Parameter handle.
DtFederateHandle myTargetFederate
 Parameter value.
MAKRti::DtU32 myTestId
 Parameter value.
MAKRti::DtU32 myPayloadSize
 Parameter value.

Private Member Functions

 DtTestInteraction (DtTestInteraction const &orig)
 Copy Constructor - not allowed.
DtTestInteractionoperator= (DtTestInteraction const &orig)
 Assignment operator - not allowed.

Detailed Description

DtTestInteraction holds the data needed to send a test interaction An instance of this interaction be used to both send and receive interaction data.

To send data, the parameter values are set using accessors and the parameter handle value pair set (PHVPS) can then be accessed. To receive data, a PHVPS is given to the interaction and the values are decoded into the interaction's data members.

Constructor & Destructor Documentation

DtTestInteraction::DtTestInteraction ( DtFomClassMgr fomMgr,
MAKRti::DtString  className 
)
DtTestInteraction::~DtTestInteraction ( )
virtual

Destructor.

References myParameters.

DtTestInteraction::DtTestInteraction ( DtTestInteraction const &  orig)
private

Copy Constructor - not allowed.

Member Function Documentation

DtInteractionClassHandle DtTestInteraction::classHandle ( ) const
virtual
const MAKRti::DtString & DtTestInteraction::className ( ) const
virtual

Return the interaction class name.

References myClassName.

bool DtTestInteraction::decodePayload ( const DtPhvps &  parameters,
int  index 
)
protectedvirtual

Decode payload from given parameters into this interaction Returns true if decoded successfully.

References myPayloadSize.

Referenced by DtLatencyTestInteraction::setFromParameters().

bool DtTestInteraction::decodeTargetFederate ( const DtPhvps &  parameters,
int  index 
)
protectedvirtual

Decode target federate from given parameters into this interaction Return true if decoded successfully.

References decodeU32(), and myTargetFederate.

Referenced by DtLatencyTestInteraction::setFromParameters().

bool DtTestInteraction::decodeTestId ( const DtPhvps &  parameters,
int  index 
)
protectedvirtual

Decode test id from given parameters into this interaction Return true if decoded successfully.

References decodeU32(), and myTestId.

Referenced by DtLatencyTestInteraction::setFromParameters().

bool DtTestInteraction::decodeU32 ( const DtPhvps &  parameters,
int  index,
MAKRti::DtU32 &  value 
)
staticprotected

Decode a 32 bit unsigned int from the given PHVPS Return true if decoded successfully.

Referenced by decodeTargetFederate(), and decodeTestId().

bool DtTestInteraction::decodeU64 ( const DtPhvps &  parameters,
int  index,
MAKRti::DtU64 &  value 
)
staticprotected

Decode a 64 bit unsigned int from the given PHVPS Return true if decoded successfully.

void DtTestInteraction::encodePayload ( )
protectedvirtual

Encode payload into phvps.

References myHandlePayload, myParameters, and myPayloadSize.

Referenced by DtLatencyTestInteraction::parameters().

void DtTestInteraction::encodeTargetFederate ( )
protectedvirtual

Encode target federate value into PHVPS.

References myHandleTargetFederate, myParameters, and myTargetFederate.

Referenced by DtLatencyTestInteraction::parameters().

void DtTestInteraction::encodeTestId ( )
protectedvirtual

Encode test id value into PHVPS.

References myHandleTestId, myParameters, and myTestId.

Referenced by DtLatencyTestInteraction::parameters().

DtTestInteraction& DtTestInteraction::operator= ( DtTestInteraction const &  orig)
private

Assignment operator - not allowed.

virtual const DtPhvps& DtTestInteraction::parameters ( )
pure virtual

Return the parameter handle value pair set Calling this accessor results in the encoding of member data into the PHVPS.

Implemented in DtLatencyTestInteraction.

unsigned int DtTestInteraction::payloadSize ( ) const
virtual
virtual bool DtTestInteraction::setFromParameters ( const DtPhvps &  phvps)
pure virtual

Initialize this interaction using the given parameters Return true if parameters were set successfully.

Implemented in DtLatencyTestInteraction.

void DtTestInteraction::setPayloadSize ( unsigned int  payload)
virtual

Set payload size.

References myPayloadSize.

Referenced by DtTestManager::sendSingleLatencyInteraction().

void DtTestInteraction::setTargetFederate ( DtFederateHandle  handle)
virtual

set interaction target federate handle parameter

References myTargetFederate.

Referenced by DtTestManager::sendSingleLatencyInteraction().

void DtTestInteraction::setTestId ( unsigned int  id)
virtual
void DtTestInteraction::setTransportType ( MAKRti::DtTransportType  transport)
virtual

set transport of parameters.

References myParameters.

Referenced by DtTestManager::receiveInteraction(), and DtTestManager::sendSingleLatencyInteraction().

DtFederateHandle DtTestInteraction::targetFederate ( ) const
virtual

get interaction target federate handle parameter

References myTargetFederate.

Referenced by DtTestManager::receiveInteraction().

MAKRti::DtU32 DtTestInteraction::testId ( ) const
virtual

get test id parameter

References myTestId.

Referenced by DtTestManager::receiveInteraction().

Member Data Documentation

DtInteractionClassHandle DtTestInteraction::myClassHandle
protected

Referenced by classHandle(), and DtTestInteraction().

MAKRti::DtString DtTestInteraction::myClassName
protected

Referenced by className(), and DtTestInteraction().

DtFomClassMgr* DtTestInteraction::myFomMgr
protected

Referenced by DtTestInteraction().

DtParameterHandle DtTestInteraction::myHandlePayload
protected
DtParameterHandle DtTestInteraction::myHandleTargetFederate
protected
DtParameterHandle DtTestInteraction::myHandleTestId
protected
DtPhvps* DtTestInteraction::myParameters
protected
MAKRti::DtU32 DtTestInteraction::myPayloadSize
protected

Parameter value.

Referenced by decodePayload(), encodePayload(), payloadSize(), and setPayloadSize().

DtFederateHandle DtTestInteraction::myTargetFederate
protected
MAKRti::DtU32 DtTestInteraction::myTestId
protected

Parameter value.

Referenced by decodeTestId(), encodeTestId(), setTestId(), and testId().

const MAKRti::DtString DtTestInteraction::theNamePayload
static

Parameter name.

Referenced by addTestToFom(), and DtTestInteraction().

const MAKRti::DtString DtTestInteraction::theNameTargetFederate
static

Parameter name.

Referenced by addTestToFom(), and DtTestInteraction().

const MAKRti::DtString DtTestInteraction::theNameTestId
static

Parameter name.

Referenced by addTestToFom(), and DtTestInteraction().


The documentation for this class was generated from the following files:

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)