|
|
@ -454,13 +454,17 @@ int sch_subh::get_bsr(uint32_t buff_size[4])
|
|
|
|
|
|
|
|
|
|
|
|
bool sch_subh::get_next_mch_sched_info(uint8_t *lcid_, uint16_t *mtch_stop)
|
|
|
|
bool sch_subh::get_next_mch_sched_info(uint8_t *lcid_, uint16_t *mtch_stop)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
uint16_t mtch_stop_ce;
|
|
|
|
if(payload) {
|
|
|
|
if(payload) {
|
|
|
|
nof_mch_sched_ce = nof_bytes/2;
|
|
|
|
nof_mch_sched_ce = nof_bytes/2;
|
|
|
|
if (cur_mch_sched_ce < nof_mch_sched_ce) {
|
|
|
|
if (cur_mch_sched_ce < nof_mch_sched_ce) {
|
|
|
|
*lcid_ = (payload[cur_mch_sched_ce * 2] & 0xF8) >> 3;
|
|
|
|
*lcid_ = (payload[cur_mch_sched_ce * 2] & 0xF8) >> 3;
|
|
|
|
*mtch_stop = ((uint16_t)(payload[cur_mch_sched_ce * 2] & 0x07)) << 8;
|
|
|
|
mtch_stop_ce = ((uint16_t)(payload[cur_mch_sched_ce * 2] & 0x07)) << 8;
|
|
|
|
*mtch_stop += payload[cur_mch_sched_ce * 2 + 1];
|
|
|
|
mtch_stop_ce += payload[cur_mch_sched_ce * 2 + 1];
|
|
|
|
cur_mch_sched_ce++;
|
|
|
|
cur_mch_sched_ce++;
|
|
|
|
|
|
|
|
*mtch_stop = (mtch_stop_ce == srslte::mch_subh::MTCH_STOP_EMPTY)
|
|
|
|
|
|
|
|
? (0)
|
|
|
|
|
|
|
|
: (mtch_stop_ce);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -613,8 +617,11 @@ bool sch_subh::set_ta_cmd(uint8_t ta_cmd)
|
|
|
|
bool sch_subh::set_next_mch_sched_info(uint8_t lcid_, uint16_t mtch_stop)
|
|
|
|
bool sch_subh::set_next_mch_sched_info(uint8_t lcid_, uint16_t mtch_stop)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (((sch_pdu*)parent)->has_space_ce(2, true)) {
|
|
|
|
if (((sch_pdu*)parent)->has_space_ce(2, true)) {
|
|
|
|
w_payload_ce[nof_mch_sched_ce*2] = (lcid_&0x1F) << 3 | (uint8_t) ((mtch_stop&0x0700)>>8);
|
|
|
|
uint16_t mtch_stop_ce =
|
|
|
|
w_payload_ce[nof_mch_sched_ce*2+1] = (uint8_t) (mtch_stop&0xff);
|
|
|
|
(mtch_stop) ? (mtch_stop) : (srslte::mch_subh::MTCH_STOP_EMPTY);
|
|
|
|
|
|
|
|
w_payload_ce[nof_mch_sched_ce * 2] =
|
|
|
|
|
|
|
|
(lcid_ & 0x1F) << 3 | (uint8_t)((mtch_stop_ce & 0x0700) >> 8);
|
|
|
|
|
|
|
|
w_payload_ce[nof_mch_sched_ce * 2 + 1] = (uint8_t)(mtch_stop_ce & 0xff);
|
|
|
|
nof_mch_sched_ce++;
|
|
|
|
nof_mch_sched_ce++;
|
|
|
|
lcid = MCH_SCHED_INFO;
|
|
|
|
lcid = MCH_SCHED_INFO;
|
|
|
|
((sch_pdu*)parent)->update_space_ce(2, true);
|
|
|
|
((sch_pdu*)parent)->update_space_ce(2, true);
|
|
|
|