DDS Namespace Reference

Enumerations

enum  EMessageType {
  kData = 10001, kGoToFile, kNext, kSubscribe,
  kShutdown, kPermissionDenied, kSaturated, kFileError,
  kTimeoutNewFile, kTimeoutNewRecord, kMessageUnknown, kOk,
  kSocketError, kSystemError, kError, kInvalidSelection,
  kStatus, kInactive
}
enum  EDataSource { kDaq, kDcs }
enum  EKeepUpMode { kAll, kFileKeepUp, kRecordKeepUp }
enum  EClientType {
  kOnlineMonitor, kDatabaseUpdater, kEventDisplay, kOther,
  kUnknownClientType
}

Functions

const char * AsString (EDataSource datasource)
const char * AsString (EKeepUpMode keepupmode)
const char * AsString (EMessageType messagetype)
const char * AsString (EClientType clienttype)
int GetKeepUpCode (const char *keepupmode)
int GetDataSourceCode (const char *datasource)
DDS::EClientType GetClientType (const char *clienttype)

Variables

const Int_t kPort = 9090

Enumeration Type Documentation

Enumerator:
kOnlineMonitor 
kDatabaseUpdater 
kEventDisplay 
kOther 
kUnknownClientType 

Definition at line 83 of file DDS.h.

00083                    {
00084     kOnlineMonitor,             // Online Monitor
00085     kDatabaseUpdater,           // DBU
00086     kEventDisplay,              // Event Display
00087     kOther,                     // Other
00088     kUnknownClientType          // Not specified by client
00089   };

Enumerator:
kDaq 
kDcs 

Definition at line 70 of file DDS.h.

00070                    {
00071     kDaq,           // Daq file 
00072     kDcs            // Dcs file
00073   };

Enumerator:
kAll 
kFileKeepUp 
kRecordKeepUp 

Definition at line 76 of file DDS.h.

00076                    {
00077     kAll,          // Request all records from all files
00078     kFileKeepUp,   // Request to keep up with most recent file
00079     kRecordKeepUp  // Request most recent record set from file
00080   };

Enumerator:
kData 
kGoToFile 
kNext 
kSubscribe 
kShutdown 
kPermissionDenied 
kSaturated 
kFileError 
kTimeoutNewFile 
kTimeoutNewRecord 
kMessageUnknown 
kOk 
kSocketError 
kSystemError 
kError 
kInvalidSelection 
kStatus 
kInactive 

Definition at line 28 of file DDS.h.

00028                     {
00029 
00030     // DDS parent server service request messages 
00031     kData = 10001,            // Request for online data
00032   
00033     // DDS child server service request messages
00034     kGoToFile,                // Advance to specified file
00035     kNext,                    // Request for next event
00036     kSubscribe,               // Notify server of new subscription
00037 
00038     // DDS parent or child server service request messages
00039     kShutdown,                // Request to shutdown (parent or child) server
00040 
00041     // DDS parent server service return status messages 
00042     kPermissionDenied,        // Unauthorized client access denied
00043     kSaturated,               // Maximum number of concurrent clients reached
00044 
00045     // DDS child server service return status messages
00046     kFileError,         // Error in opening/reading online file
00047     kTimeoutNewFile,    // Timeout reached while waiting for new file
00048     kTimeoutNewRecord,  // Timeout reached while waiting for new record
00049                         // from current file
00050 
00051     // DDS parent or child server service return status messages
00052     kMessageUnknown,  // Unrecognized message from client
00053     kOk,              // Service provided successfully
00054     kSocketError,     // Error in socket performance
00055     kSystemError,     // Error in system call
00056     kError,            // Generic error return
00057 
00058     // DDS child server service return status message
00059     kInvalidSelection,  // Invalid subscription selection string expression
00060 
00061     // DDS parent server status request message
00062     kStatus,            // Request for status
00063 
00064     // DDS child server service return status message
00065     kInactive          // Client connection shutdown due to inactivity
00066   };


Function Documentation

const char * DDS::AsString ( EClientType  clienttype  ) 

Definition at line 133 of file DDS.cxx.

References kDatabaseUpdater, kEventDisplay, kOnlineMonitor, kOther, kUnknownClientType, Msg::kWarning, and MSG.

