1 #ifndef ALI_DCS_CLIENT_H
2 #define ALI_DCS_CLIENT_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 // This class represents the AliDCSClient.
11 // The client used for data retrieval from DCS server.
14 #include "AliDCSMessage.h"
22 class AliDCSClient: public TObject {
25 static const Int_t fgkBadState = -1;
27 static const Int_t fgkInvalidParameter = -2;
29 static const Int_t fgkTimeout = -3;
31 static const Int_t fgkBadMessage = -4;
33 static const Int_t fgkCommError = -5;
35 static const Int_t fgkServerError = -6;
37 static const char* fgkBadStateString;
39 static const char* fgkInvalidParameterString;
41 static const char* fgkTimeoutString;
43 static const char* fgkBadMessageString;
45 static const char* fgkCommErrorString;
47 static const char* fgkServerErrorString;
50 AliDCSClient(const char* host, Int_t port, UInt_t timeout = 5000,
52 virtual ~AliDCSClient();
55 Int_t GetDPValues(const char* dpName, UInt_t startTime, UInt_t endTime,
58 Int_t GetAliasValues(const char* alias, UInt_t startTime,
59 UInt_t endTime, TObjArray& result);
61 Int_t GetDPValues(UInt_t startTime, UInt_t endTime, TMap& result);
63 Int_t GetAliasValues(UInt_t startTime, UInt_t endTime, TMap& result);
66 AliDCSMessage::ErrorCode GetServerErrorCode()
67 { return fServerErrorCode;};
69 const TString& GetServerError() {return fServerError;};
77 static const char* GetErrorString(Int_t code);
87 AliDCSMessage::ErrorCode fServerErrorCode;
92 Int_t SendBuffer(const char* buffer, Int_t size);
94 Int_t ReceiveBuffer(char* buffer, Int_t size);
96 Int_t SendMessage(AliDCSMessage& message);
98 Int_t ReceiveMessage(AliDCSMessage& message);
100 Int_t GetValues(AliDCSMessage::RequestType requestType,
101 const char* requestString, UInt_t startTime, UInt_t endTime,
104 Int_t GetValues(AliDCSMessage::RequestType requestType,
105 UInt_t startTime, UInt_t endTime, TMap& result);
107 Int_t ReceiveValueSet(TObjArray& result);
110 ClassDef(AliDCSClient, 0);