MAK Data Logger API Documentation for DIS
serverRtiAmbassador13.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2012 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 #if DtHLA
12 #if !DtHLA_1516
13 
15 
16 #include <vlutil/vlMachineTypes.h>
17 #include <vl/vrlRtiAmb13.h>
18 
19 #include <RTI.hh>
20 
21 #include <vector>
22 
23 namespace MAKTrafficClientServerExConn
24 {
25  class DtServerExerciseConnection;
26 
27  class DT_DLL_CSEC DtServerRtiAmbassador : public DtVrlRtiAmbassador
28  {
29  public:
30 
32  DtServerRtiAmbassador();
33 
35  virtual ~DtServerRtiAmbassador();
36 
37  private:
38 
40  DtServerRtiAmbassador(const DtServerRtiAmbassador& orig);
41 
43  DtServerRtiAmbassador& operator=(const DtServerRtiAmbassador& orig);
44 
45  public:
46 
48  virtual void setServerExerciseConnection(DtServerExerciseConnection* exConn);
49 
51  virtual DtServerExerciseConnection* serverExerciseConnection();
52 
54  virtual RTI::RTIambassador* rtiAmb();
55 
57  virtual void createFederationExecution (
58  const char *executionName,
59  const char *FED);
60 
62  virtual void destroyFederationExecution (
63  const char *executionName);
64 
66  virtual RTI::FederateHandle joinFederationExecution (
67  const char* yourName,
68  const char* executionName,
69  RTI::FederateAmbassador* federateAmbassadorReference);
70 
72  virtual void resignFederationExecution(
73  RTI::ResignAction theAction);
74 
76  virtual void registerFederationSynchronizationPoint(
77  const char* label,
78  const char* theTag);
79 
81  virtual void registerFederationSynchronizationPoint(
82  const char* label,
83  const char* theTag,
84  const RTI::FederateHandleSet& syncSet);
85 
87  virtual void synchronizationPointAchieved(
88  const char* label);
89 
91  virtual void requestFederationSave (
92  const char* label,
93  const RTI::FedTime& theTime);
94 
96  virtual void requestFederationSave (
97  const char *label);
98 
100  virtual void federateSaveBegun();
101 
103  virtual void federateSaveComplete();
104 
106  virtual void federateSaveNotComplete();
107 
109  virtual void requestFederationRestore(const char* label);
110 
112  virtual void federateRestoreComplete();
113 
115  virtual void federateRestoreNotComplete();
116 
118  virtual void publishObjectClass(
119  RTI::ObjectClassHandle theClass,
120  const RTI::AttributeHandleSet& attributeList);
121 
123  virtual void unpublishObjectClass(
124  RTI::ObjectClassHandle theClass);
125 
127  virtual void publishInteractionClass(
128  RTI::InteractionClassHandle theInteraction);
129 
131  virtual void unpublishInteractionClass(
132  RTI::InteractionClassHandle theInteraction);
133 
135  virtual void subscribeObjectClassAttributes(
136  RTI::ObjectClassHandle theClass,
137  const RTI::AttributeHandleSet& attributeList,
138  RTI::Boolean active = RTI::RTI_TRUE);
139 
141  virtual void unsubscribeObjectClass(
142  RTI::ObjectClassHandle theClass);
143 
145  virtual void subscribeInteractionClass(
146  RTI::InteractionClassHandle theClass,
147  RTI::Boolean active = RTI::RTI_TRUE);
148 
150  virtual void unsubscribeInteractionClass(
151  RTI::InteractionClassHandle theClass);
152 
154  virtual RTI::ObjectHandle registerObjectInstance(
155  RTI::ObjectClassHandle theClass, const char* theObject);
156 
159  virtual RTI::ObjectHandle registerObjectInstanceSR(
160  unsigned int clientID,
161  RTI::ObjectClassHandle theClass, const char* theObject);
162 
164  virtual RTI::ObjectHandle registerObjectInstance(
165  RTI::ObjectClassHandle theClass);
166 
169  virtual RTI::ObjectHandle registerObjectInstanceSR(
170  unsigned int clientID,
171  RTI::ObjectClassHandle theClass);
172 
174  virtual RTI::EventRetractionHandle updateAttributeValues(
175  RTI::ObjectHandle theObject,
176  const RTI::AttributeHandleValuePairSet& theAttributes,
177  const RTI::FedTime& theTime,
178  const char* theTag);
179 
182  virtual RTI::EventRetractionHandle updateAttributeValuesSR(
183  unsigned int clientID,
184  RTI::ObjectHandle theObject,
185  const RTI::AttributeHandleValuePairSet& theAttributes,
186  const RTI::FedTime& theTime,
187  const char* theTag);
188 
190  virtual void updateAttributeValues(
191  RTI::ObjectHandle theObject,
192  const RTI::AttributeHandleValuePairSet& theAttributes,
193  const char* theTag);
194 
197  virtual void updateAttributeValuesSR(
198  unsigned int clientID,
199  RTI::ObjectHandle theObject,
200  const RTI::AttributeHandleValuePairSet& theAttributes,
201  const char* theTag);
202 
204  virtual RTI::EventRetractionHandle sendInteraction(
205  RTI::InteractionClassHandle theInteraction,
206  const RTI::ParameterHandleValuePairSet& theParameters,
207  const RTI::FedTime& theTime,
208  const char* theTag);
209 
212  virtual RTI::EventRetractionHandle sendInteractionSR(
213  unsigned int clientID,
214  RTI::InteractionClassHandle theInteraction,
215  const RTI::ParameterHandleValuePairSet& theParameters,
216  const RTI::FedTime& theTime,
217  const char* theTag);
218 
220  virtual void sendInteraction(
221  RTI::InteractionClassHandle theInteraction,
222  const RTI::ParameterHandleValuePairSet& theParameters,
223  const char* theTag);
224 
227  virtual void sendInteractionSR(
228  unsigned int clientID,
229  RTI::InteractionClassHandle theInteraction,
230  const RTI::ParameterHandleValuePairSet& theParameters,
231  const char* theTag);
232 
234  virtual RTI::EventRetractionHandle deleteObjectInstance(
235  RTI::ObjectHandle theObject,
236  const RTI::FedTime& theTime,
237  const char* theTag);
238 
241  virtual RTI::EventRetractionHandle deleteObjectInstanceSR(
242  unsigned int clientID,
243  RTI::ObjectHandle theObject,
244  const RTI::FedTime& theTime,
245  const char* theTag);
246 
248  virtual void deleteObjectInstance(
249  RTI::ObjectHandle theObject,
250  const char* theTag);
251 
254  virtual void deleteObjectInstanceSR(
255  unsigned int clientID,
256  RTI::ObjectHandle theObject,
257  const char* theTag);
258 
261  virtual void localDeleteObjectInstanceSR(
262  unsigned int clientID,
263  RTI::ObjectHandle theObject);
264 
266  virtual void localDeleteObjectInstance(
267  RTI::ObjectHandle theObject);
268 
270  virtual void changeAttributeTransportationType (
271  RTI::ObjectHandle theObject,
272  const RTI::AttributeHandleSet& theAttributes,
273  RTI::TransportationHandle theType);
274 
276  virtual void changeInteractionTransportationType (
277  RTI::InteractionClassHandle theClass,
278  RTI::TransportationHandle theType);
279 
281  virtual void requestObjectAttributeValueUpdate (
282  RTI::ObjectHandle theObject,
283  const RTI::AttributeHandleSet& theAttributes);
284 
286  virtual void requestClassAttributeValueUpdate (
287  RTI::ObjectClassHandle theClass,
288  const RTI::AttributeHandleSet& theAttributes);
289 
291  virtual void unconditionalAttributeOwnershipDivestiture(
292  RTI::ObjectHandle theObject,
293  const RTI::AttributeHandleSet& theAttributes);
294 
296  virtual void negotiatedAttributeOwnershipDivestiture(
297  RTI::ObjectHandle theObject,
298  const RTI::AttributeHandleSet& theAttributes,
299  const char* theTag);
300 
302  virtual void attributeOwnershipAcquisition(
303  RTI::ObjectHandle theObject,
304  const RTI::AttributeHandleSet& desiredAttributes,
305  const char* theTag);
306 
308  virtual void attributeOwnershipAcquisitionIfAvailable(
309  RTI::ObjectHandle theObject,
310  const RTI::AttributeHandleSet& desiredAttributes);
311 
313  virtual RTI::AttributeHandleSet* attributeOwnershipReleaseResponse(
314  RTI::ObjectHandle theObject,
315  const RTI::AttributeHandleSet& theAttributes);
316 
318  virtual void cancelNegotiatedAttributeOwnershipDivestiture(
319  RTI::ObjectHandle theObject,
320  const RTI::AttributeHandleSet& theAttributes);
321 
323  virtual void cancelAttributeOwnershipAcquisition(
324  RTI::ObjectHandle theObject,
325  const RTI::AttributeHandleSet& theAttributes);
326 
328  virtual void queryAttributeOwnership(
329  RTI::ObjectHandle theObject,
330  RTI::AttributeHandle theAttribute);
331 
333  virtual RTI::Boolean isAttributeOwnedByFederate(
334  RTI::ObjectHandle theObject,
335  RTI::AttributeHandle theAttribute);
336 
338  virtual void enableTimeRegulation (
339  const RTI::FedTime& theFederateTime,
340  const RTI::FedTime& theLookahead);
341 
343  virtual void disableTimeRegulation();
344 
346  virtual void enableTimeConstrained();
347 
349  virtual void disableTimeConstrained();
350 
352  virtual void timeAdvanceRequest(
353  const RTI::FedTime& theTime);
354 
356  virtual void timeAdvanceRequestAvailable (
357  const RTI::FedTime& theTime);
358 
360  virtual void nextEventRequest(
361  const RTI::FedTime& theTime);
362 
364  virtual void nextEventRequestAvailable (
365  const RTI::FedTime& theTime);
366 
368  virtual void flushQueueRequest (
369  const RTI::FedTime& theTime);
370 
372  virtual void enableAsynchronousDelivery();
373 
375  virtual void disableAsynchronousDelivery();
376 
378  virtual void queryLBTS(RTI::FedTime& theTime);
379 
381  virtual void queryFederateTime(RTI::FedTime& theTime);
382 
384  virtual void queryMinNextEventTime (
385  RTI::FedTime& theTime);
386 
388  virtual void modifyLookahead (
389  const RTI::FedTime& theLookahead);
390 
392  virtual void queryLookahead (
393  RTI::FedTime& theTime);
394 
396  virtual void retract(
397  RTI::EventRetractionHandle theHandle);
398 
400  virtual void changeAttributeOrderType(
401  RTI::ObjectHandle theObject,
402  const RTI::AttributeHandleSet& theAttributes,
403  RTI::OrderingHandle theType);
404 
406  virtual void changeInteractionOrderType(
407  RTI::InteractionClassHandle theClass,
408  RTI::OrderingHandle theType);
409 
411  virtual RTI::Region* createRegion (
412  RTI::SpaceHandle theSpace,
413  RTI::ULong numberOfExtents);
414 
416  virtual void notifyAboutRegionModification (
417  RTI::Region &theRegion);
418 
420  virtual void deleteRegion(RTI::Region *theRegion);
421 
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);
429 
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);
439 
441  virtual RTI::ObjectHandle registerObjectInstanceWithRegion(
442  RTI::ObjectClassHandle theClass,
443  RTI::AttributeHandle theAttributes[],
444  RTI::Region* theRegions[],
445  RTI::ULong theNumberOfHandles);
446 
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);
455 
457  virtual void associateRegionForUpdates (
458  RTI::Region& theRegion,
459  RTI::ObjectHandle theObject,
460  const RTI::AttributeHandleSet& theAttributes);
461 
463  virtual void unassociateRegionForUpdates(
464  RTI::Region& theRegion,
465  RTI::ObjectHandle theObject);
466 
468  virtual void subscribeObjectClassAttributesWithRegion(
469  RTI::ObjectClassHandle theClass,
470  RTI::Region& theRegion,
471  const RTI::AttributeHandleSet &attributeList,
472  RTI::Boolean active = RTI::RTI_TRUE);
473 
475  virtual void unsubscribeObjectClassWithRegion(
476  RTI::ObjectClassHandle theClass,
477  RTI::Region& theRegion);
478 
480  virtual void subscribeInteractionClassWithRegion (
481  RTI::InteractionClassHandle theClass,
482  RTI::Region& theRegion,
483  RTI::Boolean active = RTI::RTI_TRUE);
484 
486  virtual void unsubscribeInteractionClassWithRegion (
487  RTI::InteractionClassHandle theClass,
488  RTI::Region& theRegion);
489 
491  virtual RTI::EventRetractionHandle sendInteractionWithRegion(
492  RTI::InteractionClassHandle theInteraction,
493  const RTI::ParameterHandleValuePairSet &theParameters,
494  const RTI::FedTime& theTime,
495  const char* theTag,
496  const RTI::Region& theRegion);
497 
500  virtual RTI::EventRetractionHandle sendInteractionWithRegionSR(
501  unsigned int clientID,
502  RTI::InteractionClassHandle theInteraction,
503  const RTI::ParameterHandleValuePairSet &theParameters,
504  const RTI::FedTime& theTime,
505  const char* theTag,
506  const RTI::Region& theRegion);
507 
509  virtual void sendInteractionWithRegion(
510  RTI::InteractionClassHandle theInteraction,
511  const RTI::ParameterHandleValuePairSet &theParameters,
512  const char* theTag,
513  const RTI::Region& theRegion);
514 
517  virtual void sendInteractionWithRegionSR(
518  unsigned int clientID,
519  RTI::InteractionClassHandle theInteraction,
520  const RTI::ParameterHandleValuePairSet &theParameters,
521  const char* theTag,
522  const RTI::Region& theRegion);
523 
525  virtual void requestClassAttributeValueUpdateWithRegion(
526  RTI::ObjectClassHandle theClass,
527  const RTI::AttributeHandleSet& theAttributes,
528  const RTI::Region& theRegion);
529 
531  virtual RTI::ObjectClassHandle getObjectClassHandle (
532  const char* theName);
533 
535  virtual char* getObjectClassName (
536  RTI::ObjectClassHandle theHandle);
537 
539  virtual RTI::AttributeHandle getAttributeHandle (
540  const char* theName,
541  RTI::ObjectClassHandle whichClass);
542 
544  virtual char* getAttributeName (
545  RTI::AttributeHandle theHandle,
546  RTI::ObjectClassHandle whichClass);
547 
549  virtual RTI::InteractionClassHandle getInteractionClassHandle (
550  const char* theName);
551 
553  virtual char* getInteractionClassName (
554  RTI::InteractionClassHandle theHandle);
555 
557  virtual RTI::ParameterHandle getParameterHandle (
558  const char* theName,
559  RTI::InteractionClassHandle whichClass);
560 
562  virtual char* getParameterName (
563  RTI::ParameterHandle theHandle,
564  RTI::InteractionClassHandle whichClass);
565 
567  virtual RTI::ObjectHandle getObjectInstanceHandle(
568  const char* theName);
569 
571  virtual char* getObjectInstanceName(
572  RTI::ObjectHandle theHandle);
573 
575  virtual RTI::SpaceHandle getRoutingSpaceHandle (
576  const char* theName);
577 
579  virtual const char* getRoutingSpaceName (
580  const RTI::SpaceHandle theHandle);
581 
583  virtual RTI::DimensionHandle getDimensionHandle(
584  const char* theName,
585  RTI::SpaceHandle whichSpace);
586 
588  virtual char* getDimensionName(
589  RTI::DimensionHandle theHandle,
590  RTI::SpaceHandle whichSpace);
591 
593  virtual RTI::SpaceHandle
594  getAttributeRoutingSpaceHandle(
595  RTI::AttributeHandle theHandle,
596  RTI::ObjectClassHandle whichClass);
597 
599  virtual RTI::ObjectClassHandle getObjectClass (
600  RTI::ObjectHandle theObject);
601 
603  virtual RTI::SpaceHandle getInteractionRoutingSpaceHandle(
604  RTI::InteractionClassHandle theHandle);
605 
607  virtual RTI::TransportationHandle getTransportationHandle(
608  const char *theName);
609 
611  virtual char* getTransportationName(
612  RTI::TransportationHandle theHandle);
613 
615  virtual RTI::OrderingHandle getOrderingHandle(
616  const char *theName);
617 
619  virtual char* getOrderingName(
620  RTI::OrderingHandle theHandle);
621 
623  virtual void enableClassRelevanceAdvisorySwitch();
624 
626  virtual void disableClassRelevanceAdvisorySwitch();
627 
629  virtual void enableAttributeRelevanceAdvisorySwitch();
630 
632  virtual void disableAttributeRelevanceAdvisorySwitch();
633 
635  virtual void enableAttributeScopeAdvisorySwitch();
636 
638  virtual void disableAttributeScopeAdvisorySwitch();
639 
641  virtual void enableInteractionRelevanceAdvisorySwitch();
642 
644  virtual void disableInteractionRelevanceAdvisorySwitch();
645 
647  virtual RTI::Boolean tick();
648 
650  virtual RTI::Boolean tick(
651  RTI::TickTime minimum,
652  RTI::TickTime maximum);
653 
655  virtual RTI::RegionToken getRegionToken(RTI::Region*);
656 
658  virtual RTI::Region* getRegion(RTI::RegionToken);
659 
660  public:
661 
663  static DtVrlRtiAmbassador* create(const std::vector<std::wstring>&);
664 
665  protected:
666 
668  virtual bool lockServiceCall();
669 
671  virtual void unlockServiceCall();
672 
674  virtual bool enterServiceCall();
675 
677  virtual void exitServiceCall();
678 
679 
680  protected:
681 
683  RTI::RTIambassador* myRtiAmb;
684 
686  DtServerExerciseConnection* myServerExerciseConnection;
687 
689  RTI::FederateAmbassador* myFedAmb;
690 
691  bool myIsJoined;
692 
693  };
694 }
695 
696 #endif
697 #endif
698 

Document ID: Generated on Sun Dec 15 18:04:30 EST 2013 from SVN revision 134418
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)