MAK RTIspy API Documentation for HLA 1516
List of all members | 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:

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

DtRtiConnection::DtRtiConnection ( DtMsgSocket skt)

Constructor.

References DtBindMessage(), and init().

DtRtiConnection::~DtRtiConnection ( )
virtual

Destructor.

DtRtiConnection::DtRtiConnection ( const DtRtiConnection orig)
private

Copy CTOR not implemented.

Member Function Documentation

bool DtRtiConnection::checkVersion ( ) const
virtual

References myCheckVersion.

Referenced by netRead().

unsigned long DtRtiConnection::connId ( ) const
inlinevirtual
void DtRtiConnection::disableCheckSize ( )
virtual

Disable message size check.

References myCheckSize.

void DtRtiConnection::enableCheckSize ( )
virtual

Enable message size check.

References myCheckSize.

DtFederationHandle DtRtiConnection::federateHandle ( ) const
inlinevirtual

References myFedHandle.

int DtRtiConnection::fedExHandle ( ) const
inlinevirtual

References myFedExHandle.

const MAKRti::DtString & DtRtiConnection::fedExName ( ) const
inlinevirtual

References myFedExName.

bool DtRtiConnection::flush ( )
virtual

Send buffered messages.

Returns indication of whether the flush is complete or incomplete.

Reimplemented in DtSmRtiConnection.

References DtMsgSocket::flush(), isOk(), DtMsgSocket::lastError(), PERROR, DtMsgSocket::printStateToStream(), 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.

DtRtiMsgFactory * DtRtiConnection::rtiMsgFactory ( )
inlinevirtual

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 enableCheckVersion, and myCheckVersion.

void DtRtiConnection::setConnId ( unsigned long  connId)
inlinevirtual

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)
inlinevirtual
void DtRtiConnection::setFedExHandle ( int  handle)
inlinevirtual
void DtRtiConnection::setFedExName ( const MAKRti::DtString &  newFedExName)
inlinevirtual
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 ( )
inlinevirtual

Member Data Documentation

bool DtRtiConnection::myCheckSize
protected
bool DtRtiConnection::myCheckVersion
protected

Referenced by checkVersion(), and setCheckVersion().

unsigned long DtRtiConnection::myConnId
protected

Win32 only.

Referenced by connId(), and setConnId().

int DtRtiConnection::myFedExHandle
protected
MAKRti::DtString DtRtiConnection::myFedExName
protected

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

DtFederationHandle DtRtiConnection::myFedHandle
protected
DtRtiMsgFactory* DtRtiConnection::myMsgFact
protected

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

unsigned long DtRtiConnection::myReceivedMsgCount
protected
DtMsgSocket* DtRtiConnection::mySocket
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 Fri Mar 14 19:08:55 EDT 2014 from SVN revision 137085
Copyright © 2005-2014 VT MÄK Inc. All Rights Reserved (www.mak.com)