[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 14/50: controlport: Thrift's binary type
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 14/50: controlport: Thrift's binary type |
Date: |
Wed, 15 Apr 2015 21:07:53 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 6dd37d48d3b24997ec95f2302df75deef4211fa3
Author: Nate Goergen <address@hidden>
Date: Sat Feb 28 21:45:15 2015 -0600
controlport: Thrift's binary type
* Convert list<byte> "VectorC" to use Thrift 'binary' data type for
efficiency
---
gnuradio-runtime/lib/controlport/thrift/gnuradio.thrift | 2 +-
gnuradio-runtime/lib/controlport/thrift/rpcpmtconverters_thrift.cc | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gnuradio-runtime/lib/controlport/thrift/gnuradio.thrift
b/gnuradio-runtime/lib/controlport/thrift/gnuradio.thrift
index f261229..66fbd63 100644
--- a/gnuradio-runtime/lib/controlport/thrift/gnuradio.thrift
+++ b/gnuradio-runtime/lib/controlport/thrift/gnuradio.thrift
@@ -28,7 +28,7 @@ struct complex {
}
typedef list<bool> VectorB
-typedef list<byte> VectorC
+typedef binary VectorC
typedef list<i16> VectorT
typedef list<i32> VectorI
typedef list<i64> VectorL
diff --git a/gnuradio-runtime/lib/controlport/thrift/rpcpmtconverters_thrift.cc
b/gnuradio-runtime/lib/controlport/thrift/rpcpmtconverters_thrift.cc
index 27573af..9541f18 100644
--- a/gnuradio-runtime/lib/controlport/thrift/rpcpmtconverters_thrift.cc
+++ b/gnuradio-runtime/lib/controlport/thrift/rpcpmtconverters_thrift.cc
@@ -113,7 +113,7 @@ rpcpmtconverter::from_pmt(const pmt::pmt_t& knob)
result.type = GNURadio::BaseTypes::S8VECTOR;
size_t size(pmt::length(knob));
const int8_t* start((const int8_t*)pmt::s8vector_elements(knob,size));
- result.value.__set_a_s8vector(std::vector<int8_t>(start,start+size));
+ result.value.__set_a_s8vector(std::basic_string<char>(start,start+size));
return result;
}
else if(pmt::is_c32vector(knob)) {
@@ -193,8 +193,8 @@ rpcpmtconverter::to_pmt(const GNURadio::Knob& knob)
return pmt::init_s16vector(v.size(), v);
}
else if(knob.type == GNURadio::BaseTypes::S8VECTOR) {
- std::vector<int8_t> v = knob.value.a_s8vector;
- return pmt::init_s8vector(v.size(), v);
+ std::basic_string<char> v = knob.value.a_s8vector;
+ return pmt::init_s8vector(v.size(), reinterpret_cast<const
int8_t*>(v.data()));
}
else if(knob.type == GNURadio::BaseTypes::C32VECTOR) {
std::vector<GNURadio::complex> v0 = knob.value.a_c32vector;
- [Commit-gnuradio] [gnuradio] 06/50: controlport: quick fix, (continued)
- [Commit-gnuradio] [gnuradio] 06/50: controlport: quick fix, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 02/50: ctrlport: thrift: "py" instead of "python" -- guessing a version thing, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 04/50: controlport: restructuring to add subdirs for different cp backends., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 18/50: controlport: improving transport layer throughput., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 07/50: controlport: Addes a FindThrift cmake module to find the Thrift headers, libraries, and Python files., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 17/50: controlport: convert to To_PMT registration objects, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 20/50: runtime: more generic version of prefs class., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 22/50: cmake: force QA tests to turn ControlPort off by default., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 15/50: controlport: convert rpcpmtconverter::to_pmt() if statement to a function object map, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 01/50: Initial thrift definition for gnuradio, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 14/50: controlport: Thrift's binary type,
git <=
- [Commit-gnuradio] [gnuradio] 09/50: controlport: cleanup and switching over to new Python common interface., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 23/50: controlport: cleaning up and using logger to display endpoint., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 34/50: controlport: replacement of nanosleep() with boost::sleep() in startup thread. Fix of merge error in booter_thrift., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 28/50: controlport: more cleaning up., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 31/50: controlport: moving the logger call that publishes Thrift's endpoint to i_impl()., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 24/50: controlport: adding performance and controlport monitor GRC blocks., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 29/50: controlport: changing the default port number on the Thrift interface to zero., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 21/50: controlport: Adds ability to configure Thrift through a config file, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 30/50: controlport: ephemeral / unused port number selection by OS working., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 13/50: controlport: using threaded server for multiple connections., git, 2015/04/16