mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-03-11 12:37:42 +01:00
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
* member filePath in Implementation is std::filesystem::path, some refactoring * PR Review * adapted function signature - compiled with hdf5 on
46 lines
1.3 KiB
C++
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
|