diff options
author | Tom Rondeau <tom@trondeau.com> | 2015-07-24 17:25:57 -0400 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2015-07-24 17:25:57 -0400 |
commit | 3a7f237cfa8f17b5f39de13cb273aa7efdc5f652 (patch) | |
tree | 975674a8ca3f3951205fabd9ebdf75d9066a1b70 /gnuradio-runtime/lib/controlport | |
parent | 65d6523bf2b6d223766d07e250658bd671dfe663 (diff) |
controlport: Adding support for building Java clients.
Java has a hard time with unions (or our way of doing things produces
problems in Java). Using a struct instead does not change any
server-side or client-side code, and only seems to increase the
network packet size by 2 bytes.
Diffstat (limited to 'gnuradio-runtime/lib/controlport')
-rw-r--r-- | gnuradio-runtime/lib/controlport/thrift/gnuradio.thrift | 3 | ||||
-rw-r--r-- | gnuradio-runtime/lib/controlport/thrift/rpcserver_thrift.cc | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/controlport/thrift/gnuradio.thrift b/gnuradio-runtime/lib/controlport/thrift/gnuradio.thrift index ae7f839a2f..023e9fd788 100644 --- a/gnuradio-runtime/lib/controlport/thrift/gnuradio.thrift +++ b/gnuradio-runtime/lib/controlport/thrift/gnuradio.thrift @@ -21,6 +21,7 @@ namespace cpp GNURadio namespace py GNURadio +namespace java org.gnuradio.controlport struct complex { 1: double re; @@ -41,7 +42,7 @@ enum BaseTypes { BOOL, BYTE, SHORT, INT, LONG, DOUBLE, STRING, COMPLEX, F32VECTOR, F64VECTOR, S64VECTOR, S32VECTOR, S16VECTOR, S8VECTOR, C32VECTOR } -union KnobBase { +struct KnobBase { 1: bool a_bool; 2: byte a_byte; 3: i16 a_short; diff --git a/gnuradio-runtime/lib/controlport/thrift/rpcserver_thrift.cc b/gnuradio-runtime/lib/controlport/thrift/rpcserver_thrift.cc index 3e6eabc854..e33fea457a 100644 --- a/gnuradio-runtime/lib/controlport/thrift/rpcserver_thrift.cc +++ b/gnuradio-runtime/lib/controlport/thrift/rpcserver_thrift.cc @@ -133,7 +133,6 @@ rpcserver_thrift::setKnobs(const GNURadio::KnobMap& knobs) (d_setcallbackmap, cur_priv)); } - void rpcserver_thrift::getKnobs(GNURadio::KnobMap& _return, const GNURadio::KnobIDList& knobs) |