You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.7 KiB
C

/***************************************************************************
* 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