@Canis lupus:
With this thread and your other [1], I am unclear as to what you are trying to achieve, what data you have control over, what parts of the code is simulating data received, etc. |
Let's assume [1] doesn't exist, because [1] is trying to describe exactly the same problem, which is still unsolved at this moment.
In this thread I try to rephrase the question, because I might have provided wrong information in [1].
In fact the code in this thread is same with the one in [1], except that it is further simplified here.
(A). The parts that I
do NOT have control over:
1). The data type of
output_items
must be defined in this way (we cannot change the source code of GNU Radio)
1 2
|
typedef std::vector <void *> gr_vector_void_star;
gr_vector_void_star output_items;
| |
2). These data must be stored in such a way that each of them is exactly one character.
What we are in control is how
out
is defined and how it was manipulated.
Earlier it worked fine when I was using:
1 2 3 4 5
|
out[0] = "A";
out[1] = "n";
out[2] = "g";
out[3] = "e";
out[4] = "l";
| |
Then I try to play smart by doing below ,
it caused error.
1 2 3
|
char * sentence = "Angel";
for (int i=0; i < 5; i++)
{ out[i] = sentence[i]; }
| |
This (above error) is the problem that we need to solve.
3). The above stored data must be referenced by
output_items[0]
whenever we want to retrieve it later.
4). The
output_items.push_back(temp)
must be performed before
temp
,
out
and
display
are defined, because the former is part of GNU Radio source code whereas the latter (
temp
,
out
and
display
) is user-defined.
(B). The parts that are
up to us to define:
1). data type of
temp
and how it is manipulated
2). data type of
out
and how it is manipulated
3). data type of
display
and how it is manipulated