![]() |
MAK RTIspy API Documentation for HLA Evolved
|
00001 /********************************************************************* 00002 ** Copyright (c) 2006 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: wwwClientProtocol.h,v $ $Revision: 1.7 $ $State: Exp $ 00007 *******************************************************************************/ 00010 00011 #ifndef DtWwwClientProtocol_H_ 00012 #define DtWwwClientProtocol_H_ 00013 00014 #include <rtiMsConfig.h> 00015 #include "wwwSpyServer.h" 00016 #include "webSpyUtils.h" 00017 #include "wwwRequestXmlBlock.h" 00018 #include <wwwControlMsg.h> 00019 #include <wwwControlRspMsg.h> 00020 #include <wwwFederateStateRspMsg.h> 00021 #include <wwwStateRspMsg.h> 00022 #include <vlutil/vlString.h> 00023 #include <memory> 00024 00044 class DT_DLL_WWW DtWwwClientProtocol 00045 { 00046 private: 00047 00049 DtWwwClientProtocol( const DtWwwClientProtocol& ); 00051 DtWwwClientProtocol& operator=( DtWwwClientProtocol& ); 00052 00053 public: 00054 00056 typedef DtWwwClientProtocol* (*CreatorType)( const DtRIDParameters& params ); 00057 00059 static DtWwwClientProtocol* create( const DtRIDParameters& params ); 00060 00062 static void setCreatorFunction( CreatorType creator ); 00063 00064 public: 00065 00067 virtual ~DtWwwClientProtocol(); 00068 00072 virtual std::auto_ptr< DtRtiMsg > parseCommand( std::auto_ptr<DtString> command ) const; 00073 00074 00076 virtual void parseResponse( DtWebSpyServer& parent, 00077 const DtWebSpyUtils::ConnectionIdentifier& connInfo, std::auto_ptr<DtRtiMsg> response ); 00078 00079 protected: 00080 00081 typedef std::pair< unsigned long, unsigned long > FragmentId; 00082 typedef std::map< FragmentId, DtString* > MsgFragmentsByIdMap; 00083 00085 DtWwwClientProtocol( const DtRIDParameters& params ); 00086 00088 00089 virtual void parseControlMsg( DtWebSpyServer& parent, 00090 const DtWebSpyUtils::ConnectionIdentifier& connInfo, const DtWwwControlRspMsg* cntlMsg ) const; 00091 virtual void parseFederateStateMsg( DtWebSpyServer& parent, 00092 const DtWebSpyUtils::ConnectionIdentifier& connInfo, const DtWwwFederateStateRspMsg* fedStateMsg ); 00093 virtual void parseComponentStateMsg( DtWebSpyServer& parent, 00094 const DtWebSpyUtils::ConnectionIdentifier& connInfo, const DtWwwStateRspMsg* stateMsg ); 00095 00096 00098 00099 virtual void handleLrcLogResponse( DtWebSpyServer& parent, const DtWebSpyUtils::ConnectionIdentifier& connInfo, 00100 unsigned long componentId, DtWwwRequestXmlBlockSP response ) const; 00101 00102 protected: 00103 00104 const DtRIDParameters& myParams; 00105 00106 MsgFragmentsByIdMap myPendingUpdates; 00107 00108 00109 static CreatorType theCreator; 00110 }; 00111 00112 00113 #endif //! DtWwwClientProtocol_H_ 00114 00115 00116