summaryrefslogtreecommitdiff
path: root/gr-run-waveform
diff options
context:
space:
mode:
authorRob Savoye2010-11-27 10:24:07 -0700
committerRob Savoye2010-11-27 10:24:07 -0700
commit156eaed5badf663c9a7658b7732a8f9f2cef24e4 (patch)
tree602285b828566bbf0628902f1b35a46bdc684328 /gr-run-waveform
parent17077b3ac9119c69d30228294f083380c22c5b9a (diff)
downloadgnuradio-156eaed5badf663c9a7658b7732a8f9f2cef24e4.tar.gz
gnuradio-156eaed5badf663c9a7658b7732a8f9f2cef24e4.tar.bz2
gnuradio-156eaed5badf663c9a7658b7732a8f9f2cef24e4.zip
try to create a new I/O port
Diffstat (limited to 'gr-run-waveform')
-rw-r--r--gr-run-waveform/test_xyzzy.cc48
1 files changed, 46 insertions, 2 deletions
diff --git a/gr-run-waveform/test_xyzzy.cc b/gr-run-waveform/test_xyzzy.cc
index 986746858..e75cf92e5 100644
--- a/gr-run-waveform/test_xyzzy.cc
+++ b/gr-run-waveform/test_xyzzy.cc
@@ -38,6 +38,45 @@ using namespace std;
boost::uint8_t hex2digit(boost::uint8_t digit);
boost::shared_array<boost::uint8_t> hex2mem(const std::string &str);
+SCM_DEFINE (scm_i_make_gnuradio,
+ "%gnuradio", 1, 0, 0,
+ (SCM port),
+ "Return a new port which reads and writes to @var{port}");
+#if 0
+#define FUNC_NAME s_scm_i_make_gnuradio
+{
+ SCM result;
+ unsigned long mode = 0;
+
+ SCM_VALIDATE_PORT (SCM_ARG1, port);
+
+ if (scm_is_true (scm_output_port_p (port)))
+ mode |= SCM_WRTNG;
+ else if (scm_is_true (scm_input_port_p (port)))
+ mode |= SCM_RDNG;
+
+ result = make_tp (port, mode);
+
+ return result;
+}
+#endif
+
+static SCM
+test_xyzzy (void)
+{
+ cerr << "FIXME:" << endl;
+ SCM port;
+ scm_input_port_p(port);
+}
+
+static void
+inner_main (void *data, int argc, char **argv)
+{
+ scm_c_define_gsubr ("test-xyzzy", 0, 0, 0, test_xyzzy);
+
+// scm_shell (argc, argv);
+}
+
int
main(int argc, char *argv[])
{
@@ -111,14 +150,19 @@ main(int argc, char *argv[])
}
// Return a C port that will read the file contents
-
+
+#if 0
if (xyzzy_make_read_only_port("gnuradio")) {
cout << "PASSED: xyzzy_make_read_only_port()" << endl;
} else {
cout << "FAILED: xyzzy_make_read_only_port()" << endl;
- }
+ }
+#endif
+
+ scm_boot_guile (argc, argv, inner_main, 0);
}
+
/// \brief Convert a Hex digit into it's decimal value.
///
/// @param digit The digit as a hex value