Changeset 10780 for trunk/FACT++/src/ftmctrl.cc
- Timestamp:
- 05/23/11 15:04:32 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ftmctrl.cc
r10749 r10780 211 211 err!=ba::error::basic_errors::operation_aborted) // Connection closed by us 212 212 { 213 stringstream str;213 ostringstream str; 214 214 str << "Reading from " << URL() << ": " << err.message() << " (" << err << ")";// << endl; 215 215 Error(str); … … 225 225 if (bytes_received!=sizeof(FTM::Header)) 226 226 { 227 stringstream str;227 ostringstream str; 228 228 str << "Excepted " << sizeof(FTM::Header) << " bytes (FTM::Header) but received " << bytes_received << "."; 229 229 Error(str); … … 237 237 if (fHeader.fDelimiter!=FTM::kDelimiterStart) 238 238 { 239 stringstream str;239 ostringstream str; 240 240 str << "Invalid header received: start delimiter wrong, received "; 241 241 str << hex << fHeader.fDelimiter << ", expected " << FTM::kDelimiterStart << "."; … … 284 284 285 285 default: 286 stringstream str;286 ostringstream str; 287 287 str << "Unknonw type " << fHeader.fType << " in received header." << endl; 288 288 Error(str); … … 297 297 if (ntohs(fBuffer.back())!=FTM::kDelimiterEnd) 298 298 { 299 stringstream str;299 ostringstream str; 300 300 str << "Invalid data received: end delimiter wrong, received "; 301 301 str << hex << ntohs(fBuffer.back()) << ", expected " << FTM::kDelimiterEnd << "."; … … 356 356 357 357 default: 358 stringstream str;358 ostringstream str; 359 359 str << "Unknonw type " << fHeader.fType << " in header." << endl; 360 360 Error(str); … … 365 365 catch (const logic_error &e) 366 366 { 367 stringstream str;367 ostringstream str; 368 368 str << "Exception converting buffer into data structure: " << e.what(); 369 369 Error(str); … … 405 405 if (error && error!=ba::error::basic_errors::operation_aborted) 406 406 { 407 stringstream str;407 ostringstream str; 408 408 str << "Read timeout of " << URL() << ": " << error.message() << " (" << error << ")";// << endl; 409 409 Error(str); … … 439 439 boost::array<uint16_t, 5> cmd = {{ '@', u1, u2, u3, u4 }}; 440 440 441 stringstream msg;441 ostringstream msg; 442 442 msg << "Sending command:" << hex; 443 443 msg << " 0x" << setw(4) << setfill('0') << cmd[0]; … … 461 461 boost::array<uint16_t, 5> cmd = {{ '@', u1, u2, u3, u4 }}; 462 462 463 stringstream msg;463 ostringstream msg; 464 464 msg << "Sending command:" << hex; 465 465 msg << " 0x" << setw(4) << setfill('0') << cmd[0]; … … 1044 1044 return true; 1045 1045 1046 stringstream msg;1046 ostringstream msg; 1047 1047 msg << name << " - Received event has " << has << " bytes, but expected " << size << "."; 1048 1048 T::Fatal(msg); … … 1059 1059 if (dat[1]>uint16_t(-1)) 1060 1060 { 1061 stringstream msg;1061 ostringstream msg; 1062 1062 msg << hex << "Value " << dat[1] << " out of range."; 1063 1063 T::Error(msg); … … 1068 1068 if (dat[0]>uint16_t(-1) || !fFTM.CmdSetRegister(dat[0], dat[1])) 1069 1069 { 1070 stringstream msg;1070 ostringstream msg; 1071 1071 msg << hex << "Address " << dat[0] << " out of range."; 1072 1072 T::Error(msg); … … 1084 1084 if (addr>uint16_t(-1) || !fFTM.CmdGetRegister(addr)) 1085 1085 { 1086 stringstream msg;1086 ostringstream msg; 1087 1087 msg << hex << "Address " << addr << " out of range."; 1088 1088 T::Error(msg); … … 1102 1102 if (dat[1]>uint32_t(-1)) 1103 1103 { 1104 stringstream msg;1104 ostringstream msg; 1105 1105 msg << hex << "Value " << dat[1] << " out of range."; 1106 1106 T::Error(msg); … … 1158 1158 return T::GetCurrentState(); 1159 1159 1160 stringstream msg;1160 ostringstream msg; 1161 1161 msg << "Loading static data from file '" << evt.GetString() << "' failed "; 1162 1162 … … 1176 1176 return T::GetCurrentState(); 1177 1177 1178 stringstream msg;1178 ostringstream msg; 1179 1179 msg << "Writing static data to file '" << evt.GetString() << "' failed "; 1180 1180 msg << "(" << strerror(errno) << ")";
Note:
See TracChangeset
for help on using the changeset viewer.