[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7336 - usrp2/branches/developers/eb/u2/host/apps
From: |
eb |
Subject: |
[Commit-gnuradio] r7336 - usrp2/branches/developers/eb/u2/host/apps |
Date: |
Thu, 3 Jan 2008 23:55:24 -0700 (MST) |
Author: eb
Date: 2008-01-03 23:55:23 -0700 (Thu, 03 Jan 2008)
New Revision: 7336
Modified:
usrp2/branches/developers/eb/u2/host/apps/rx_samples.cc
usrp2/branches/developers/eb/u2/host/apps/tx_samples.cc
Log:
added -e ethN option to allow host interface to be specified
Modified: usrp2/branches/developers/eb/u2/host/apps/rx_samples.cc
===================================================================
--- usrp2/branches/developers/eb/u2/host/apps/rx_samples.cc 2008-01-04
06:42:07 UTC (rev 7335)
+++ usrp2/branches/developers/eb/u2/host/apps/rx_samples.cc 2008-01-04
06:55:23 UTC (rev 7336)
@@ -47,7 +47,7 @@
static void
usage(const char *progname)
{
- fprintf(stderr, "usage: %s [-o <output_file> ] [-N nsamples] [-h]\n",
+ fprintf(stderr, "usage: %s [-o <output_file> ] [-N nsamples] [-h] [-e
ethN]\n",
progname);
}
@@ -56,9 +56,10 @@
{
int ch;
const char *output_filename = "samples.dat";
+ const char *interface = "eth0";
ssize_t nsamples = -1; // inf
- while ((ch = getopt(argc, argv, "o:N:h")) != EOF){
+ while ((ch = getopt(argc, argv, "o:N:he:")) != EOF){
switch (ch){
case 'o':
output_filename = optarg;
@@ -68,6 +69,10 @@
nsamples = strtol(optarg, 0, 0);
break;
+ case 'e':
+ interface = optarg;
+ break;
+
case 'h':
default:
usage(argv[0]);
@@ -77,7 +82,6 @@
FILE *of = fopen(output_filename, "wb");
- const char *interface = "eth0";
usrp2_basic *u2 = new usrp2_basic();
if (!u2->open(interface)){
Modified: usrp2/branches/developers/eb/u2/host/apps/tx_samples.cc
===================================================================
--- usrp2/branches/developers/eb/u2/host/apps/tx_samples.cc 2008-01-04
06:42:07 UTC (rev 7335)
+++ usrp2/branches/developers/eb/u2/host/apps/tx_samples.cc 2008-01-04
06:55:23 UTC (rev 7336)
@@ -32,7 +32,7 @@
static void
usage(const char *progname)
{
- fprintf(stderr, "usage: %s [-h] [-r] [-i <input_file>]\n",
+ fprintf(stderr, "usage: %s [-h] [-r] [-i <input_file>] [-e ethN]\n",
progname);
}
@@ -41,11 +41,12 @@
{
int ch;
const char *input_filename = 0;
+ const char *interface = "eth0";
size_t nsamples_per_pkt = 250;
bool repeat = false;
- while ((ch = getopt(argc, argv, "i:hr")) != EOF){
+ while ((ch = getopt(argc, argv, "i:hre:")) != EOF){
switch (ch){
case 'r':
repeat = true;
@@ -55,6 +56,10 @@
input_filename = optarg;
break;
+ case 'e':
+ interface = optarg;
+ break;
+
case 'h':
default:
usage(argv[0]);
@@ -73,7 +78,6 @@
}
}
- const char *interface = "eth0";
usrp2_basic *u2 = new usrp2_basic();
if (!u2->open(interface)){
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7336 - usrp2/branches/developers/eb/u2/host/apps,
eb <=