00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _CERTI_RTIA_OM
00025 #define _CERTI_RTIA_OM
00026
00027 #include "RootObject.hh"
00028
00029 #define IDRESERVED 4294000000
00030 #define NOTLINKED -1
00031
00032 namespace certi {
00033 namespace rtia {
00034
00035 class Communications ;
00036 class Queues ;
00037 class FederationManagement ;
00038 class TimeManagement ;
00039
00040 class ObjectManagement
00041 {
00042
00043 public:
00044 ObjectManagement(Communications *, FederationManagement *, RootObject *);
00045 ~ObjectManagement();
00046
00047
00048 ObjectHandle registerObject(ObjectClassHandle theClassHandle,
00049 const char *theObjectName,
00050 FederationTime date,
00051 FederationTime heure,
00052 TypeException &e);
00053
00054 EventRetractionHandle
00055 updateAttributeValues(ObjectHandle theObjectHandle,
00056 std::vector<AttributeHandle> &attribArray,
00057 std::vector<AttributeValue_t> &valueArray,
00058 UShort attribArraySize,
00059 FederationTime theTime,
00060 std::string theTag,
00061 TypeException &e);
00062
00063 void updateAttributeValues(ObjectHandle theObjectHandle,
00064 std::vector<AttributeHandle> &attribArray,
00065 std::vector<AttributeValue_t> &valueArray,
00066 UShort attribArraySize,
00067 std::string theTag,
00068 TypeException &e);
00069
00070 void discoverObject(ObjectHandle theObjectHandle,
00071 ObjectClassHandle theObjectClassHandle,
00072 const char *theObjectName,
00073 FederationTime theTime,
00074 EventRetractionHandle theHandle,
00075 TypeException &e);
00076
00077 void reflectAttributeValues(ObjectHandle theObjectHandle,
00078 std::vector <AttributeHandle> &attribArray,
00079 std::vector <AttributeValue_t> &valueArray,
00080 UShort attribArraySize,
00081 FederationTime theTime,
00082 const char *theTag,
00083 EventRetractionHandle theHandle,
00084 TypeException &e);
00085
00086 void reflectAttributeValues(ObjectHandle theObjectHandle,
00087 std::vector <AttributeHandle> &attribArray,
00088 std::vector <AttributeValue_t> &valueArray,
00089 UShort attribArraySize,
00090 const char *theTag,
00091 TypeException &e);
00092
00093 EventRetractionHandle
00094 sendInteraction(InteractionClassHandle theInteraction,
00095 std::vector <ParameterHandle> ¶mArray,
00096 std::vector <ParameterValue_t> &valueArray,
00097 UShort paramArraySize,
00098 FederationTime theTime,
00099 std::string theTag,
00100 RegionHandle,
00101 TypeException &e);
00102
00103 void
00104 sendInteraction(InteractionClassHandle theInteraction,
00105 std::vector <ParameterHandle> ¶mArray,
00106 std::vector <ParameterValue_t> &valueArray,
00107 UShort paramArraySize,
00108 std::string theTag,
00109 RegionHandle,
00110 TypeException &e);
00111
00112 void receiveInteraction(InteractionClassHandle theInteraction,
00113 std::vector <ParameterHandle> ¶mArray,
00114 std::vector <ParameterValue_t> &valueArray,
00115 UShort paramArraySize,
00116 FederationTime theTime,
00117 const char *theTag,
00118 EventRetractionHandle theHandle,
00119 TypeException &e);
00120
00121 void receiveInteraction(InteractionClassHandle theInteraction,
00122 std::vector <ParameterHandle> ¶mArray,
00123 std::vector <ParameterValue_t> &valueArray,
00124 UShort paramArraySize,
00125 const char *theTag,
00126 TypeException &e);
00127
00128 EventRetractionHandle deleteObject(ObjectHandle theObjectHandle,
00129 FederationTime theTime,
00130 std::string theTag,
00131 TypeException &e);
00132
00133 void deleteObject(ObjectHandle theObjectHandle,
00134 std::string theTag,
00135 TypeException &e);
00136
00137 void removeObject(ObjectHandle theObjectHandle,
00138 FederateHandle theFederateHandle,
00139 FederationTime theTime,
00140 const char *theTag,
00141 EventRetractionHandle theHandle,
00142 TypeException &e);
00143
00144 void removeObject(ObjectHandle theObjectHandle,
00145 FederateHandle theFederateHandle,
00146 const char *theTag,
00147 TypeException &e);
00148
00149 void removeObject(ObjectHandle theObject,
00150 ObjectRemovalReason theReason,
00151 TypeException &e);
00152
00153 EventRetractionHandle
00154 changeAttributeTransportType(ObjectHandle theObjectHandle,
00155 std::vector <AttributeHandle> &attribArray,
00156 UShort attribArraySize,
00157 TransportType theType,
00158 TypeException &e);
00159
00160 EventRetractionHandle
00161 changeAttributeOrderType(ObjectHandle theObjectHandle,
00162 std::vector <AttributeHandle> &attribArray,
00163 UShort attribArraySize,
00164 OrderType theType,
00165 TypeException &e);
00166
00167 EventRetractionHandle
00168 changeInteractionTransportType(InteractionClassHandle theClassID,
00169 TransportType theType,
00170 TypeException &e);
00171
00172 EventRetractionHandle
00173 changeInteractionOrderType(InteractionClassHandle theClassID,
00174 OrderType theType,
00175 TypeException &e);
00176
00177 void
00178 requestObjectAttributeValueUpdate(ObjectHandle theObjectHandle,
00179 std::vector <AttributeHandle> &attribArray,
00180 UShort attribArraySize,
00181 TypeException &e);
00182
00183 void provideAttributeValueUpdate(ObjectHandle theObject,
00184 std::vector <AttributeHandle> &theAttributes,
00185 UShort attribArraySize,
00186 TypeException &e);
00187
00188 void retract(EventRetractionHandle theHandle, TypeException &e);
00189
00190 void reflectRetraction(EventRetractionHandle theHandle,
00191 TypeException &e);
00192
00203 void setAttributeScopeAdvisorySwitch(bool state,
00204 TypeException &e);
00205
00206
00207 void
00208 attributesInScope(ObjectHandle theObject,
00209 const std::vector <AttributeHandle> &attribArray,
00210 const UShort attribArraySize,
00211 TypeException &e);
00212
00213
00214 void
00215 attributesOutOfScope(ObjectHandle theObject,
00216 const std::vector <AttributeHandle> &attribArray,
00217 const UShort attribArraySize,
00218 TypeException &e);
00219
00230 void setAttributeRelevanceAdvisorySwitch(bool state,
00231 TypeException &e);
00232
00233
00234 void
00235 turnUpdatesOnForObjectInstance(ObjectHandle theObject,
00236 const std::vector <AttributeHandle> &attribArray,
00237 const UShort attribArraySize,
00238 TypeException &e);
00239
00240
00241 void
00242 turnUpdatesOffForObjectInstance(ObjectHandle theObject,
00243 const std::vector <AttributeHandle> &attribArray,
00244 const UShort attribArraySize,
00245 TypeException &e);
00246
00247
00248 ObjectClassHandle getObjectClassHandle(const char *theName);
00249 std::string getObjectClassName(ObjectClassHandle);
00250
00251 ObjectHandle getObjectInstanceHandle(const char *);
00252 const char *getObjectInstanceName(ObjectHandle);
00253
00254 AttributeHandle getAttributeHandle(const char *theName,
00255 ObjectClassHandle theClassHandle);
00256
00257 const char *getAttributeName(AttributeHandle theHandle,
00258 ObjectClassHandle theClassHandle);
00259
00260 InteractionClassHandle getInteractionClassHandle(const char *theName);
00261
00262 const std::string getInteractionClassName(InteractionClassHandle theClassHandle);
00263
00264 ParameterHandle getParameterHandle(const char *theParameterName,
00265 InteractionClassHandle theClassHandle);
00266
00267 const std::string& getParameterName(ParameterHandle theParameterHandle,
00268 InteractionClassHandle theClassHandle);
00269
00270 ObjectClassHandle getObjectClass(ObjectHandle);
00271
00272 TransportType getTransportationHandle(const char *theName);
00273 const char *getTransportationName(TransportType theType);
00274
00275 OrderType getOrderingHandle(const char *theName);
00276 const char *getOrderingName(OrderType theType);
00277
00278 TimeManagement *tm ;
00279
00280 protected:
00281 Communications *comm ;
00282 Queues *queues ;
00283 FederationManagement *fm ;
00284 RootObject *rootObject ;
00285
00286 private:
00287 struct TransportTypeList {
00288 const char *name;
00289 TransportType type;
00290 };
00291 static const TransportTypeList transportTypeList[];
00292
00293 struct OrderTypeList {
00294 const char *name;
00295 OrderType type;
00296 };
00297 static const OrderTypeList orderTypeList[];
00298 };
00299
00300 }}
00301
00302 #endif // _CERTI_RTIA_OM
00303
00304