16 #include <vlutil/vlMachineTypes.h>
17 #include <vl/vrlRtiAmbassador13.h>
23 namespace MAKTrafficClientServerExConn
25 class DtServerExerciseConnection;
27 class DT_DLL_CSEC DtServerRtiAmbassador :
public DtVrlRtiAmbassador
32 DtServerRtiAmbassador();
35 virtual ~DtServerRtiAmbassador();
40 DtServerRtiAmbassador(
const DtServerRtiAmbassador& orig);
43 DtServerRtiAmbassador& operator=(
const DtServerRtiAmbassador& orig);
48 virtual void setServerExerciseConnection(DtServerExerciseConnection* exConn);
51 virtual DtServerExerciseConnection* serverExerciseConnection();
54 virtual RTI::RTIambassador* rtiAmb();
57 virtual void createFederationExecution (
58 const char *executionName,
62 virtual void destroyFederationExecution (
63 const char *executionName);
66 virtual RTI::FederateHandle joinFederationExecution (
68 const char* executionName,
69 RTI::FederateAmbassador* federateAmbassadorReference);
72 virtual void resignFederationExecution(
73 RTI::ResignAction theAction);
76 virtual void registerFederationSynchronizationPoint(
81 virtual void registerFederationSynchronizationPoint(
84 const RTI::FederateHandleSet& syncSet);
87 virtual void synchronizationPointAchieved(
91 virtual void requestFederationSave (
93 const RTI::FedTime& theTime);
96 virtual void requestFederationSave (
100 virtual void federateSaveBegun();
103 virtual void federateSaveComplete();
106 virtual void federateSaveNotComplete();
109 virtual void requestFederationRestore(
const char* label);
112 virtual void federateRestoreComplete();
115 virtual void federateRestoreNotComplete();
118 virtual void publishObjectClass(
119 RTI::ObjectClassHandle theClass,
120 const RTI::AttributeHandleSet& attributeList);
123 virtual void unpublishObjectClass(
124 RTI::ObjectClassHandle theClass);
127 virtual void publishInteractionClass(
128 RTI::InteractionClassHandle theInteraction);
131 virtual void unpublishInteractionClass(
132 RTI::InteractionClassHandle theInteraction);
135 virtual void subscribeObjectClassAttributes(
136 RTI::ObjectClassHandle theClass,
137 const RTI::AttributeHandleSet& attributeList,
138 RTI::Boolean active = RTI::RTI_TRUE);
141 virtual void unsubscribeObjectClass(
142 RTI::ObjectClassHandle theClass);
145 virtual void subscribeInteractionClass(
146 RTI::InteractionClassHandle theClass,
147 RTI::Boolean active = RTI::RTI_TRUE);
150 virtual void unsubscribeInteractionClass(
151 RTI::InteractionClassHandle theClass);
154 virtual RTI::ObjectHandle registerObjectInstance(
155 RTI::ObjectClassHandle theClass,
const char* theObject);
159 virtual RTI::ObjectHandle registerObjectInstanceSR(
160 unsigned int clientID,
161 RTI::ObjectClassHandle theClass,
const char* theObject);
164 virtual RTI::ObjectHandle registerObjectInstance(
165 RTI::ObjectClassHandle theClass);
169 virtual RTI::ObjectHandle registerObjectInstanceSR(
170 unsigned int clientID,
171 RTI::ObjectClassHandle theClass);
174 virtual RTI::EventRetractionHandle updateAttributeValues(
175 RTI::ObjectHandle theObject,
176 const RTI::AttributeHandleValuePairSet& theAttributes,
177 const RTI::FedTime& theTime,
182 virtual RTI::EventRetractionHandle updateAttributeValuesSR(
183 unsigned int clientID,
184 RTI::ObjectHandle theObject,
185 const RTI::AttributeHandleValuePairSet& theAttributes,
186 const RTI::FedTime& theTime,
190 virtual void updateAttributeValues(
191 RTI::ObjectHandle theObject,
192 const RTI::AttributeHandleValuePairSet& theAttributes,
197 virtual void updateAttributeValuesSR(
198 unsigned int clientID,
199 RTI::ObjectHandle theObject,
200 const RTI::AttributeHandleValuePairSet& theAttributes,
204 virtual RTI::EventRetractionHandle sendInteraction(
205 RTI::InteractionClassHandle theInteraction,
206 const RTI::ParameterHandleValuePairSet& theParameters,
207 const RTI::FedTime& theTime,
212 virtual RTI::EventRetractionHandle sendInteractionSR(
213 unsigned int clientID,
214 RTI::InteractionClassHandle theInteraction,
215 const RTI::ParameterHandleValuePairSet& theParameters,
216 const RTI::FedTime& theTime,
220 virtual void sendInteraction(
221 RTI::InteractionClassHandle theInteraction,
222 const RTI::ParameterHandleValuePairSet& theParameters,
227 virtual void sendInteractionSR(
228 unsigned int clientID,
229 RTI::InteractionClassHandle theInteraction,
230 const RTI::ParameterHandleValuePairSet& theParameters,
234 virtual RTI::EventRetractionHandle deleteObjectInstance(
235 RTI::ObjectHandle theObject,
236 const RTI::FedTime& theTime,
241 virtual RTI::EventRetractionHandle deleteObjectInstanceSR(
242 unsigned int clientID,
243 RTI::ObjectHandle theObject,
244 const RTI::FedTime& theTime,
248 virtual void deleteObjectInstance(
249 RTI::ObjectHandle theObject,
254 virtual void deleteObjectInstanceSR(
255 unsigned int clientID,
256 RTI::ObjectHandle theObject,
261 virtual void localDeleteObjectInstanceSR(
262 unsigned int clientID,
263 RTI::ObjectHandle theObject);
266 virtual void localDeleteObjectInstance(
267 RTI::ObjectHandle theObject);
270 virtual void changeAttributeTransportationType (
271 RTI::ObjectHandle theObject,
272 const RTI::AttributeHandleSet& theAttributes,
273 RTI::TransportationHandle theType);
276 virtual void changeInteractionTransportationType (
277 RTI::InteractionClassHandle theClass,
278 RTI::TransportationHandle theType);
281 virtual void requestObjectAttributeValueUpdate (
282 RTI::ObjectHandle theObject,
283 const RTI::AttributeHandleSet& theAttributes);
286 virtual void requestClassAttributeValueUpdate (
287 RTI::ObjectClassHandle theClass,
288 const RTI::AttributeHandleSet& theAttributes);
291 virtual void unconditionalAttributeOwnershipDivestiture(
292 RTI::ObjectHandle theObject,
293 const RTI::AttributeHandleSet& theAttributes);
296 virtual void negotiatedAttributeOwnershipDivestiture(
297 RTI::ObjectHandle theObject,
298 const RTI::AttributeHandleSet& theAttributes,
302 virtual void attributeOwnershipAcquisition(
303 RTI::ObjectHandle theObject,
304 const RTI::AttributeHandleSet& desiredAttributes,
308 virtual void attributeOwnershipAcquisitionIfAvailable(
309 RTI::ObjectHandle theObject,
310 const RTI::AttributeHandleSet& desiredAttributes);
313 virtual RTI::AttributeHandleSet* attributeOwnershipReleaseResponse(
314 RTI::ObjectHandle theObject,
315 const RTI::AttributeHandleSet& theAttributes);
318 virtual void cancelNegotiatedAttributeOwnershipDivestiture(
319 RTI::ObjectHandle theObject,
320 const RTI::AttributeHandleSet& theAttributes);
323 virtual void cancelAttributeOwnershipAcquisition(
324 RTI::ObjectHandle theObject,
325 const RTI::AttributeHandleSet& theAttributes);
328 virtual void queryAttributeOwnership(
329 RTI::ObjectHandle theObject,
330 RTI::AttributeHandle theAttribute);
333 virtual RTI::Boolean isAttributeOwnedByFederate(
334 RTI::ObjectHandle theObject,
335 RTI::AttributeHandle theAttribute);
338 virtual void enableTimeRegulation (
339 const RTI::FedTime& theFederateTime,
340 const RTI::FedTime& theLookahead);
343 virtual void disableTimeRegulation();
346 virtual void enableTimeConstrained();
349 virtual void disableTimeConstrained();
352 virtual void timeAdvanceRequest(
353 const RTI::FedTime& theTime);
356 virtual void timeAdvanceRequestAvailable (
357 const RTI::FedTime& theTime);
360 virtual void nextEventRequest(
361 const RTI::FedTime& theTime);
364 virtual void nextEventRequestAvailable (
365 const RTI::FedTime& theTime);
368 virtual void flushQueueRequest (
369 const RTI::FedTime& theTime);
372 virtual void enableAsynchronousDelivery();
375 virtual void disableAsynchronousDelivery();
378 virtual void queryLBTS(RTI::FedTime& theTime);
381 virtual void queryFederateTime(RTI::FedTime& theTime);
384 virtual void queryMinNextEventTime (
385 RTI::FedTime& theTime);
388 virtual void modifyLookahead (
389 const RTI::FedTime& theLookahead);
392 virtual void queryLookahead (
393 RTI::FedTime& theTime);
396 virtual void retract(
397 RTI::EventRetractionHandle theHandle);
400 virtual void changeAttributeOrderType(
401 RTI::ObjectHandle theObject,
402 const RTI::AttributeHandleSet& theAttributes,
403 RTI::OrderingHandle theType);
406 virtual void changeInteractionOrderType(
407 RTI::InteractionClassHandle theClass,
408 RTI::OrderingHandle theType);
411 virtual RTI::Region* createRegion (
412 RTI::SpaceHandle theSpace,
413 RTI::ULong numberOfExtents);
416 virtual void notifyAboutRegionModification (
417 RTI::Region &theRegion);
420 virtual void deleteRegion(RTI::Region *theRegion);
423 virtual RTI::ObjectHandle registerObjectInstanceWithRegion(
424 RTI::ObjectClassHandle theClass,
425 const char* theObject,
426 RTI::AttributeHandle theAttributes[],
427 RTI::Region* theRegions[],
428 RTI::ULong theNumberOfHandles);
432 virtual RTI::ObjectHandle registerObjectInstanceWithRegionSR(
433 unsigned int clientID,
434 RTI::ObjectClassHandle theClass,
435 const char* theObject,
436 RTI::AttributeHandle theAttributes[],
437 RTI::Region* theRegions[],
438 RTI::ULong theNumberOfHandles);
441 virtual RTI::ObjectHandle registerObjectInstanceWithRegion(
442 RTI::ObjectClassHandle theClass,
443 RTI::AttributeHandle theAttributes[],
444 RTI::Region* theRegions[],
445 RTI::ULong theNumberOfHandles);
449 virtual RTI::ObjectHandle registerObjectInstanceWithRegionSR(
450 unsigned int clientID,
451 RTI::ObjectClassHandle theClass,
452 RTI::AttributeHandle theAttributes[],
453 RTI::Region* theRegions[],
454 RTI::ULong theNumberOfHandles);
457 virtual void associateRegionForUpdates (
458 RTI::Region& theRegion,
459 RTI::ObjectHandle theObject,
460 const RTI::AttributeHandleSet& theAttributes);
463 virtual void unassociateRegionForUpdates(
464 RTI::Region& theRegion,
465 RTI::ObjectHandle theObject);
468 virtual void subscribeObjectClassAttributesWithRegion(
469 RTI::ObjectClassHandle theClass,
470 RTI::Region& theRegion,
471 const RTI::AttributeHandleSet &attributeList,
472 RTI::Boolean active = RTI::RTI_TRUE);
475 virtual void unsubscribeObjectClassWithRegion(
476 RTI::ObjectClassHandle theClass,
477 RTI::Region& theRegion);
480 virtual void subscribeInteractionClassWithRegion (
481 RTI::InteractionClassHandle theClass,
482 RTI::Region& theRegion,
483 RTI::Boolean active = RTI::RTI_TRUE);
486 virtual void unsubscribeInteractionClassWithRegion (
487 RTI::InteractionClassHandle theClass,
488 RTI::Region& theRegion);
491 virtual RTI::EventRetractionHandle sendInteractionWithRegion(
492 RTI::InteractionClassHandle theInteraction,
493 const RTI::ParameterHandleValuePairSet &theParameters,
494 const RTI::FedTime& theTime,
496 const RTI::Region& theRegion);
500 virtual RTI::EventRetractionHandle sendInteractionWithRegionSR(
501 unsigned int clientID,
502 RTI::InteractionClassHandle theInteraction,
503 const RTI::ParameterHandleValuePairSet &theParameters,
504 const RTI::FedTime& theTime,
506 const RTI::Region& theRegion);
509 virtual void sendInteractionWithRegion(
510 RTI::InteractionClassHandle theInteraction,
511 const RTI::ParameterHandleValuePairSet &theParameters,
513 const RTI::Region& theRegion);
517 virtual void sendInteractionWithRegionSR(
518 unsigned int clientID,
519 RTI::InteractionClassHandle theInteraction,
520 const RTI::ParameterHandleValuePairSet &theParameters,
522 const RTI::Region& theRegion);
525 virtual void requestClassAttributeValueUpdateWithRegion(
526 RTI::ObjectClassHandle theClass,
527 const RTI::AttributeHandleSet& theAttributes,
528 const RTI::Region& theRegion);
531 virtual RTI::ObjectClassHandle getObjectClassHandle (
532 const char* theName);
535 virtual char* getObjectClassName (
536 RTI::ObjectClassHandle theHandle);
539 virtual RTI::AttributeHandle getAttributeHandle (
541 RTI::ObjectClassHandle whichClass);
544 virtual char* getAttributeName (
545 RTI::AttributeHandle theHandle,
546 RTI::ObjectClassHandle whichClass);
549 virtual RTI::InteractionClassHandle getInteractionClassHandle (
550 const char* theName);
553 virtual char* getInteractionClassName (
554 RTI::InteractionClassHandle theHandle);
557 virtual RTI::ParameterHandle getParameterHandle (
559 RTI::InteractionClassHandle whichClass);
562 virtual char* getParameterName (
563 RTI::ParameterHandle theHandle,
564 RTI::InteractionClassHandle whichClass);
567 virtual RTI::ObjectHandle getObjectInstanceHandle(
568 const char* theName);
571 virtual char* getObjectInstanceName(
572 RTI::ObjectHandle theHandle);
575 virtual RTI::SpaceHandle getRoutingSpaceHandle (
576 const char* theName);
579 virtual const char* getRoutingSpaceName (
580 const RTI::SpaceHandle theHandle);
583 virtual RTI::DimensionHandle getDimensionHandle(
585 RTI::SpaceHandle whichSpace);
588 virtual char* getDimensionName(
589 RTI::DimensionHandle theHandle,
590 RTI::SpaceHandle whichSpace);
593 virtual RTI::SpaceHandle
594 getAttributeRoutingSpaceHandle(
595 RTI::AttributeHandle theHandle,
596 RTI::ObjectClassHandle whichClass);
599 virtual RTI::ObjectClassHandle getObjectClass (
600 RTI::ObjectHandle theObject);
603 virtual RTI::SpaceHandle getInteractionRoutingSpaceHandle(
604 RTI::InteractionClassHandle theHandle);
607 virtual RTI::TransportationHandle getTransportationHandle(
608 const char *theName);
611 virtual char* getTransportationName(
612 RTI::TransportationHandle theHandle);
615 virtual RTI::OrderingHandle getOrderingHandle(
616 const char *theName);
619 virtual char* getOrderingName(
620 RTI::OrderingHandle theHandle);
623 virtual void enableClassRelevanceAdvisorySwitch();
626 virtual void disableClassRelevanceAdvisorySwitch();
629 virtual void enableAttributeRelevanceAdvisorySwitch();
632 virtual void disableAttributeRelevanceAdvisorySwitch();
635 virtual void enableAttributeScopeAdvisorySwitch();
638 virtual void disableAttributeScopeAdvisorySwitch();
641 virtual void enableInteractionRelevanceAdvisorySwitch();
644 virtual void disableInteractionRelevanceAdvisorySwitch();
647 virtual RTI::Boolean tick();
650 virtual RTI::Boolean tick(
651 RTI::TickTime minimum,
652 RTI::TickTime maximum);
655 virtual RTI::RegionToken getRegionToken(RTI::Region*);
658 virtual RTI::Region* getRegion(RTI::RegionToken);
663 static DtVrlRtiAmbassador* create(
const std::vector<std::wstring>&);
668 virtual bool lockServiceCall();
671 virtual void unlockServiceCall();
674 virtual bool enterServiceCall();
677 virtual void exitServiceCall();
683 RTI::RTIambassador* myRtiAmb;
686 DtServerExerciseConnection* myServerExerciseConnection;
689 RTI::FederateAmbassador* myFedAmb;