Files
slsDetectorPackage/slsReceiverSoftware/src/BinaryDataFile.h
AliceMazzoleni99 65c8f2c7d8
Some checks failed
Build on RHEL9 / build (push) Successful in 3m22s
Run Simulator Tests on local RHEL9 / build (push) Failing after 3m49s
Build on local RHEL9 / build (push) Successful in 1m26s
Build on RHEL8 / build (push) Successful in 5m13s
Run Simulator Tests on local RHEL8 / build (push) Failing after 5m30s
Build on local RHEL8 / build (push) Successful in 3m33s
dev/handes trailing / in filepath (#1391)
* member filePath in Implementation is std::filesystem::path, some refactoring

* PR Review

* adapted function signature - compiled with hdf5 on
2026-02-17 17:11:33 +01:00

46 lines
1.3 KiB
C++

// SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package
#pragma once
#include "File.h"
namespace sls {
class BinaryDataFile : private virtual slsDetectorDefs, public File {
public:
BinaryDataFile(const int index);
~BinaryDataFile();
fileFormat GetFileFormat() const override;
void CloseFile() override;
void CreateFirstBinaryDataFile(const std::filesystem::path &filePath,
const std::string &fNamePrefix,
const uint64_t fIndex, const bool ovEnable,
const bool sMode, const uint16_t uPortNumber,
const uint32_t mFramesPerFile) override;
void WriteToFile(char *imageData, sls_receiver_header &header,
const int imageSize, const uint64_t currentFrameNumber,
const uint32_t numPacketsCaught) override;
private:
void CreateFile();
uint32_t index;
FILE *fd{nullptr};
std::string fileName;
std::filesystem::path m_filePath;
uint32_t numFramesInFile{0};
uint32_t subFileIndex{0};
std::string fileNamePrefix;
uint64_t fileIndex{0};
bool overWriteEnable{false};
bool silentMode{false};
uint32_t udpPortNumber{0};
uint32_t maxFramesPerFile{0};
};
} // namespace sls