00001
00002
00003
00004
00005
00009
00010 #ifndef lgrHlaCommandFactory_H_
00011 #define lgrHlaCommandFactory_H_
00012
00013 #include "lgrSim.h"
00014 #include "lgrCommand.h"
00015 #include "collectors.h"
00016 #include "lgrSimCommandFactory.h"
00017
00018 #include <utility>
00019 #include <vlutil/vlString.h>
00020
00021 namespace MAKLogger
00022 {
00023
00024 class DtBaseFomDesc;
00025 class DtCommandDefinition;
00026
00029 class DT_DLL_LGRSIM DtLgrHlaCommandFactory : public DtLgrSimCommandFactory
00030 {
00031
00032 public:
00034 static const DtLgrCommandType theCommandType;
00035
00036 #if DtHLA_1516_EVOLVED
00037 DT_FACTORY_COMMAND_EXT(DtLgrSimCommandFactory::Last_Command + 1,
00038 SetConnectionParameters,
00039 (const DtString& federateName,
00040 const DtString& federateType,
00041 const DtString& federationName,
00042 const DtString& fedFile,
00043 const std::vector<DtString>& fomModules,
00044 const DtString& mim,
00045 bool ignoreAdvisories, double fomVersion, int fomRevision,
00046 const DtString& fomMapper, const DtString& fomMapperData, bool useEmptyFomMapper),
00047 (const DtCommand& command,
00048 DtString& federateName,
00049 DtString& federateType,
00050 DtString& federationName,
00051 DtString& fedFile,
00052 std::vector<DtString>& fomModules,
00053 DtString& mim,
00054 bool& ignoreAdvisories, double& fomVersion, int& fomRevision,
00055 DtString& fomMapper, DtString& fomMapperData, bool& useEmptyFomMapper))
00056
00057 #else // !DtHLA_1516_EVOLVED
00058 DT_FACTORY_COMMAND_EXT(DtLgrSimCommandFactory::Last_Command + 1,
00059 SetConnectionParameters,
00060 (const DtString& federateName,
00061 const DtString& federationName,
00062 const DtString& fedFile,
00063 bool ignoreAdvisories, double fomVersion, int fomRevision,
00064 const DtString& fomMapper, const DtString& fomMapperData, bool useEmptyFomMapper),
00065 (const DtCommand& command,
00066 DtString& federateName,
00067 DtString& federationName,
00068 DtString& fedFile,
00069 bool& ignoreAdvisories, double& fomVersion, int& fomRevision,
00070 DtString& fomMapper, DtString& fomMapperData, bool& useEmptyFomMapper))
00071 #endif // DtHLA_1516_EVOLVED
00072
00073 DT_FACTORY_COMMAND_EXT(DtLgrSimCommandFactory::Last_Command + 2,
00074 SetTimeManagement,
00075 (bool timeConstrainedRecording, bool timeConstrainedPlayback,
00076 bool timeRegulatingRecording, bool timeRegulatingPlayback,
00077 double lookahead),
00078 (const DtCommand& command,
00079 bool& timeConstrainedRecording, bool& timeConstrainedPlayback,
00080 bool& timeRegulatingRecording, bool& timeRegulatingPlayback,
00081 double& lookahead))
00082
00083 DT_FACTORY_COMMAND_EXT(DtLgrSimCommandFactory::Last_Command + 3,
00084 SetIgnoreAdvisories,
00085 (bool ignore),
00086 (const DtCommand& command,
00087 bool& ignore))
00088
00089 DT_FACTORY_COMMAND_EXT(DtLgrSimCommandFactory::Last_Command + 4,
00090 SetPassiveSubscription,
00091 (bool passive),
00092 (const DtCommand& command,
00093 bool& passive))
00094
00095 DT_FACTORY_COMMAND_EXT(DtLgrSimCommandFactory::Last_Command + 5,
00096 LoadSubscriptionListFile,
00097 (const DtString& filename),
00098 (const DtCommand& command,
00099 DtString& filename))
00100
00101 DT_FACTORY_COMMAND_EXT(DtLgrSimCommandFactory::Last_Command + 6,
00102 SaveSubscriptionListFile,
00103 (const DtString& filename),
00104 (const DtCommand& command,
00105 DtString& filename))
00106
00107 DT_FACTORY_COMMAND_EXT(DtLgrSimCommandFactory::Last_Command + 7,
00108 SetSubscriptionLists,
00109 (const std::vector<DtString>& objectClasses, const std::vector<DtString>& interactionClasses),
00110 (const DtCommand& command,
00111 std::vector<DtString>& objectClasses, std::vector<DtString>& interactionClasses))
00112
00113 DT_FACTORY_COMMAND_EXT(DtLgrSimCommandFactory::Last_Command + 8,
00114 SetDisableTimeManagementTest,
00115 (bool disableTesting),
00116 (const DtCommand& command,
00117 bool& disableTesting))
00118
00119 DT_FACTORY_COMMAND_EXT(DtLgrSimCommandFactory::Last_Command + 9,
00120 SetDynamicNamePrefix,
00121 (const DtString& prefix),
00122 (const DtCommand& command,
00123 DtString& prefix))
00124
00125 DT_FACTORY_COMMAND_EXT(DtLgrSimCommandFactory::Last_Command + 10,
00126 LoadPublicationListFile,
00127 (const DtString& filename),
00128 (const DtCommand& command,
00129 DtString& filename))
00130
00131 DT_FACTORY_COMMAND_EXT(DtLgrSimCommandFactory::Last_Command + 11,
00132 SetDrainInput,
00133 (double maxTime, double minTime),
00134 (const DtCommand& command,
00135 double& maxTime, double& minTime))
00136
00137 DT_FACTORY_COMMAND_EXT(DtLgrSimCommandFactory::Last_Command + 12,
00138 SetDdmParameters,
00139 (bool enableDdm, const DtString& playbackMode, const DtString& subscribeMode,
00140 bool playbackDynamicAssociation, bool playbackDynamicExtents,
00141 bool allowPlaybackWithoutRegions, bool recordConveyedRegions,
00142 bool requestUpdates, bool subscribeUnspecifiedAttributes),
00143 (const DtCommand& command,
00144 bool& enableDdm, DtString& playbackMode, DtString& subscribeMode,
00145 bool& playbackDynamicAssociation, bool& playbackDynamicExtents,
00146 bool& allowPlaybackWithoutRegions, bool& recordConveyedRegions,
00147 bool& requestUpdates, bool& subscribeUnspecifiedAttributes))
00148
00149
00150
00152 #if DtHLA_1516_EVOLVED
00153 DT_FACTORY_RESPONSE_EXT(DtLgrSimCommandFactory::Last_Response - 1,
00154 ConnectionParametersChanged,
00155 (const DtString& federateName,
00156 const DtString& federateType,
00157 const DtString& federationName,
00158 const DtString& fedFile,
00159 const std::vector<DtString>& fomModules,
00160 const DtString& mim,
00161 bool ignoreAdvisories, double fomVersion, int fomRevision,
00162 const DtString& fomMapper, const DtString& fomMapperData, bool useEmptyFomMapper),
00163 (DtResponse response,
00164 DtString& federateName,
00165 DtString& federateType,
00166 DtString& federationName,
00167 DtString& fedFile,
00168 std::vector<DtString>& fomModules,
00169 DtString& mim,
00170 bool& ignoreAdvisories, double& fomVersion, int& fomRevision,
00171 DtString& fomMapper, DtString& fomMapperData, bool& useEmptyFomMapper))
00172 #else // !DtHLA_1516_EVOLVED
00173 DT_FACTORY_RESPONSE_EXT(DtLgrSimCommandFactory::Last_Response - 1,
00174 ConnectionParametersChanged,
00175 (const DtString& federateName,
00176 const DtString& federationName,
00177 const DtString& fedFile,
00178 bool ignoreAdvisories, double fomVersion, int fomRevision,
00179 const DtString& fomMapper, const DtString& fomMapperData, bool useEmptyFomMapper),
00180 (DtResponse response,
00181 DtString& federateName,
00182 DtString& federationName,
00183 DtString& fedFile,
00184 bool& ignoreAdvisories, double& fomVersion, int& fomRevision,
00185 DtString& fomMapper, DtString& fomMapperData, bool& useEmptyFomMapper))
00186 #endif // DtHLA_1516_EVOLVED
00187
00188 DT_FACTORY_RESPONSE_EXT(DtLgrSimCommandFactory::Last_Response - 2,
00189 FomChanged,
00190 (const DtBaseFomDesc& fom),
00191 (DtResponse response,
00192 DtBaseFomDesc& fom))
00193
00194 DT_FACTORY_RESPONSE_EXT(DtLgrSimCommandFactory::Last_Response - 3,
00195 SubscriptionListsChanged,
00196 (const std::vector<DtString>& objectClasses, const std::vector<DtString>& interactionClasses),
00197 (DtResponse response,
00198 std::vector<DtString>& objectClasses, std::vector<DtString>& interactionClasses))
00199
00200 DT_FACTORY_RESPONSE_EXT(DtLgrSimCommandFactory::Last_Response - 4,
00201 TimeManagementSettingsChanged,
00202 (bool timeConstrainedRecording, bool timeConstrainedPlayback,
00203 bool timeRegulatingRecording, bool timeRegulatingPlayback,
00204 double lookahead),
00205 (DtResponse response,
00206 bool& timeConstrainedRecording, bool& timeConstrainedPlayback,
00207 bool& timeRegulatingRecording, bool& timeRegulatingPlayback,
00208 double& lookahead))
00209
00210 DT_FACTORY_RESPONSE_EXT(DtLgrSimCommandFactory::Last_Response - 5,
00211 TimeManagementEnabled,
00212 (bool enabled,bool constrained,bool regulating),
00213 (DtResponse response,
00214 bool& enabled, bool& constrained, bool& regulating))
00215
00216 DT_FACTORY_RESPONSE_EXT(DtLgrSimCommandFactory::Last_Response - 6,
00217 DrainInputSettingsChanged,
00218 (double maxTime, double minTime),
00219 (DtResponse response,
00220 double& maxTime, double& minTime))
00221
00222 DT_FACTORY_RESPONSE_EXT(DtLgrSimCommandFactory::Last_Response - 7,
00223 DdmParameterSettingsChanged,
00224 (bool enableDdm, const DtString& playbackMode, const DtString& subscribeMode,
00225 bool playbackDynamicAssociation, bool playbackDynamicExtents,
00226 bool allowPlaybackWithoutRegions, bool recordConveyedRegions,
00227 bool requestUpdates, bool subscribeUnspecifiedAttributes),
00228 (DtResponse response,
00229 bool& enableDdm, DtString& playbackMode, DtString& subscribeMode,
00230 bool& playbackDynamicAssociation, bool& playbackDynamicExtents,
00231 bool& allowPlaybackWithoutRegions, bool& recordConveyedRegions,
00232 bool& requestUpdates, bool& subscribeUnspecifiedAttributes))
00233
00234 DT_FACTORY_RESPONSE_EXT(DtLgrSimCommandFactory::Last_Response - 8,
00235 IgnoreAdvisoriesChanged,
00236 (bool enabled),
00237 (DtResponse response,
00238 bool& enabled))
00239
00240
00241
00242
00243 static const char* commandToString(int commandId);
00244
00246 static const char* responseToString(int responseId);
00247
00249
00250
00251 static DtResponse createConnectedResponse();
00252 static DtResponse createDisconnectedResponse();
00253 static DtResponse createLostConnectionResponse(const DtString& reason);
00254 static DtResponse createUnableToConnectResponse(const DtString& reason);
00256
00257 };
00258
00259 }
00260
00261 #endif