00133                                                 {
00134   //  Purpose:  Convert enumerated client type to a client string.
00135   //
00136   //  Argument: clienttype: enumerated EClientType described in DDS.h.
00137   //
00138   //  Return:  client type as string.  If unknown, returns "Unknown".
00139   //
00140   //  Contact:   S. Kasahara
00141   //
00142 
00143   switch ( clienttype ) {
00144     case kOnlineMonitor:
00145       return "OnlineMonitor";
00146     case kDatabaseUpdater:
00147       return "DatabaseUpdater";
00148     case kEventDisplay:
00149       return "EventDisplay";
00150     case kOther:
00151       return "Other";
00152     case kUnknownClientType:
00153       return "Unknown";
00154     default:
00155       MSG("DDS",Msg::kWarning)
00156       << "DDS::AsString called with unknown client type"
00157       << (int)clienttype << endl;
00158       return "Unknown";
00159   }//end of switch
00160 
00161 }

const char * DDS::AsString ( EMessageType  messagetype  ) 

Definition at line 76 of file DDS.cxx.

References kData, kError, kFileError, kGoToFile, kInactive, kInvalidSelection, kMessageUnknown, kNext, kOk, kPermissionDenied, kSaturated, kShutdown, kSocketError, kStatus, kSubscribe, kSystemError, kTimeoutNewFile, kTimeoutNewRecord, Msg::kWarning, and MSG.

00076                                                   {
00077   //  Purpose:  Convert enumerated message type to a message string.
00078   //
00079   //  Argument: messagetype: enumerated EMessageType described in DDS.h.
00080   //
00081   //  Return:  message string of type const char*. If message type is
00082   //           unknown, returns "Unknown".
00083   //
00084   //  Contact:   S. Kasahara
00085   //
00086 
00087   switch ( messagetype ) {
00088     case kData: 
00089       return "Data";
00090     case kStatus: 
00091       return "Status";
00092     case kGoToFile:
00093       return "GoToFile";
00094     case kNext: 
00095       return "Next";
00096     case kSubscribe:  
00097       return "Subscribe";
00098     case kShutdown:
00099       return "Shutdown";
00100     case kPermissionDenied:
00101       return "PermissionDenied";
00102     case kSaturated:
00103       return "Saturated";
00104     case kFileError:
00105       return "FileError";
00106     case kTimeoutNewFile:
00107       return "TimeoutNewFile";
00108     case kTimeoutNewRecord:
00109       return "TimeoutNewRecord";
00110     case kInvalidSelection:
00111       return "InvalidSelection";
00112     case kMessageUnknown:
00113       return "MessageUnknown";
00114     case kOk:
00115       return "Ok";
00116     case kSocketError:
00117       return "SocketError";
00118     case kSystemError:
00119       return "SystemError";
00120     case kError:
00121       return "Error";
00122     case kInactive:
00123       return "Inactive";
00124     default:
00125       MSG("DDS",Msg::kWarning) 
00126       << "DDS::AsString called with unknown message type" 
00127       << (int)messagetype << endl;
00128       return "Unknown";
00129   }//end of switch
00130 
00131 }

const char * DDS::AsString ( EKeepUpMode  keepupmode  ) 

Definition at line 49 of file DDS.cxx.

References kAll, kFileKeepUp, kRecordKeepUp, Msg::kWarning, and MSG.

00049                                                 {
00050   //  Purpose:  Convert enumerated keepup mode to a keepup mode string.
00051   //
00052   //  Argument: keepupmode   enumerated EKeepUpMode described in DDS.h.
00053   //
00054   //  Return:  keepup mode string of type const char*. If keepup mode is
00055   //           unknown, returns "Unknown".
00056   //
00057   //  Contact:   S. Kasahara
00058   //
00059 
00060   switch ( keepupmode ) {
00061     case kAll: 
00062       return "All";
00063     case kFileKeepUp: 
00064       return "FileKeepUp";
00065     case kRecordKeepUp: 
00066       return "RecordKeepUp";
00067     default:
00068       MSG("DDS",Msg::kWarning) 
00069       << "DDS::AsString called with unknown keepup mode" 
00070       << (int)keepupmode << endl;
00071       return "Unknown";
00072   }//end of switch
00073 
00074 }

const char * DDS::AsString ( EDataSource  datasource  ) 

Definition at line 24 of file DDS.cxx.

References kDaq, kDcs, Msg::kWarning, and MSG.

Referenced by main().

