#include <vl/collisionInteraction.h>
#include <vl/exerciseConn.h>
#ifdef DtHLA_1516_EVOLVED
#include <RTI/RTI1516.h>
#include <RTI/RTIambassadorFactory.h>
#include <RTI/time/HLAfloat64TimeFactory.h>
#include <RTI/time/HLAfloat64Time.h>
#include <RTI/time/HLAfloat64Interval.h>
#elif defined DtHLA_1516
#include <RTI/RTI1516.h>
#include <RTI/RTIambassadorFactory.h>
#include <RTI/logicalTimeFactoryImpl.h>
#include <RTI/logicalTimeImpl.h>
#include <RTI/logicalTimeIntervalImpl.h>
#else // HLA 1.3
#include <fedtime.hh>
#endif
using namespace MAKVrExchange;
, myRprBroker( (MAKVrExchange::DtRprBroker::DtRprBroker*)broker )
, myPortalReflectedList( 0 )
, myPortalPublisher( 0 )
, myLookahead( 1.0 )
, myCurrentLbts( 0 )
, myCurrentTime( 0 )
, myIsTimeRegulating( false )
, myIsTimeConstrained( false )
, myRequestTime( false )
{
try
{
if ( initializer )
{
}
myPortalReflectedList->setDiscoveryCondition( portalDiscoveryCriteria, this );
myPortalPublisher->sr()->setIdentifier( tmObjId );
myRprBroker->connection()->fedAmb()->addTimeConstrainedEnabledCb( processTimeConstrained, this );
myRprBroker->connection()->fedAmb()->addTimeRegulationEnabledCb( processTimeRegulating, this );
myRprBroker->connection()->fedAmb()->addTimeAdvanceGrantCb( processTimeGrant, this );
myRprBroker->connection()->rtiAmb()->enableAsynchronousDelivery();
}
DtCATCH_AND_PROPAGATE( DtException );
}
{
}
{
if ( enabled )
{
{
#ifdef DtHLA_1516_EVOLVED
#elif defined DtHLA_1516
#else // HLA 1.3
RTIfedTime currentTime(0.0);
#endif
}
{
}
}
else
{
{
}
{
}
}
}
{
try
{
{
}
}
DtCATCH_AND_PROPAGATE( DtException )
}
{
}
{
}
{
}
{
try
{
}
DtCATCH_AND_PROPAGATE( DtException )
}
{
try
{
myLbtsValues[portalTMState.identifier()] = portalTMState.lbts();
}
DtCATCH_AND_PROPAGATE( DtException )
}
{
try
{
}
DtCATCH_AND_PROPAGATE( DtException )
}
{
if ( userData && object )
{
return true;
}
return false;
}
#if DtHLA_1516
const RTI::LogicalTime &fedTime,
#else
const RTI::FedTime &fedTime,
#endif
void *usr)
{
}
#if DtHLA_1516
const RTI::LogicalTime &fedTime)
#else
const RTI::FedTime &fedTime)
#endif
{
#ifdef DtHLA_1516_EVOLVED
myCurrentTime = static_cast<rti1516e::HLAfloat64Time>(fedTime).getTime();
#elif defined DtHLA_1516
myCurrentTime = static_cast<LogicalTimeImpl>(fedTime).getTime();
#else // HLA 1.3
myCurrentTime = static_cast<RTIfedTime>(fedTime).getTime();
#endif
myRequestTime = true;
}
#if DtHLA_1516
const RTI::LogicalTime &fedTime,
#else
const RTI::FedTime &fedTime,
#endif
void *usr)
{
}
#if DtHLA_1516
const RTI::LogicalTime &fedTime)
#else
const RTI::FedTime &fedTime)
#endif
{
myIsTimeRegulating = true;
#ifdef DtHLA_1516_EVOLVED
myCurrentTime = static_cast<rti1516e::HLAfloat64Time>(fedTime).getTime();
#elif defined DtHLA_1516
myCurrentTime = static_cast<LogicalTimeImpl>(fedTime).getTime();
#else // HLA 1.3
myCurrentTime = static_cast<RTIfedTime>(fedTime).getTime();
#endif
if(myIsTimeRegulating && myIsTimeConstrained)
{
myRequestTime = true;
}
}
#if DtHLA_1516
const RTI::LogicalTime &fedTime,
#else
const RTI::FedTime &fedTime,
#endif
void *usr)
{
}
#if DtHLA_1516
const RTI::LogicalTime& fedTime )
#else
const RTI::FedTime& fedTime )
#endif
{
myIsTimeConstrained = true;
#ifdef DtHLA_1516_EVOLVED
myCurrentTime = static_cast<rti1516e::HLAfloat64Time>(fedTime).getTime();
#elif defined DtHLA_1516
myCurrentTime = static_cast<LogicalTimeImpl>(fedTime).getTime();
#else // HLA 1.3
myCurrentTime = static_cast<RTIfedTime>(fedTime).getTime();
#endif
if ( myIsTimeRegulating && myIsTimeConstrained )
{
myRequestTime = true;
}
}
{
#ifdef DtHLA_1516_EVOLVED
rti1516e::HLAfloat64Time galt;
if ( galt.isFinal() )
{
}
else
{
}
#elif defined DtHLA_1516
LogicalTimeImpl galt;
if ( galt.isFinal() )
{
}
else
{
}
#else // HLA 1.3
RTIfedTime lbts;
if ( lbts.isPositiveInfinity() )
{
}
else
{
}
#endif
{
}
std::map<DtString, double>::const_iterator lbtsIter =
myLbtsValues.begin();
std::map<DtString, double>::const_iterator iterEnd =
myLbtsValues.end();
for ( ; lbtsIter != iterEnd; ++lbtsIter )
{
if ( lbtsIter->second < lowestLbts )
{
lowestLbts = lbtsIter->second;
}
}
{
#ifdef DtHLA_1516_EVOLVED
rti1516e::HLAfloat64Time req( lowestLbts );
#elif defined DtHLA_1516
LogicalTimeImpl req( lowestLbts );
#else // HLA 1.3
RTIfedTime req( lowestLbts );
#endif
}
}
{
}
{
}
{
}
{
}
{
return true;
}
{
return false;
}
#include <vlutil/vlPrintUtil.h>
: MAKVrExchange::DtPortalObject(
, myLbts( 0 )
{
}
: DtPortalObject( original )
, myLbts( original.lbts() )
{
}
{
}
{
if ( this == &original )
{
return *this;
}
DtPortalObject::operator = ( original );
setLbts( original.lbts() );
return *this;
}
{
return ( DtPortalObject::operator == (rightOperand)
&& myLbts == rightOperand.lbts() );
}
{
return !( *this == rightOperand );
}
{
int size = DtPortalObject::netSize();
return size;
}
{
DtPortalObject::writeSelfToBuffer( buffer, bufferSize );
int baseSize = DtPortalObject::netSize();
char* ptr = (char*) buffer + baseSize;
bufferSize -= baseSize;
ptr =
encode( myLbts, ptr, bufferSize );
}
{
DtPortalObject::readSelfFromBuffer( buffer, bufferSize );
int baseSize = DtPortalObject::netSize();
const char* ptr = (const char*) buffer + baseSize;
bufferSize -= baseSize;
ptr =
decode( myLbts, ptr, bufferSize );
}
{
DtPortalObject::printDataToStream( stream );
return stream;
}