Example #1
0
void Ambassador::turnInteractionsOff (
     RTI::InteractionClassHandle theInteraction)
   throw (
     RTI::InteractionClassNotPublished,
     RTI::FederateInternalError)
{
   std::cout << "Ambassador::turnInteractionsOff(): " ;
   NetIO* netIO = getNetIO();
   int idx = netIO->findInteractionClassIndex(theInteraction);
   if (idx != 0) {
      std::cout << idx;
      netIO->setInteractionEnabledFlag(idx,false);
   }
   std::cout << std::endl;
}
Example #2
0
void Ambassador::turnInteractionsOn (
     RTI::InteractionClassHandle theInteraction)
   throw (
     RTI::InteractionClassNotPublished,
     RTI::FederateInternalError)
{
   std::cout << "Ambassador::turnInteractionsOn(): " ;
   NetIO* netIO = getNetIO();
   int idx = netIO->findInteractionClassIndex(theInteraction);
   if (idx != 0 && netIO->isInteractionClassPublished(idx)) {
      // It's an interaction that we publish, so we can start
      // send new interactions of this class ...
      std::cout << idx;
      netIO->setInteractionEnabledFlag(idx,true);
   }
   std::cout << std::endl;
}