Update to version 2
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include <gempa/caps/mseedpacket.h>
|
||||
#include <gempa/caps/rawpacket.h>
|
||||
|
||||
#include "mseed.h"
|
||||
#include "slink.h"
|
||||
@@ -27,23 +26,26 @@
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
|
||||
|
||||
namespace Gempa {
|
||||
namespace CAPS {
|
||||
|
||||
|
||||
MSEEDFormat::MSEEDFormat(const std::string &netcode, const std::string &stacode,
|
||||
const std::string &loccode, const std::string &chacode,
|
||||
unsigned short freqn, unsigned short freqd,
|
||||
unsigned short packtype_init,
|
||||
unsigned short packType,
|
||||
uint8_t recordLength)
|
||||
: networkCode(netcode), stationCode(stacode), locationCode(loccode),
|
||||
channelCode(chacode), packType(packtype_init), recordLength(recordLength)
|
||||
: networkCode(netcode)
|
||||
, stationCode(stacode)
|
||||
, locationCode(loccode)
|
||||
, channelCode(chacode)
|
||||
, packType(packType)
|
||||
, recordLength(recordLength)
|
||||
{
|
||||
if(freqn == 0 || freqd == 0) {
|
||||
sample_rate_factor = 0;
|
||||
@@ -63,8 +65,10 @@ MSEEDFormat::MSEEDFormat(const std::string &netcode, const std::string &stacode,
|
||||
}
|
||||
}
|
||||
|
||||
MSEEDDataRecord *MSEEDFormat::get_buffer(const SPClock::INT_TIME &it, int usec_correction,
|
||||
int timing_quality, void *&dataptr, int &datalen) {
|
||||
|
||||
MSEEDDataRecord *MSEEDFormat::getBuffer(const Time &it, int usec_correction,
|
||||
int timing_quality, void *&dataptr,
|
||||
int &datalen) {
|
||||
size_t buflen = 1 << recordLength;
|
||||
MSEEDDataRecord *record = new MSEEDDataRecord();
|
||||
record->data()->resize(buflen);
|
||||
@@ -151,12 +155,10 @@ void MSEEDFormat::updateBuffer(MSEEDDataRecord *rec, int samples, int frames) {
|
||||
if ( ntohs(blkt_1000->next_blkt) != 0 ) {
|
||||
sl_blkt_1001_s* blkt_1001 = (sl_blkt_1001_s *)((char *) fsdh +
|
||||
sizeof(sl_fsdh_s) + sizeof(sl_blkt_1000_s));
|
||||
|
||||
blkt_1001->frame_cnt = frames;
|
||||
}
|
||||
|
||||
rec->unpackHeader();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user