MAK RTIspy API Documentation for HLA 1.3
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtRtiConnection Class Reference

This class represents a network connection with another RTI component. More...

+ Inheritance diagram for DtRtiConnection:
+ Collaboration diagram for DtRtiConnection:

List of all members.

Public Member Functions

 DtRtiConnection (DtMsgSocket *skt)
 Constructor.
virtual ~DtRtiConnection ()
 Destructor.
virtual void setMsgFactory (DtRtiMsgFactory *fact)
 Set/Get the Message Factory used by this object.
virtual DtRtiMsgFactoryrtiMsgFactory ()
virtual DtRtiMsgnetRead (DtNetReadStatus *retCode=NULL)
 Note: netRead() creates a new DtRtiMsg using the message factory Caller is responsible for deleting it when through.
virtual int send (const DtRtiMsg &msg, const MAKRti::DtInetAddr &addr=MAKRti::DtInetAddr())
 Send a message.
virtual bool flush ()
 Send buffered messages.
virtual int isOk ()
 Return true if the status of the connection is OK.
virtual void setCheckVersion (bool enableCheckVersion)
 Set/get whether to check message version.
virtual bool checkVersion () const
virtual void disableCheckSize ()
 Disable message size check.
virtual void enableCheckSize ()
 Enable message size check.
virtual void setFedExName (const MAKRti::DtString &newFedExName)
 Set/Get federation execution name. NULL means "all".
virtual const MAKRti::DtString & fedExName () const
virtual void setFedExHandle (int handle)
 Set/Get federation execution handle. 0 means "all".
virtual int fedExHandle () const
virtual void setFederateHandle (DtFederationHandle handle)
 Set/Get federate handle.
virtual DtFederationHandle federateHandle () const
virtual void setConnId (unsigned long connId)
 Set/Get the connection ID assigned to the connection.
virtual unsigned long connId () const
virtual DtMsgSocketsocket ()
 Returns our socket.

Protected Member Functions

void init (DtMsgSocket *s)

Protected Attributes

MAKRti::DtString myFedExName
int myFedExHandle
DtFederationHandle myFedHandle
DtMsgSocketmySocket
DtRtiMsgFactorymyMsgFact
unsigned long myReceivedMsgCount
bool myCheckSize
bool myCheckVersion
unsigned int myWaitEventIndex
unsigned long myConnId
 Win32 only.

Private Member Functions

 DtRtiConnection (const DtRtiConnection &orig)
 Copy CTOR not implemented.
DtRtiConnectionoperator= (DtRtiConnection const &orig)
 Assignment Operator not implemented.

Detailed Description

This class represents a network connection with another RTI component.


Constructor & Destructor Documentation

Constructor.

References DtBindMessage(), and init().

Destructor.

Copy CTOR not implemented.


Member Function Documentation

bool DtRtiConnection::checkVersion ( ) const [virtual]

References myCheckVersion.

Referenced by netRead().

unsigned long DtRtiConnection::connId ( ) const [inline, virtual]

Disable message size check.

References myCheckSize.

Enable message size check.

References myCheckSize.

References myFedHandle.

int DtRtiConnection::fedExHandle ( ) const [inline, virtual]

References myFedExHandle.

const MAKRti::DtString & DtRtiConnection::fedExName ( ) const [inline, virtual]

References myFedExName.

Send buffered messages.

Returns indication of whether the flush is complete or incomplete.

Reimplemented in DtSmRtiConnection.

References DtMsgSocket::flush(), isOk(), DtMsgSocket::lastError(), PERROR, and socket().

Referenced by DtConnectionMgr::flush(), DtConnectionMgr::repairFederationConnection(), and DtAsyncConnectionMgr::sendPackets().

void DtRtiConnection::init ( DtMsgSocket s) [protected]
int DtRtiConnection::isOk ( ) [virtual]
DtRtiMsg * DtRtiConnection::netRead ( DtNetReadStatus retCode = NULL) [virtual]
DtRtiConnection& DtRtiConnection::operator= ( DtRtiConnection const &  orig) [private]

Assignment Operator not implemented.

References myMsgFact.

Referenced by netRead().

int DtRtiConnection::send ( const DtRtiMsg msg,
const MAKRti::DtInetAddr &  addr = MAKRti::DtInetAddr() 
) [virtual]
void DtRtiConnection::setCheckVersion ( bool  enableCheckVersion) [virtual]

Set/get whether to check message version.

This connection will filter invalid versions when enabled.

References myCheckVersion.

void DtRtiConnection::setConnId ( unsigned long  connId) [inline, virtual]

Set/Get the connection ID assigned to the connection.

References connId(), and myConnId.

Referenced by DtConnectionMgr::createAncillaryRelConns(), and DtConnectionMgr::createRelConn().

void DtRtiConnection::setFederateHandle ( DtFederationHandle  handle) [inline, virtual]
void DtRtiConnection::setFedExHandle ( int  handle) [inline, virtual]
void DtRtiConnection::setFedExName ( const MAKRti::DtString &  newFedExName) [inline, virtual]
void DtRtiConnection::setMsgFactory ( DtRtiMsgFactory fact) [virtual]

Set/Get the Message Factory used by this object.

fact becomes property of this object, meaning it will be deleted when the factory is replaced, or when the DtRtiConnection is destroyed.

References myMsgFact.

Referenced by DtConnectionMgr::createAncillaryRelConns(), DtConnectionMgr::createBestEffortConn(), DtConnectionMgr::createRelConn(), DtSmConnectionMgr::createSharedMemConn(), DtSmConnectionMgr::setMsgFactory(), and DtConnectionMgr::setMsgFactory().

DtMsgSocket * DtRtiConnection::socket ( ) [inline, virtual]

Member Data Documentation

Referenced by checkVersion(), and setCheckVersion().

unsigned long DtRtiConnection::myConnId [protected]

Win32 only.

Referenced by connId(), and setConnId().

MAKRti::DtString DtRtiConnection::myFedExName [protected]

Referenced by fedExName(), init(), netRead(), and setFedExName().

Referenced by init(), rtiMsgFactory(), and setMsgFactory().

unsigned long DtRtiConnection::myReceivedMsgCount [protected]

Referenced by init(), isOk(), and socket().

unsigned int DtRtiConnection::myWaitEventIndex [protected]

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

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)