Refactor TM handling #450
@ -222,39 +222,6 @@ ReturnValue_t PersistentTmStore::loadNextDumpFile() {
|
|||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// void PersistentTmStore::fileToPackets(const std::filesystem::path& path, uint32_t unixStamp) {
|
|
||||||
// store_address_t storeId;
|
|
||||||
// TmTcMessage message;
|
|
||||||
// size_t size = std::filesystem::file_size(path);
|
|
||||||
// if (size < 6) {
|
|
||||||
// // Can't even read the CCSDS header
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// std::ifstream ifile(path, std::ios::binary);
|
|
||||||
// ifile.read(reinterpret_cast<char*>(fileBuf.data()), static_cast<std::streamsize>(size));
|
|
||||||
// size_t currentIdx = 0;
|
|
||||||
// while (currentIdx < size) {
|
|
||||||
// PusTmReader reader(&timeReader, fileBuf.data(), fileBuf.size());
|
|
||||||
// // CRC check to fully ensure this is a valid TM
|
|
||||||
// ReturnValue_t result = reader.parseDataWithCrcCheck();
|
|
||||||
// if (result == returnvalue::OK) {
|
|
||||||
// // TODO: Blow the data out to the VC directly. Use IF function to do this.
|
|
||||||
// // result = tmStore.addData(&storeId, fileBuf.data() + currentIdx,
|
|
||||||
// // reader.getFullPacketLen()); if (result != returnvalue::OK) {
|
|
||||||
// // continue;
|
|
||||||
// // }
|
|
||||||
// // funnel.sendPacketToLiveDestinations(storeId, message, fileBuf.data() + currentIdx,
|
|
||||||
// // reader.getFullPacketLen());
|
|
||||||
// currentIdx += reader.getFullPacketLen();
|
|
||||||
// } else {
|
|
||||||
// sif::error << "Parsing of PUS TM failed with code " << result << std::endl;
|
|
||||||
// triggerEvent(POSSIBLE_FILE_CORRUPTION, result, unixStamp);
|
|
||||||
// // Stop for now, do not really know where to continue and we do not trust the file anymore.
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
ReturnValue_t PersistentTmStore::dumpNextPacket(DirectTmSinkIF& tmSink, size_t& dumpedLen) {
|
ReturnValue_t PersistentTmStore::dumpNextPacket(DirectTmSinkIF& tmSink, size_t& dumpedLen) {
|
||||||
if (state == State::IDLE) {
|
if (state == State::IDLE) {
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
|
@ -68,7 +68,6 @@ class PersistentTmStore : public TmStoreFrontendSimpleIF, public SystemObject {
|
|||||||
ReturnValue_t startDumpFromUpTo(uint32_t fromUnixSeconds, uint32_t upToUnixSeconds);
|
ReturnValue_t startDumpFromUpTo(uint32_t fromUnixSeconds, uint32_t upToUnixSeconds);
|
||||||
ReturnValue_t dumpNextPacket(DirectTmSinkIF& tmSink, size_t& dumpedLen);
|
ReturnValue_t dumpNextPacket(DirectTmSinkIF& tmSink, size_t& dumpedLen);
|
||||||
|
|
||||||
// ReturnValue_t passPacket(PusTmReader& reader);
|
|
||||||
ReturnValue_t storePacket(PusTmReader& reader);
|
ReturnValue_t storePacket(PusTmReader& reader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
Reference in New Issue
Block a user