// -*- mode: c++ -*- // // Name: DisIO.h // Author: K.Olchanski // Date: 13 Dec 1998 // Description: BRAHMS Dispatcher I/O library // // $Id: DisIO.h,v 1.1.1.1 2001/06/21 14:55:10 hagel Exp $ // #ifndef DisIOH #define DisIOH #include #include "BrRawEvent.h" #include "SetError.h" class DisIO : public SetError { public: // public definitions enum Status { kOk = 0, kCommand = 1, kData = 2, kNoRoom = 3, kNotConnected = 4, kDataError = 5, kNoData = 6 }; public: // public methods // // constructor and destructor // DisIO(); // ctor; ~DisIO(); // dtor // // Connection management. // int connect(const char* destination); int disconnect(); // // High-level I/O methods // int sendCommand(const char* command); int readEvent(BrRawEvent& event,bool waitForever=true); int readCommand(bool waitForever=true); const char* getCommandString(); // // low-level I/O methods // int readReply(BrRawEvent::Segment **seg, bool waitForever=true); private: // private methods and data // hide the copy-constructor DisIO(DisIO&) { abort(); }; // hide the assignement operator DisIO& operator=(DisIO&) { abort(); }; void* fSocket; char* fCommandString; }; #endif // end file // // $Log: DisIO.h,v $ // Revision 1.1.1.1 2001/06/21 14:55:10 hagel // Initial revision of brat2 // // Revision 1.6 2000/11/23 01:35:13 brahmlib // Fixed code so that is compiles on Digital Unix // //