23 m_computed(INITIAL_COMPUTED_VALUE),
32 this->m_computed = INITIAL_COMPUTED_VALUE;
40 this->m_computed =
update_crc_32(this->m_computed, buffer[index]);
47 this->m_computed = ~this->m_computed;
61 if (this->m_crc.m_stored != this->m_crc.m_computed) {
62 this->m_events.fileCRCFailure(
64 this->m_crc.m_computed
80 const bool status = this->readFile()
81 and this->validateCRC()
82 and this->m_header.validateTime(this->m_component)
83 and this->validateRecords();
92 return this->m_buffer.getBuffLeft() > 0;
105 this->m_buffer.resetDeser();
111 this->m_buffer.resetSer();
114 bool CmdSequencerComponentImpl::FPrimeSequence ::
121 this->m_fileName.toChar(),
126 result = this->readOpenFile();
128 this->m_events.fileNotFound();
131 this->m_events.fileReadError();
135 this->m_sequenceFile.close();
143 U8 *
const buffAddr = this->m_buffer.getBuffAddr();
145 bool status = this->readHeader();
148 status = this->deserializeHeader()
149 and this->readRecordsAndCRC()
150 and this->extractCRC();
154 this->m_crc.update(buffAddr, buffLen);
155 this->m_crc.finalize();
164 Os::File& file = this->m_sequenceFile;
183 this->m_events.fileInvalid(
184 Events::FileReadStage::READ_HEADER,
191 this->m_events.fileInvalid(
192 Events::FileReadStage::READ_HEADER_SIZE,
214 Header& header = this->m_header;
219 this->m_events.fileInvalid(
220 Events::FileReadStage::DESER_SIZE,
226 this->m_events.fileSizeError(header.
m_fileSize);
232 this->m_events.fileInvalid(
233 Events::FileReadStage::DESER_NUM_RECORDS,
242 this->m_events.fileInvalid(
243 Events::FileReadStage::DESER_TIME_BASE,
252 this->m_events.fileInvalid(
253 Events::FileReadStage::DESER_TIME_CONTEXT,
264 Os::File& file = this->m_sequenceFile;
275 this->m_events.fileInvalid(
276 Events::FileReadStage::READ_SEQ_DATA,
283 this->m_events.fileInvalid(
284 Events::FileReadStage::READ_SEQ_DATA_SIZE,
300 U32& crc = this->m_crc.m_stored;
304 const U32 crcSize =
sizeof(crc);
306 if (buffSize < crcSize) {
307 this->m_events.fileInvalid(
308 Events::FileReadStage::READ_SEQ_CRC,
313 FW_ASSERT(buffSize >= crcSize, buffSize, crcSize);
344 status = this->deserializeTimeTag(record.
m_timeTag);
347 status = this->deserializeRecordSize(recordSize);
350 status = this->copyCommand(record.
m_command, recordSize);
371 descriptor =
static_cast<Record::Descriptor
>(descEntry);
380 U32 seconds, useconds;
386 timeTag.
set(seconds,useconds);
426 const U32 numRecords = this->m_header.m_numRecords;
430 for (
NATIVE_UINT_TYPE recordNumber = 0; recordNumber < numRecords; recordNumber++) {
433 this->m_events.recordInvalid(recordNumber, status);
439 if (buffLeftSize > 0) {
440 this->m_events.recordMismatch(numRecords, buffLeftSize);