Initial commit based on common repo commit ffeb9c9b
This commit is contained in:
44
libs/gempa/caps/mseed/packet.h
Normal file
44
libs/gempa/caps/mseed/packet.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2012 by gempa GmbH *
|
||||
* *
|
||||
* All Rights Reserved. *
|
||||
* *
|
||||
* NOTICE: All information contained herein is, and remains *
|
||||
* the property of gempa GmbH and its suppliers, if any. The intellectual *
|
||||
* and technical concepts contained herein are proprietary to gempa GmbH *
|
||||
* and its suppliers. *
|
||||
* Dissemination of this information or reproduction of this material *
|
||||
* is strictly forbidden unless prior written permission is obtained *
|
||||
* from gempa GmbH. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CAPS_MSEED_PACKET_H
|
||||
#define CAPS_MSEED_PACKET_H
|
||||
|
||||
#include <gempa/caps/mseedpacket.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Gempa {
|
||||
namespace CAPS {
|
||||
|
||||
template<typename T> struct MSEEDEncoderPacket {
|
||||
MSEEDEncoderPacket(): record(NULL), data(NULL), datalen(0) {}
|
||||
MSEEDEncoderPacket(MSEEDDataRecord *rec, unsigned int size_init,
|
||||
void *data_init, unsigned short datalen_init)
|
||||
: record(rec), data(static_cast<T*>(data_init)),
|
||||
datalen(datalen_init) {}
|
||||
~MSEEDEncoderPacket() {}
|
||||
|
||||
void reset() { record = NULL; data = NULL; datalen = 0; }
|
||||
bool valid() const { return record != NULL; }
|
||||
|
||||
MSEEDDataRecord *record;
|
||||
T *data;
|
||||
unsigned short datalen;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user