[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r11048 - gnuradio/branches/developers/eb/vrt/vrt/apps
From: |
eb |
Subject: |
[Commit-gnuradio] r11048 - gnuradio/branches/developers/eb/vrt/vrt/apps |
Date: |
Mon, 18 May 2009 12:58:33 -0600 (MDT) |
Author: eb
Date: 2009-05-18 12:58:32 -0600 (Mon, 18 May 2009)
New Revision: 11048
Modified:
gnuradio/branches/developers/eb/vrt/vrt/apps/simple_rx_samples.cc
Log:
can now specify sample_per_pkt on cmd line
Modified: gnuradio/branches/developers/eb/vrt/vrt/apps/simple_rx_samples.cc
===================================================================
--- gnuradio/branches/developers/eb/vrt/vrt/apps/simple_rx_samples.cc
2009-05-15 17:48:12 UTC (rev 11047)
+++ gnuradio/branches/developers/eb/vrt/vrt/apps/simple_rx_samples.cc
2009-05-18 18:58:32 UTC (rev 11048)
@@ -23,6 +23,7 @@
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <errno.h>
#include <iostream>
#include <boost/scoped_ptr.hpp>
@@ -464,6 +465,7 @@
fprintf(stderr, " -N NSAMPLES specify number of samples to receive
[default=infinite]\n");
fprintf(stderr, " -o OUTPUT_FILENAME specify file to receive samples
[default=none]\n");
fprintf(stderr, " -s write complex<short>
[default=complex<float>]\n");
+ fprintf(stderr, " -S samples_per_pkt specify # of samples per pkt
[default=maximum]\n");
//fprintf(stderr, " -v verbose output\n");
}
@@ -479,6 +481,7 @@
char *output_filename = 0;
bool output_shorts = false;
int siggen_param = 0;
+ int t;
int ctrl_fd; // socket for control
struct in_addr ctrl_port_inaddr; // our ip addr
@@ -488,7 +491,7 @@
int ch;
- while ((ch = getopt(argc, argv, "hN:o:s")) != EOF){
+ while ((ch = getopt(argc, argv, "hN:o:sS:")) != EOF){
switch (ch){
case 'N':
nsamples = (uint64_t) strtod(optarg, 0);
@@ -502,6 +505,16 @@
output_shorts = true;
break;
+ case 'S':
+ errno = 0;
+ t = strtol(optarg, 0, 0);
+ if (errno != 0){
+ usage(argv[0]);
+ exit(1);
+ }
+ samples_per_pkt = t;
+ break;
+
case 'h':
default:
usage(argv[0]);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r11048 - gnuradio/branches/developers/eb/vrt/vrt/apps,
eb <=