Corrected frame number
This commit is contained in:
parent
e518bbfedd
commit
6f6d46db01
|
@ -62,15 +62,15 @@ namespace gr {
|
||||||
pmt::pmt_t header_blob = pmt::car(msg);
|
pmt::pmt_t header_blob = pmt::car(msg);
|
||||||
pmt::pmt_t content = pmt::cdr(msg);
|
pmt::pmt_t content = pmt::cdr(msg);
|
||||||
gsmtap_hdr * header = (gsmtap_hdr *)pmt::blob_data(header_blob);
|
gsmtap_hdr * header = (gsmtap_hdr *)pmt::blob_data(header_blob);
|
||||||
uint32_t frame_nr = header->frame_number;
|
uint32_t frame_nr = be32toh(header->frame_number);
|
||||||
|
|
||||||
uint32_t fn_mod51 = header->frame_number % 51;
|
uint32_t fn_mod51 = frame_nr % 51;
|
||||||
int fn51_stop = d_fn51_start+3;
|
int fn51_stop = d_fn51_start+3;
|
||||||
|
|
||||||
if(header->timeslot==0){
|
if(header->timeslot==0){
|
||||||
if(fn_mod51>=d_fn51_start && fn_mod51<=fn51_stop){
|
if(fn_mod51>=d_fn51_start && fn_mod51<=fn51_stop){
|
||||||
uint32_t ii = fn_mod51-d_fn51_start;
|
uint32_t ii = fn_mod51-d_fn51_start;
|
||||||
d_frame_numbers[ii]=header->frame_number;
|
d_frame_numbers[ii]=frame_nr;
|
||||||
d_bursts[ii] = msg;
|
d_bursts[ii] = msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -823,10 +823,11 @@ void receiver_impl::send_burst(burst_counter burst_nr, const unsigned char * bur
|
||||||
tap_header->hdr_len = sizeof(gsmtap_hdr)/4;
|
tap_header->hdr_len = sizeof(gsmtap_hdr)/4;
|
||||||
tap_header->type = GSMTAP_TYPE_UM_BURST;
|
tap_header->type = GSMTAP_TYPE_UM_BURST;
|
||||||
tap_header->timeslot = static_cast<uint8_t>(d_burst_nr.get_timeslot_nr());
|
tap_header->timeslot = static_cast<uint8_t>(d_burst_nr.get_timeslot_nr());
|
||||||
tap_header->frame_number = d_burst_nr.get_frame_nr();
|
tap_header->frame_number = htobe32(d_burst_nr.get_frame_nr());
|
||||||
tap_header->sub_type = static_cast<uint8_t>(b_type);
|
tap_header->sub_type = static_cast<uint8_t>(b_type);
|
||||||
tap_header->arfcn = d_cell_allocation[input_nr];
|
tap_header->arfcn = d_cell_allocation[input_nr];
|
||||||
tap_header->signal_dbm = static_cast<int8_t>(d_signal_dbm);
|
tap_header->signal_dbm = static_cast<int8_t>(d_signal_dbm);
|
||||||
|
tap_header->snr_db = 0;
|
||||||
pmt::pmt_t header_blob=pmt::make_blob(tap_header.get(),sizeof(gsmtap_hdr));
|
pmt::pmt_t header_blob=pmt::make_blob(tap_header.get(),sizeof(gsmtap_hdr));
|
||||||
pmt::pmt_t burst_binary_blob=pmt::make_blob(burst_binary,BURST_SIZE);
|
pmt::pmt_t burst_binary_blob=pmt::make_blob(burst_binary,BURST_SIZE);
|
||||||
pmt::pmt_t msg = pmt::cons(header_blob, burst_binary_blob);
|
pmt::pmt_t msg = pmt::cons(header_blob, burst_binary_blob);
|
||||||
|
|
Loading…
Reference in New Issue