Changeset 10535
- Timestamp:
- 05/03/11 18:22:01 (14 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/HeadersFTM.cc
r10520 r10535 133 133 void FTM::Error::print(std::ostream &out) const 134 134 { 135 out << "ERROR: Ncalls=" << fNumCalls << endl; 136 out << Converter::GetHex<unsigned int>(fData, 28, 0, false) << endl; 135 out << dec; 136 out << "ERROR: Num Calls = " << fNumCalls << endl; 137 out << " Delimiter = " << (fDelimiter=='@'?"ok":"wrong") << endl; 138 out << " Path = "; 139 out << (fSrcAddress &0x3) << ":" << (fSrcAddress >>2) << " --> "; 140 out << (fDestAddress&0x3) << ":" << (fDestAddress>>2) << endl; 141 out << " FirmwareId = " << hex << fFirmwareId << endl; 142 out << " Command = " << hex << fCommand << endl; 143 out << " CRC counter = " << dec << fCrcErrorCounter << endl; 144 out << " CRC = " << hex << fCrcCheckSum << endl; 145 out << " Data: " << Converter::GetHex<unsigned int>(fData, 21, 0, false) << endl; 137 146 } -
trunk/FACT++/src/HeadersFTM.h
r10525 r10535 319 319 std::vector<uint16_t> HtoN() const 320 320 { 321 std::cout << "-----><-----" << std::endl;322 321 return htoncpy(*this); 323 322 } … … 325 324 void operator=(const std::vector<uint16_t> &vec) 326 325 { 327 std::cout << "-----<>-----" << std::endl;328 329 326 ntohcpy(vec, *this); 330 327 } … … 606 603 struct Error 607 604 { 608 // (same as FtuList)609 605 uint16_t fNumCalls; // 0=error, >1 needed repetition but successfull 610 uint16_t fData[28]; 606 607 uint16_t fDelimiter; 608 uint16_t fDestAddress; 609 uint16_t fSrcAddress; 610 uint16_t fFirmwareId; 611 uint16_t fCommand; 612 uint16_t fData[21]; 613 uint16_t fCrcErrorCounter; 614 uint16_t fCrcCheckSum; 611 615 612 616 Error() { init(*this); } … … 637 641 fError(e) 638 642 { 639 } 643 fError.fDestAddress = (e.fDestAddress&0x3)*10 + ((e.fDestAddress>>2)&0xf); 644 fError.fSrcAddress = (e.fSrcAddress &0x3)*10 + ((e.fSrcAddress >>2)&0xf); 645 } 646 640 647 } __attribute__((__packed__)); 641 648
Note:
See TracChangeset
for help on using the changeset viewer.