00024                                                 {
00025   //  Purpose:  Convert enumerated data source to a data source string.
00026   //
00027   //  Argument: datasource   enumerated EDataSource described in DDS.h.
00028   //
00029   //  Return:  data source string of type const char*. If data source is
00030   //           unknown, returns "Unknown".
00031   //
00032   //  Contact:   S. Kasahara
00033   //
00034 
00035   switch ( datasource ) {
00036     case kDaq: 
00037       return "DAQ";
00038     case kDcs: 
00039       return "DCS";
00040     default:
00041       MSG("DDS",Msg::kWarning) 
00042       << "DDS::AsString called with unknown message type" 
00043       << (int)datasource << endl;
00044       return "Unknown";
00045   }//end of switch
00046 
00047 }

DDS::EClientType DDS::GetClientType ( const char *  clienttype  ) 

Definition at line 200 of file DDS.cxx.

References kDatabaseUpdater, kEventDisplay, kOnlineMonitor, kOther, kUnknownClientType, Msg::kWarning, and MSG.

Referenced by IoInputModule::Config().

00200                                                         {
00201   //  Purpose:  Convert text string clienttype to an enumerated code.
00202   //
00203   //  Argument: clienttype  string  
00204   //
00205   //  Return:  returns -1 if no match
00206   //
00207   //  Contact:   S. Kasahara
00208   //
00209 
00210   TString tmpstr(clienttype);
00211   tmpstr.ToLower();
00212   if (strcmp(tmpstr.Data(),"onlinemonitor")  ==0) return DDS::kOnlineMonitor;
00213   if (strcmp(tmpstr.Data(),"databaseupdater")==0) return DDS::kDatabaseUpdater;
00214   if (strcmp(tmpstr.Data(),"eventdisplay")   ==0) return DDS::kEventDisplay;
00215   if (strcmp(tmpstr.Data(),"other")          ==0) return DDS::kOther;
00216   if (strcmp(tmpstr.Data(),"unknown")      ==0) return DDS::kUnknownClientType;
00217   MSG("DDS",Msg::kWarning) << "DDS::GetClientType called with unknown"
00218                            << "\nclienttype " << clienttype 
00219                            << " Return DDS::kUnknownClientType." << endl;
00220   return DDS::kUnknownClientType;
00221 
00222 }

int DDS::GetDataSourceCode ( const char *  datasource  ) 

Definition at line 182 of file DDS.cxx.

References kDaq, and kDcs.

Referenced by IoInputModule::Config(), and ReadDispatcherModule::ConnectToServer().

00182                                                  {
00183   //  Purpose:  Convert text string datasource to an enumerated code.
00184   //
00185   //  Argument: datasource  string  
00186   //
00187   //  Return:  returns -1 if no match
00188   //
00189   //  Contact:   S. Kasahara
00190   //
00191 
00192   TString tmpstr(datasource);
00193   tmpstr.ToLower();
00194   if      ( strcmp(tmpstr.Data(),"daq") == 0 ) return DDS::kDaq;
00195   else if ( strcmp(tmpstr.Data(),"dcs") == 0 ) return DDS::kDcs;
00196   return -1;
00197 
00198 }

int DDS::GetKeepUpCode ( const char *  keepupmode  ) 

Definition at line 163 of file DDS.cxx.

References kAll, kFileKeepUp, and kRecordKeepUp.

Referenced by IoInputModule::Config(), and ReadDispatcherModule::ConnectToServer().

00163                                              {
00164   //  Purpose:  Convert text string keepup mode to an enumerated code.
00165   //
00166   //  Argument: keepupmode  string  
00167   //
00168   //  Return:  returns -1 if no match
00169   //
00170   //  Contact:   S. Kasahara
00171   //
00172 
00173   TString tmpstr(keepupmode);
00174   tmpstr.ToLower();
00175   if      ( strcmp(tmpstr.Data(),"all") == 0 ) return DDS::kAll;
00176   else if ( strcmp(tmpstr.Data(),"filekeepup") == 0 ) return DDS::kFileKeepUp;
00177   else if (strcmp(tmpstr.Data(),"recordkeepup")==0) return DDS::kRecordKeepUp;
00178   return -1;
00179 
00180 }


Variable Documentation

const Int_t DDS::kPort = 9090

Definition at line 91 of file DDS.h.

Referenced by IoInputModule::DefaultConfig(), and main().


Generated on 18 Jan 2018 for loon by  doxygen 1.6.1