Update to version 3.2
This commit is contained in:
@@ -16,18 +16,28 @@
|
||||
#ifndef GEMPA_CAPS_PLUGINPACKET_H
|
||||
#define GEMPA_CAPS_PLUGINPACKET_H
|
||||
|
||||
#include "mseed/encoder.h"
|
||||
|
||||
#include "packet.h"
|
||||
|
||||
|
||||
namespace Gempa {
|
||||
namespace CAPS {
|
||||
|
||||
|
||||
struct Packet {
|
||||
Packet() : timingQuality(-1) {}
|
||||
Packet(DataRecordPtr rec,
|
||||
const std::string &networkCode, const std::string &stationCode,
|
||||
const std::string &locationCode, const std::string &channelCode)
|
||||
: record(rec), networkCode(networkCode), stationCode(stationCode),
|
||||
locationCode(locationCode), channelCode(channelCode), timingQuality(-1) {
|
||||
const std::string &locationCode, const std::string &channelCode,
|
||||
void *context = nullptr)
|
||||
: record(rec)
|
||||
, networkCode(networkCode)
|
||||
, stationCode(stationCode)
|
||||
, locationCode(locationCode)
|
||||
, channelCode(channelCode)
|
||||
, timingQuality(-1)
|
||||
, context(context)
|
||||
{
|
||||
streamID = networkCode + "." + stationCode + "." +
|
||||
locationCode + "." + channelCode;
|
||||
}
|
||||
@@ -42,28 +52,33 @@ struct Packet {
|
||||
return packet;
|
||||
}
|
||||
|
||||
typedef std::vector<char> Buffer;
|
||||
typedef boost::shared_ptr<Buffer> BufferPtr;
|
||||
using Buffer = std::vector<char>;
|
||||
using BufferPtr = boost::shared_ptr<Buffer>;
|
||||
|
||||
BufferPtr buffer; // PacketDataHeader, PacketHeader[V1|V2], Data
|
||||
DataRecordPtr record;
|
||||
std::string networkCode;
|
||||
std::string stationCode;
|
||||
std::string locationCode;
|
||||
std::string channelCode;
|
||||
std::string streamID;
|
||||
DataType dataType;
|
||||
BufferPtr buffer; // PacketDataHeader, PacketHeader[V1|V2], Data
|
||||
DataRecordPtr record;
|
||||
std::string networkCode;
|
||||
std::string stationCode;
|
||||
std::string locationCode;
|
||||
std::string channelCode;
|
||||
std::string streamID;
|
||||
DataType dataType;
|
||||
#if !defined(CAPS_FEATURES_BACKFILLING) || CAPS_FEATURES_BACKFILLING
|
||||
int64_t dt_us; // Length of one sample in microseconds
|
||||
int64_t dt_us; // Length of one sample in microseconds
|
||||
#endif
|
||||
std::string uom;
|
||||
int timingQuality;
|
||||
std::string uom;
|
||||
int timingQuality;
|
||||
void *context;
|
||||
|
||||
size_t size() const { return buffer->size(); }
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<Packet> PacketPtr;
|
||||
|
||||
using PacketPtr = boost::shared_ptr<Packet>;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user