00001 #ifndef DDSCLIENT_H
00002 #define DDSCLIENT_H
00003
00005
00006
00007
00008
00009
00010
00011
00012
00013
00015 #include <iosfwd>
00016 #include "TInetAddress.h"
00017 #include "TMessage.h"
00018 #include "Dispatcher/DDS.h"
00019
00020 class TSocket;
00021 class MomNavigator;
00022 class DDSClient;
00023 class DDSSubscription;
00024 class DDSClientId;
00025 class DDSPSStatus;
00026
00027 std::ostream& operator << (std::ostream& ms, DDSClient* cs);
00028
00029 class DDSClient {
00030
00031 public:
00032
00033
00034
00035 DDSClient (const char* serverhost, UInt_t serverport = 0,
00036 DDS::EMessageType initmsg = DDS::kData,
00037 DDS::EClientType type = DDS::kUnknownClientType,
00038 std::string clientname = "");
00039 virtual ~DDSClient ();
00040
00041
00042 DDS::EMessageType GetStatus() const { return fStatus; }
00043 const DDSPSStatus* GetPSStatus() const { return fPSStatus; }
00044 const DDSClientId* GetClientId() const { return fClientId; }
00045 DDSSubscription* GetSubscription() const { return fSubscription; }
00046 bool IsValid () const { return (fTSocket != (TSocket*)0) ? true : false; }
00047 std::ostream& Print(std::ostream& ms) const;
00048
00049
00050 DDS::EMessageType GoToFile(std::string filename,
00051 std::string& returnedfilename);
00052 DDS::EMessageType GoToNextFile(std::string& returnedfilename);
00053 DDS::EMessageType Next(MomNavigator*& mom,UInt_t waittime=120,UInt_t advanceby=1);
00054 DDS::EMessageType Shutdown();
00055 DDS::EMessageType Subscribe();
00056
00057 private:
00058
00059
00060 DDS::EMessageType SendMessage();
00061
00062
00063 DDS::EMessageType fStatus;
00064 TSocket* fTSocket;
00065 DDSSubscription* fSubscription;
00066 TMessage* fMessageIn;
00067 TMessage fMessageOut;
00068 TInetAddress fClientAddress;
00069 TInetAddress fServerAddress;
00070 DDSClientId* fClientId;
00071 DDSPSStatus* fPSStatus;
00072
00073 ClassDef(DDSClient,0)
00074 };
00075
00076 #endif // DDSCLIENT_H
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090