- Timestamp:
- 10/20/11 11:33:55 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/biasctrl.cc
r12211 r12214 152 152 Error(str); 153 153 154 PostClose(false);155 154 return false; 156 155 } … … 184 183 { 185 184 ostringstream msg; 186 msg << "Corrupted answer (id=" << id << "): received wrap counter " << wrap << " doesn't match last received counter " << fWrapCounter << "."; 185 msg << "Corrupted answer (id=" << id << "): received wrap counter " << wrap << " doesn't match last one " << fWrapCounter << " "; 186 msg << " (fSendCounter=" << fSendCounter << ")"; 187 187 Error(msg); 188 188 return false; … … 323 323 (cmd==kCmdChannelSet && !CheckMessageLength(bytes_received, 3*kNumChannels, "CmdChannelSet")) || 324 324 (cmd==kExpertChannelSet && !CheckMessageLength(bytes_received, 3, "CmdExpertChannelSet"))) 325 return; 325 { 326 CloseImp(false); 327 return; 328 } 326 329 327 330 // Now evaluate the whole bunch of messages … … 330 333 if (!EvalAnswer(buf.data(), i, command)) 331 334 { 332 PostClose(false);335 CloseImp(false); 333 336 return; 334 337 } … … 354 357 msg << "Corrupted answer: received wrap counter " << fWrapCounter << " is not send counter " << send_counter << "%8."; 355 358 Error(msg); 356 PostClose(false);359 CloseImp(false); 357 360 } 358 361 … … 441 444 Error(str); 442 445 } 443 PostClose(false);//err!=ba::error::basic_errors::operation_aborted);446 CloseImp(false);//err!=ba::error::basic_errors::operation_aborted); 444 447 return; 445 448 } … … 450 453 { 451 454 Error("Number of received bytes not a multiple of 3, can't read data."); 452 PostClose(false);455 CloseImp(false); 453 456 return; 454 457 } … … 516 519 Error(str); 517 520 518 PostClose(false);521 CloseImp(false); 519 522 return; 520 523 } … … 537 540 { 538 541 Error("Synchronization attempt timed out."); 539 PostClose(false);542 CloseImp(false); 540 543 return; 541 544 } … … 823 826 if (volt<0 || volt>90) 824 827 { 825 Error("ChannelSetVolt - Voltage out of range [0V,90V]."); 828 ostringstream msg; 829 msg << "ChannelSetVolt - Given voltage " << volt << "V out of range [0V,90V]."; 830 Error(msg); 826 831 return false; 827 832 } … … 867 872 if (fVoltRef[ch]+dac[ch]>kMaxDac) 868 873 { 869 Error("AddDac - New voltage reference out of range."); 874 ostringstream msg; 875 msg << "AddDac - New voltage reference " << fVoltRef[ch] << "+" << dac[ch] << " out of range [0," << kMaxDac << " for channel " << ch << "."; 876 Error(msg); 870 877 return false; 871 878 } … … 891 898 if (offset[ch]<-90 || offset[ch]>90) 892 899 { 893 Error("AddVolt - Offset " << offset[ch] << " for channel " << ch << " out of range [-90V,90V]."); 900 ostringstream msg; 901 msg << "AddVolt - Offset voltage " << offset[ch] << "V for channel " << ch << " out of range [-90V,90V]."; 902 Error(msg); 894 903 return false; 895 904 } … … 940 949 if (volt[ch]<0 || volt[ch]>90) 941 950 { 942 Error("SetVolt - Voltage out of range [0V,90V]."); 951 ostringstream msg; 952 msg << "SetVolt - Voltage " << volt[ch] << "V out of range [0V,90V] for channel " << ch << "."; 953 Error(msg); 943 954 return false; 944 955 } … … 966 977 if (offset<-90 || offset>90) 967 978 { 968 Error("SetGapdVoltage - Offset " << offset << " out of range [-90V,90V]."); 979 ostringstream msg; 980 msg << "SetGapdVoltage - Offset voltage " << offset << "V out of range [-90V,90V]."; 981 Error(msg); 969 982 return false; 970 983 } … … 975 988 if (fVoltGapd[ch]+dac>kMaxDac) 976 989 { 977 Error("SetGapdVoltage - New voltage reference out of range."); 990 ostringstream msg; 991 msg << "SetGapdVoltage - New voltage reference " << fVoltGapd[ch] << "+" << dac << " out of range [0," << kMaxDac << " for channel " << ch << "."; 992 Error(msg); 978 993 return false; 979 994 } … … 1041 1056 if (fIsRamping) 1042 1057 { 1043 Warn("RampStart - Ramping in progress... ignored.");1058 Warn("RampStart - Ramping already in progress... ignored."); 1044 1059 return; 1045 1060 } … … 1127 1142 if (fGlobalVoltCmd>=0) 1128 1143 { 1129 Error("ExpertGlobalSetDac - Still waiting for previous global-set's answer.");1144 Error("ExpertGlobalSetDac - Still waiting for previous answer to 'GlobalSet'"); 1130 1145 return false; 1131 1146 }
Note:
See TracChangeset
for help on using the changeset viewer.