#include <vl/collideInter.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
, myRprBroker( broker )
, myPortalReflectedList(0)
, myPortalPublisher(0)
, myLookahead(1.0)
, myCurrentLbts(0)
, myCurrentTime(0)
, myIsTimeRegulating(false)
, myIsTimeConstrained(false)
, myRequestTime(false)
{
try
{
if(initializer)
{
}
myPortalReflectedList->addRemovalCallback( portalRemovalCallback, this );
myPortalReflectedList->setDiscoveryCondition( portalDiscoveryCriteria, this );
myPortalPublisher->sr()->setIdentifier(tmObjId);
broker->
connection()->fedAmb()->addTimeConstrainedEnabledCb(processTimeConstrained,
this);
broker->
connection()->fedAmb()->addTimeRegulationEnabledCb(processTimeRegulating,
this);
broker->
connection()->fedAmb()->addTimeAdvanceGrantCb(processTimeGrant,
this);
broker->
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 )
}
{
bool canBeDiscovered = false;
if (userData && object)
{
canBeDiscovered = true;
}
return canBeDiscovered;
}
#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;
}