Changeset 27 for drsdaq/DAQReadout.cc
- Timestamp:
- 04/01/09 14:39:16 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
drsdaq/DAQReadout.cc
r22 r27 11 11 #include "DAQReadout.h" 12 12 13 static c har* daq_state_str[] = {"active", "stopped"};14 static c har* daq_runtype_str[] = {"data", "pedestal", "test"};15 16 static struct CL_Struct {char *Name;13 static const char* daq_state_str[] = {"active", "stopped"}; 14 static const char* daq_runtype_str[] = {"data", "pedestal", "test"}; 15 16 static const struct CL_Struct { const char *Name; 17 17 void (DAQReadout::*CommandPointer)(); 18 18 bool NeedNotBusy; 19 c har *Parameters;20 c har *Help;19 const char *Parameters; 20 const char *Help; 21 21 } CommandList[] = 22 22 {{"board", &DAQReadout::cmd_board, true, "<i> [j] | <all>" ,"Address board i, boards i-j, all boards"}, … … 379 379 void DAQReadout::cmd_calib() { 380 380 if (NParam==4 && atof(Param[1]) && atof(Param[2])) 381 CalibrateDRS( Param[3],atof(Param[1]),atof(Param[2]));381 CalibrateDRS((char *) Param[3],atof(Param[1]),atof(Param[2])); 382 382 else if (NParam==3 && atof(Param[1]) && atof(Param[2])) 383 383 CalibrateDRS(NULL,atof(Param[1]),atof(Param[2])); … … 1059 1059 1060 1060 // Print message to selected target 1061 void DAQReadout::PrintMessage(int Target, c har *Format, ...) {1061 void DAQReadout::PrintMessage(int Target, const char *Format, ...) { 1062 1062 va_list ArgumentPointer; 1063 1063 va_start(ArgumentPointer, Format); … … 1067 1067 1068 1068 // Print message to screen, log file and socket 1069 void DAQReadout::PrintMessage(c har *Format, ...) {1069 void DAQReadout::PrintMessage(const char *Format, ...) { 1070 1070 va_list ArgumentPointer; 1071 1071 va_start(ArgumentPointer, Format); … … 1075 1075 1076 1076 // Function doing the actual printing work 1077 void DAQReadout::PrintMessage(int Target, c har *Format, va_list ArgumentPointer) {1077 void DAQReadout::PrintMessage(int Target, const char *Format, va_list ArgumentPointer) { 1078 1078 1079 1079 char Textbuffer[MAX_COM_SIZE]; … … 1112 1112 1113 1113 // Check if two strings match (min 1 character must match) 1114 int Match(char *str,char *cmd) {1115 return strncasecmp(str,cmd,strlen(str)==0 ? 1:strlen(str)) ? 0:1;1114 bool Match(const char *str, const char *cmd) { 1115 return strncasecmp(str,cmd,strlen(str)==0 ? 1:strlen(str)) ? false:true; 1116 1116 } 1117 1117 … … 1125 1125 1126 1126 // Parse command line for white space and double-quote separated tokens 1127 int ParseInput(char* Command, c har *Param[]) {1127 int ParseInput(char* Command, const char *Param[]) { 1128 1128 int Count=0; 1129 1129 … … 1146 1146 1147 1147 // ReadCard function by F. Goebel 1148 int ReadCard(c har *card_flag, void *store, char type, FILE *fptr) {1148 int ReadCard(const char *card_flag, void *store, char type, FILE *fptr) { 1149 1149 1150 1150 char *card_name, *card_val, line[160];
Note:
See TracChangeset
for help on using the changeset viewer.