diff options
-rw-r--r-- | gr-vrt/src/vrt_source_32fc.cc | 2 | ||||
-rw-r--r-- | vrt/lib/expanded_header.cc | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gr-vrt/src/vrt_source_32fc.cc b/gr-vrt/src/vrt_source_32fc.cc index 483b6c246..9164ab9d8 100644 --- a/gr-vrt/src/vrt_source_32fc.cc +++ b/gr-vrt/src/vrt_source_32fc.cc @@ -105,7 +105,7 @@ rx_32fc_handler::operator()(const uint32_t *payload, // copy the context into struct so we cant reference bad memory // print the components of the struct, prove that it works! all_context_t if_context; - memcpy(((uint32_t*)&if_context) + 5, payload, sizeof(uint32_t)*n32_bit_words);//FIXME + memcpy(&if_context, payload, sizeof(uint32_t)*n32_bit_words);//FIXME fprintf(stderr, "\nIF-Context-Components:\n"); if_context.beamformer.rf_ref_freq = ntohll(if_context.beamformer.rf_ref_freq); fprintf(stderr, "Ref Freq %f Hz\n", vrt_freq_to_double(if_context.beamformer.rf_ref_freq)); diff --git a/vrt/lib/expanded_header.cc b/vrt/lib/expanded_header.cc index bd1d92e53..d7da06af4 100644 --- a/vrt/lib/expanded_header.cc +++ b/vrt/lib/expanded_header.cc @@ -112,6 +112,12 @@ namespace vrt { #include "expanded_header_switch_body.h" } + /* is this a if context packet? */ + if (ntohl(p[0]) & VRTH_PT_IF_CONTEXT){ + *payload = p; + *n32_bit_words_payload = n32_bit_words_packet; + } + return true; } |