Update to version 3.2

This commit is contained in:
2026-03-18 14:56:42 +01:00
parent f593487c77
commit 44609d367f
49 changed files with 12657 additions and 3668 deletions

View File

@@ -18,12 +18,12 @@
#include <gempa/caps/packet.h>
#include <vector>
namespace Gempa {
namespace CAPS {
struct SC_GEMPA_CAPS_API RawResponseHeader {
int64_t timeSeconds;
int32_t timeMicroSeconds;
@@ -47,7 +47,8 @@ class RawDataRecord : public DataRecord {
public:
RawDataRecord();
const char *formatName() const;
DataRecord *clone() const override;
const char *formatName() const override;
/**
* @brief Reads metadata from data record header
@@ -59,7 +60,7 @@ class RawDataRecord : public DataRecord {
*/
bool readMetaData(std::streambuf &buf, int size,
Header &header,
Time &startTime, Time &endTime);
Time &startTime, Time &endTime) override;
void setHeader(const Header &header);
@@ -67,33 +68,33 @@ class RawDataRecord : public DataRecord {
* @brief Returns the meta information of the data if supported
* @return The data record header
*/
const Header *header() const;
const Header *header() const override;
/**
* @brief Returns the start time of the record
* @return The start time
*/
Time startTime() const;
Time startTime() const override;
/**
* @brief Returns the end time of the record
* @return The end time
*/
Time endTime() const;
Time endTime() const override;
/**
* @brief canTrim checks if data trimming is possible
* without modifying preceding data
* @return True, if data trimming is possible
*/
bool canTrim() const;
bool canTrim() const override;
/**
* @brief canMerge checks if data merging is possible
* without modifying preceding data
* @return True, if data merging is possible
*/
bool canMerge() const;
bool canMerge() const override;
/**
* @brief Trims a record to start and end time. Trimming
@@ -109,7 +110,7 @@ class RawDataRecord : public DataRecord {
* @return It returns true if trimming has been done or false
* if an error occured or trimming is not supported.
*/
bool trim(const Time &start, const Time &end) const;
bool trim(const Time &start, const Time &end) const override;
/**
* @brief Returns the data size in bytes if the current state would
@@ -118,7 +119,7 @@ class RawDataRecord : public DataRecord {
* @param withHeader Take header into account
* @return Returns the data size in bytes
*/
size_t dataSize(bool withHeader) const;
size_t dataSize(bool withHeader) const override;
/**
* @brief Reads the packet data including header from a streambuf
@@ -137,7 +138,7 @@ class RawDataRecord : public DataRecord {
ReadStatus get(std::streambuf &buf, int size,
const Time &start = Time(),
const Time &end = Time(),
int maxBytes = -1);
int maxBytes = -1) override;
/**
* @brief Reads the packet data without header from a streambuf
@@ -167,13 +168,13 @@ class RawDataRecord : public DataRecord {
* @param Take header into account
* @return True, if the data has been written
*/
bool put(std::streambuf &buf, bool withHeader) const;
bool put(std::streambuf &buf, bool withHeader) const override;
/**
* @brief Returns the packet type
* @return The packet type
*/
PacketType packetType() const { return RawDataPacket; }
PacketType packetType() const override { return RawDataPacket; }
/**
* @brief Sets the start time of the record
@@ -218,18 +219,19 @@ class RawDataRecord : public DataRecord {
class FixedRawDataRecord : public RawDataRecord {
public:
virtual bool canTrim() const { return false; }
virtual bool canMerge() const { return false; }
virtual bool trim(const Time &start, const Time &end) const { return false; }
virtual const char *formatName() const;
virtual ReadStatus get(std::streambuf &buf, int size,
bool canTrim() const override { return false; }
bool canMerge() const override { return false; }
bool trim(const Time &start, const Time &end) const override { return false; }
const char *formatName() const override;
ReadStatus get(std::streambuf &buf, int size,
const Time &/*start*/, const Time &/*end*/,
int maxBytes) {
int maxBytes) override {
return RawDataRecord::get(buf, size, Time(), Time(), maxBytes);
}
PacketType packetType() const { return FixedRawDataPacket; }
PacketType packetType() const override { return FixedRawDataPacket; }
};
}
}