# RTItypes.hh

Go to the documentation of this file.

    00001 // HLA 1.3 Header "RTItypes.hh"
    00002 // $Id: RTItypes.hh,v 3.20 2009/04/02 19:58:10 erk Exp $
    00003
    00004 #ifndef RTITYPES_HH_INCLUDED
    00005 #define RTITYPES_HH_INCLUDED
    00006
    00007 #define MAX_FEDERATION "macro variable is deprecated"
    00008 #define MAX_FEDERATE "macro variable is deprecated"
    00009 #define MAX_NAME_LENGTH "macro variable is deprecated"
    00010 #define MAX_SPACES "macro variable is deprecated"
    00011 #define MAX_OBJECT_CLASSES "macro variable is deprecated"
    00012 #define MAX_INTERACTION_CLASSES "macro variable is deprecated"
    00013 #define MAX_ATTRIBUTES_PER_CLASS "macro variable is deprecated"
    00014 #define MAX_PARAMETERS_PER_CLASS "macro variable is deprecated"
    00015 #define MAX_DIMENSIONS_PER_SPACE "macro variable is deprecated"
    00016 #define DEFAULT_SPACE_NAME "defaultSpace"
    00017 #define DEFAULT_SPACE_DIMENSION_NAME "dimension"
    00018 #define MAX_USER_TAG_LENGTH "macro variable is deprecated"
    00019
    00020 #define RTI_VERSION "CERTI_3.2.3"
    00021 #define RTI_INTERNAL_VERSION "CERTI_3.2.3"
    00022
    00023 #define RTI_MAJOR_VERSION 3
    00024 #define RTI_MINOR_VERSION 2
    00025 #define RTI_RELEASE 0
    00026
    00027 #define RTI_INTERNAL_MAJOR_VERSION 3
    00028 #define RTI_INTERNAL_MINOR_VERSION 2
    00029 #define RTI_INTERNAL_RELEASE 0
    00030
    00031 #define MAX_EXTENT ((RTI::ULong) ~0UL)
    00032 #define MIN_EXTENT ((RTI::ULong) 0UL)
    00033
    00034 RTI_EXCEPT(ArrayIndexOutOfBounds)
    00035 RTI_EXCEPT(AsynchronousDeliveryAlreadyDisabled)
    00036 RTI_EXCEPT(AsynchronousDeliveryAlreadyEnabled)
    00037 RTI_EXCEPT(AttributeAcquisitionWasNotRequested)
    00038 RTI_EXCEPT(AttributeAcquisitionWasNotCanceled)
    00039 RTI_EXCEPT(AttributeAlreadyBeingAcquired)
    00040 RTI_EXCEPT(AttributeAlreadyBeingDivested)
    00041 RTI_EXCEPT(AttributeAlreadyOwned)
    00042 RTI_EXCEPT(AttributeDivestitureWasNotRequested)
    00043 RTI_EXCEPT(AttributeNotDefined)
    00044 RTI_EXCEPT(AttributeNotKnown)
    00045 RTI_EXCEPT(AttributeNotOwned)
    00046 RTI_EXCEPT(AttributeNotPublished)
    00047 RTI_EXCEPT(ConcurrentAccessAttempted)
    00048 RTI_EXCEPT(CouldNotDiscover)
    00049 RTI_EXCEPT(CouldNotOpenFED)
    00050 RTI_EXCEPT(CouldNotRestore)
    00051 RTI_EXCEPT(DeletePrivilegeNotHeld)
    00052 RTI_EXCEPT(DimensionNotDefined)
    00053 RTI_EXCEPT(EnableTimeConstrainedPending)
    00054 RTI_EXCEPT(EnableTimeConstrainedWasNotPending)
    00055 RTI_EXCEPT(EnableTimeRegulationPending)
    00056 RTI_EXCEPT(EnableTimeRegulationWasNotPending)
    00057 RTI_EXCEPT(ErrorReadingFED)
    00058 RTI_EXCEPT(EventNotKnown)
    00059 RTI_EXCEPT(FederateAlreadyExecutionMember)
    00060 RTI_EXCEPT(FederateInternalError)
    00061 RTI_EXCEPT(FederateLoggingServiceCalls)
    00062 RTI_EXCEPT(FederateNotExecutionMember)
    00063 RTI_EXCEPT(FederateOwnsAttributes)
    00064 RTI_EXCEPT(FederateWasNotAskedToReleaseAttribute)
    00065 RTI_EXCEPT(FederatesCurrentlyJoined)
    00066 RTI_EXCEPT(FederationExecutionAlreadyExists)
    00067 RTI_EXCEPT(FederationExecutionDoesNotExist)
    00068 RTI_EXCEPT(FederationTimeAlreadyPassed)
    00069 RTI_EXCEPT(HandleValuePairMaximumExceeded)
    00070 RTI_EXCEPT(InteractionClassNotDefined)
    00071 RTI_EXCEPT(InteractionClassNotKnown)
    00072 RTI_EXCEPT(InteractionClassNotPublished)
    00073 RTI_EXCEPT(InteractionClassNotSubscribed)
    00074 RTI_EXCEPT(InteractionParameterNotDefined)
    00075 RTI_EXCEPT(InteractionParameterNotKnown)
    00076 RTI_EXCEPT(InvalidExtents)
    00077 RTI_EXCEPT(InvalidFederationTime)
    00078 RTI_EXCEPT(InvalidHandleValuePairSetContext)
    00079 RTI_EXCEPT(InvalidLookahead)
    00080 RTI_EXCEPT(InvalidOrderingHandle)
    00081 RTI_EXCEPT(InvalidRegionContext)
    00082 RTI_EXCEPT(InvalidResignAction)
    00083 RTI_EXCEPT(InvalidRetractionHandle)
    00084 RTI_EXCEPT(InvalidTransportationHandle)
    00085 RTI_EXCEPT(MemoryExhausted)
    00086 RTI_EXCEPT(NameNotFound)
    00087 RTI_EXCEPT(ObjectClassNotDefined)
    00088 RTI_EXCEPT(ObjectClassNotKnown)
    00089 RTI_EXCEPT(ObjectClassNotPublished)
    00090 RTI_EXCEPT(ObjectClassNotSubscribed)
    00091 RTI_EXCEPT(ObjectNotKnown)
    00092 RTI_EXCEPT(ObjectAlreadyRegistered)
    00093 RTI_EXCEPT(OwnershipAcquisitionPending)
    00094 RTI_EXCEPT(RegionInUse)
    00095 RTI_EXCEPT(RegionNotKnown)
    00096 RTI_EXCEPT(RestoreInProgress)
    00097 RTI_EXCEPT(RestoreNotRequested)
    00098 RTI_EXCEPT(RTIinternalError)
    00099 RTI_EXCEPT(SpaceNotDefined)
    00100 RTI_EXCEPT(SaveInProgress)
    00101 RTI_EXCEPT(SaveNotInitiated)
    00102 RTI_EXCEPT(SpecifiedSaveLabelDoesNotExist)
    00103 RTI_EXCEPT(SynchronizationPointLabelWasNotAnnounced)
    00104 RTI_EXCEPT(TimeAdvanceAlreadyInProgress)
    00105 RTI_EXCEPT(TimeAdvanceWasNotInProgress)
    00106 RTI_EXCEPT(TimeConstrainedAlreadyEnabled)
    00107 RTI_EXCEPT(TimeConstrainedWasNotEnabled)
    00108 RTI_EXCEPT(TimeRegulationAlreadyEnabled)
    00109 RTI_EXCEPT(TimeRegulationWasNotEnabled)
    00110 RTI_EXCEPT(UnableToPerformSave)
    00111 RTI_EXCEPT(ValueCountExceeded)
    00112 RTI_EXCEPT(ValueLengthExceeded)
    00113
    00114 enum ResignAction {
    00115     RELEASE_ATTRIBUTES = 1,
    00116     DELETE_OBJECTS,
    00117     DELETE_OBJECTS_AND_RELEASE_ATTRIBUTES,
    00118     NO_ACTION
    00119 };
    00120
    00121 class Region ;
    00122 class FederateAmbassador ;
    00123
    00124 typedef FederateAmbassador *FederateAmbassadorPtr ;
    00125 typedef Long SpaceHandle ;
    00126 typedef ULong ObjectClassHandle ;
    00127 typedef ULong InteractionClassHandle ;
    00128 typedef ULong ExtentIndex ;
    00129 typedef ULong Handle ;
    00130 typedef Handle AttributeHandle ;
    00131 typedef Handle ParameterHandle ;
    00132 typedef Handle ObjectHandle ;
    00133 typedef Handle DimensionHandle ;
    00134 typedef ULong FederateHandle ;
    00135 typedef Handle TransportationHandle ;
    00136 typedef TransportationHandle TransportType ;
    00137 typedef Handle OrderingHandle ;
    00138 typedef OrderingHandle OrderType ;
    00139 typedef ULong FederateID ;
    00140 typedef ULong UniqueID ;
    00141 typedef Double TickTime ;
    00142 typedef ULong RegionToken ;
    00143
    00144 class RTI_EXPORT AttributeHandleValuePairSet
    00145 {
    00146 public:
    00147     virtual ~AttributeHandleValuePairSet() {}
    00148
    00149     virtual ULong size() const = 0 ;
    00150
    00151     virtual Handle getHandle(ULong) const
    00152     throw (ArrayIndexOutOfBounds) = 0  ;
    00153
    00154     virtual ULong getValueLength(ULong) const
    00155     throw (ArrayIndexOutOfBounds) = 0 ;
    00156
    00157     virtual void getValue(ULong, char *, ULong &) const
    00158     throw (ArrayIndexOutOfBounds) = 0 ;
    00159
    00160     virtual char *getValuePointer(ULong, ULong &) const
    00161     throw (ArrayIndexOutOfBounds) = 0 ;
    00162
    00163     virtual TransportType getTransportType(ULong) const
    00164     throw (InvalidHandleValuePairSetContext) = 0 ;
    00165
    00166     virtual OrderType getOrderType(ULong) const
    00167     throw (ArrayIndexOutOfBounds, InvalidHandleValuePairSetContext) = 0 ;
    00168
    00169     virtual Region *getRegion(ULong) const
    00170     throw (ArrayIndexOutOfBounds, InvalidHandleValuePairSetContext) = 0 ;
    00171
    00172     virtual void add(Handle, const char *, ULong)
    00173     throw (ValueLengthExceeded, ValueCountExceeded) = 0 ;
    00174
    00175     virtual void remove(Handle h)
    00176     throw (ArrayIndexOutOfBounds) = 0 ;
    00177
    00178     virtual void moveFrom(const AttributeHandleValuePairSet &, ULong &)
    00179     throw (ValueCountExceeded, ArrayIndexOutOfBounds) = 0 ;
    00180
    00181     virtual void empty() = 0 ;
    00182
    00183     virtual ULong start() const = 0 ;
    00184     virtual ULong valid(ULong i) const = 0 ;
    00185     virtual ULong next(ULong i) const = 0 ;
    00186 };
    00187
    00188 class RTI_EXPORT AttributeSetFactory
    00189 {
    00190 public:
    00191     static AttributeHandleValuePairSet* create(ULong)
    00192     throw (MemoryExhausted, ValueCountExceeded, HandleValuePairMaximumExceeded);
    00193 };
    00194
    00195 class RTI_EXPORT AttributeHandleSet
    00196 {
    00197 public:
    00198     virtual ~AttributeHandleSet() { }
    00199
    00200     virtual ULong size() const = 0 ;
    00201
    00202     virtual AttributeHandle getHandle(ULong) const
    00203     throw (ArrayIndexOutOfBounds) = 0 ;
    00204
    00205     virtual void add(AttributeHandle)
    00206     throw (ArrayIndexOutOfBounds, AttributeNotDefined) = 0 ;
    00207
    00208     virtual void remove(AttributeHandle)
    00209     throw (AttributeNotDefined) = 0 ;
    00210
    00211     virtual void empty() = 0 ;
    00212
    00213     virtual Boolean isEmpty() const = 0 ;
    00214     virtual Boolean isMember(AttributeHandle h) const = 0 ;
    00215 };
    00216
    00217 class RTI_EXPORT AttributeHandleSetFactory
    00218 {
    00219 public:
    00220     static AttributeHandleSet *create(ULong)
    00221     throw(MemoryExhausted, ValueCountExceeded);
    00222 };
    00223
    00224 class RTI_EXPORT FederateHandleSet
    00225 {
    00226 public:
    00227     virtual ~FederateHandleSet() { }
    00228
    00229     virtual ULong size() const = 0 ;
    00230
    00231     virtual FederateHandle getHandle(ULong) const
    00232     throw (ArrayIndexOutOfBounds) = 0 ;
    00233
    00234     virtual void add(FederateHandle)
    00235     throw (ValueCountExceeded) = 0 ;
    00236
    00237     virtual void remove(FederateHandle)
    00238     throw (ArrayIndexOutOfBounds) = 0 ;
    00239
    00240     virtual void empty() = 0 ;
    00241
    00242     virtual Boolean isMember(FederateHandle) const = 0 ;
    00243 };
    00244
    00245 class RTI_EXPORT FederateHandleSetFactory
    00246 {
    00247 public:
    00248     static FederateHandleSet *create(ULong)
    00249     throw (MemoryExhausted, ValueCountExceeded);
    00250 };
    00251
    00252 class RTI_EXPORT ParameterHandleValuePairSet
    00253 {
    00254 public:
    00255     virtual ~ParameterHandleValuePairSet() { }
    00256
    00257     virtual ULong size() const = 0 ;
    00258
    00259     virtual Handle getHandle(ULong) const
    00260     throw (ArrayIndexOutOfBounds) = 0 ;
    00261
    00262     virtual ULong getValueLength(ULong) const
    00263     throw (ArrayIndexOutOfBounds) = 0 ;
    00264
    00265     virtual void getValue(ULong, char *, ULong &) const
    00266     throw (ArrayIndexOutOfBounds) = 0 ;
    00267
    00268     virtual char *getValuePointer(ULong, ULong &) const
    00269     throw (ArrayIndexOutOfBounds) = 0 ;
    00270
    00271     virtual TransportType getTransportType() const
    00272     throw (InvalidHandleValuePairSetContext) = 0 ;
    00273
    00274     virtual OrderType getOrderType() const
    00275     throw (InvalidHandleValuePairSetContext) = 0 ;
    00276
    00277     virtual Region *getRegion() const
    00278     throw (InvalidHandleValuePairSetContext) = 0 ;
    00279
    00280     virtual void add(Handle, const char *, ULong)
    00281     throw (ValueLengthExceeded, ValueCountExceeded) = 0 ;
    00282
    00283     virtual void remove(Handle)
    00284     throw (ArrayIndexOutOfBounds) = 0 ;
    00285
    00286     virtual void moveFrom(const ParameterHandleValuePairSet &, ULong &)
    00287     throw (ValueCountExceeded, ArrayIndexOutOfBounds) = 0 ;
    00288
    00289     virtual void empty() = 0 ;
    00290
    00291     virtual ULong start() const = 0 ;
    00292     virtual ULong valid(ULong i) const = 0 ;
    00293     virtual ULong next(ULong i) const = 0 ;
    00294 };
    00295
    00296 class RTI_EXPORT ParameterSetFactory
    00297 {
    00298 public:
    00299     static ParameterHandleValuePairSet *create(ULong)
    00300     throw (MemoryExhausted, ValueCountExceeded, HandleValuePairMaximumExceeded);
    00301 };
    00302
    00303 class RTI_EXPORT Region
    00304 {
    00305 public:
    00306     virtual ~Region() { }
    00307
    00308     virtual ULong getRangeLowerBound(ExtentIndex, DimensionHandle) const
    00309     throw (ArrayIndexOutOfBounds) = 0 ;
    00310
    00311     virtual ULong getRangeUpperBound(ExtentIndex, DimensionHandle) const
    00312     throw (ArrayIndexOutOfBounds) = 0 ;
    00313
    00314     virtual void setRangeLowerBound(ExtentIndex, DimensionHandle, ULong)
    00315     throw (ArrayIndexOutOfBounds) = 0 ;
    00316
    00317     virtual void setRangeUpperBound(ExtentIndex, DimensionHandle, ULong)
    00318     throw (ArrayIndexOutOfBounds) = 0 ;
    00319
    00320     virtual SpaceHandle getSpaceHandle() const
    00321     throw () = 0 ;
    00322
    00323     virtual ULong getNumberOfExtents() const
    00324     throw () = 0 ;
    00325
    00326     virtual ULong getRangeLowerBoundNotificationLimit(ExtentIndex, DimensionHandle) const
    00327     throw (ArrayIndexOutOfBounds) = 0 ;
    00328
    00329     virtual ULong getRangeUpperBoundNotificationLimit(ExtentIndex, DimensionHandle) const
    00330     throw (ArrayIndexOutOfBounds) = 0 ;
    00331 } ;
    00332
    00333 class FEDTIME_EXPORT FedTime
    00334 {
    00335 public:
    00336     virtual ~FedTime(){};
    00337
    00338     virtual void setZero() = 0 ;
    00339     virtual Boolean isZero() = 0 ;
    00340     virtual void setEpsilon() = 0 ;
    00341     virtual void setPositiveInfinity() = 0 ;
    00342     virtual Boolean isPositiveInfinity() = 0 ;
    00343
    00344     virtual FedTime &operator+=(const FedTime &)
    00345     throw (InvalidFederationTime) = 0 ;
    00346
    00347     virtual FedTime &operator-=(const FedTime &)
    00348     throw (InvalidFederationTime) = 0 ;
    00349
    00350     virtual Boolean operator<=(const FedTime &) const
    00351     throw (InvalidFederationTime) = 0 ;
    00352
    00353     virtual Boolean operator<(const FedTime &) const
    00354     throw (InvalidFederationTime) = 0 ;
    00355
    00356     virtual Boolean operator>=(const FedTime &) const
    00357     throw (InvalidFederationTime) = 0 ;
    00358
    00359     virtual Boolean operator>(const FedTime &) const
    00360     throw (InvalidFederationTime) = 0 ;
    00361
    00362     virtual Boolean operator==(const FedTime &) const
    00363     throw (InvalidFederationTime) = 0 ;
    00364
    00365     virtual FedTime &operator=(const FedTime &)
    00366     throw (InvalidFederationTime) = 0 ;
    00367
    00368     virtual int encodedLength() const = 0 ;
    00369     virtual void encode(char *) const = 0 ;
    00370     virtual int getPrintableLength() const = 0 ;
    00371     virtual void getPrintableString(char *) = 0 ;
    00372 };
    00373
    00374 class FEDTIME_EXPORT FedTimeFactory
    00375 {
    00376 public:
    00377     static RTI::FedTime *makeZero()
    00378     throw (RTI::MemoryExhausted);
    00379
    00380     static RTI::FedTime* decode(const char *buf)
    00381     throw (RTI::MemoryExhausted);
    00382 };
    00383
    00384 struct EventRetractionHandle_s {
    00385     UniqueID theSerialNumber ;
    00386     FederateHandle sendingFederate ;
    00387 };
    00388
    00389 typedef struct EventRetractionHandle_s EventRetractionHandle ;
    00390
    00391 #endif // RTITYPES_HH_INCLUDED
    00392
    00393 // $Id: RTItypes.hh,v 3.20 2009/04/02 19:58:10 erk Exp $