Commit 01307d47 authored by Matteo Quintiliani's avatar Matteo Quintiliani
Browse files

Added x_1


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@138 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 774ef715
......@@ -189,7 +189,7 @@ int nmxp_data_seed_init(NMXP_DATA_SEED *data_seed);
* \return Returns the number records created on success and -1 on error. Return value of msr_pack().
*
*/
int nmxp_data_msr_pack(NMXP_DATA_PROCESS *pd, NMXP_DATA_SEED *data_seed, void *pmsr);
int nmxp_data_msr_pack(NMXP_DATA_PROCESS *pd, NMXP_DATA_SEED *data_seed, void *pmsr, int32_t x_1);
/*! \brief Swap 2 bytes.
......
......@@ -436,7 +436,7 @@ int nmxp_data_seed_init(NMXP_DATA_SEED *data_seed) {
}
int nmxp_data_msr_pack(NMXP_DATA_PROCESS *pd, NMXP_DATA_SEED *data_seed, void *pmsr) {
int nmxp_data_msr_pack(NMXP_DATA_PROCESS *pd, NMXP_DATA_SEED *data_seed, void *pmsr, int32_t x_1) {
int ret =0;
MSRecord *msr = pmsr;
......@@ -474,7 +474,7 @@ int nmxp_data_msr_pack(NMXP_DATA_PROCESS *pd, NMXP_DATA_SEED *data_seed, void *p
/* msr_print(msr, 2); */
/* Pack the record(s) */
precords = msr_pack (msr, &nmxp_data_msr_write_handler, data_seed->srcname, &psamples, 1, verbose);
precords = msr_pack (msr, &nmxp_data_msr_write_handler, data_seed->srcname, &psamples, 1, verbose, x_1);
if ( precords == -1 )
ms_log (2, "Cannot pack records\n");
......
......@@ -25,6 +25,7 @@
typedef struct {
int significant;
double last_time;
int32_t x_1;
} NMXPTOOL_CHAN_SEQ;
......@@ -142,6 +143,7 @@ int main (int argc, char **argv) {
for(i_chan = 0; i_chan < channelList_subset->number; i_chan++) {
channelListSeq[i_chan].significant = 0;
channelListSeq[i_chan].last_time = 0.0;
channelListSeq[i_chan].x_1 = 0;
}
#ifdef HAVE_LIBMSEED
......@@ -304,13 +306,14 @@ int main (int argc, char **argv) {
if(params.flag_writeseed) {
if( (cur_chan = nmxp_chan_lookupKeyIndex(pd->key, channelList_subset)) != -1) {
nmxp_data_msr_pack(pd, &data_seed, msr_list_chan[cur_chan]);
nmxp_data_msr_pack(pd, &data_seed, msr_list_chan[cur_chan], channelListSeq[cur_chan].x_1);
} else {
nmxp_log(1, 0, "Key %d not found in channelList_subset!\n", pd->key);
}
}
#endif
channelListSeq[cur_chan].x_1 = pd->pDataPtr[pd->nSamp-1];
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
/* Send data to SeedLink Server */
......@@ -457,13 +460,14 @@ int main (int argc, char **argv) {
if(params.flag_writeseed) {
if( (cur_chan = nmxp_chan_lookupKeyIndex(pd->key, channelList_subset)) != -1) {
nmxp_data_msr_pack(pd, &data_seed, msr_list_chan[cur_chan]);
nmxp_data_msr_pack(pd, &data_seed, msr_list_chan[cur_chan], channelListSeq[cur_chan].x_1);
} else {
nmxp_log(1, 0, "Key %d not found in channelList_subset!\n", pd->key);
}
}
#endif
channelListSeq[cur_chan].x_1 = pd->pDataPtr[pd->nSamp-1];
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
/* Send data to SeedLink Server */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment