Commit a1867413 authored by Joaquin Muguerza's avatar Joaquin Muguerza Committed by Aurélien Delrieu

Improve logs when BBFrame size is too big

parent c205ceda
......@@ -944,10 +944,8 @@ void ForwardSchedulingS2::schedulePending(const list<fmt_id_t> supported_modcods
void ForwardSchedulingS2::checkBBFrameSize(vector<CarriersGroupDama *>::iterator vcm_it,
vector<CarriersGroupDama *> vcm_carriers)
{
unsigned int max_modcod = 0;
unsigned int vcm_id = 0;
CarriersGroupDama *vcm = *vcm_it;
vol_sym_t max_bbframe_size_sym = 0;
vol_sym_t carrier_size_sym = vcm->getTotalCapacity() /
vcm->getCarriersNumber();
list<fmt_id_t> fmt_ids = vcm->getFmtIds();
......@@ -964,26 +962,18 @@ void ForwardSchedulingS2::checkBBFrameSize(vector<CarriersGroupDama *>::iterator
size))
{
LOG(this->log_scheduling, LEVEL_ERROR,
"Cannot determine the maximum BBFrame size\n");
break;
}
if(size > max_bbframe_size_sym)
{
max_modcod = fmt_id;
max_bbframe_size_sym = size;
"Cannot determine the maximum BBFrame size for MODCOD %u\n", fmt_id);
continue;
}
}
if(max_bbframe_size_sym > carrier_size_sym)
{
if(vcm_carriers.size() > 1)
{
LOG(this->log_scheduling, LEVEL_WARNING,
"Category %s, Carriers group %u VCM %u: the maximum "
"BBFrame size (%u symbols with MODCOD ID %u) is greater "
"than the carrier size %u. Certain MODCODs may not work.\n",
"Category %s, Carriers group %u VCM %u: the BBFrame size "
"with MODCOD %u (%u symbols) is greater than the carrier "
"size %u. This MODCOD will not work.\n",
this->category->getLabel().c_str(),
vcm->getCarriersId(), vcm_id, max_bbframe_size_sym,
max_modcod, carrier_size_sym);
vcm->getCarriersId(), vcm_id, fmt_id,
size, carrier_size_sym);
}
else
{
......@@ -991,21 +981,21 @@ void ForwardSchedulingS2::checkBBFrameSize(vector<CarriersGroupDama *>::iterator
{
LOG(this->log_scheduling, LEVEL_ERROR,
"Category %s, Carriers group %u: the BBFrame size "
"(%u symbols with MODCOD ID %u) is greater than "
"the carrier size %u.\n",
"of MODCOD %u (%u symbols) is greater than "
"the carrier size %u. This MODCOD will not work.\n",
this->category->getLabel().c_str(),
vcm->getCarriersId(), max_bbframe_size_sym,
max_modcod, carrier_size_sym);
vcm->getCarriersId(), fmt_id,
size, carrier_size_sym);
}
else
{
LOG(this->log_scheduling, LEVEL_WARNING,
"Category %s, Carriers group %u: the maximum BBFrame "
"size (%u symbols with MODCOD ID %u) is greater than "
"the carrier size %u. Certain MODCODs may not work.\n",
"Category %s, Carriers group %u: the BBFrame size "
"with MODCOD %u (%u symbols) is greater than the carrier "
"size %u. This MODCOD will not work.\n",
this->category->getLabel().c_str(),
vcm->getCarriersId(), max_bbframe_size_sym,
max_modcod, carrier_size_sym);
vcm->getCarriersId(), fmt_id,
size, carrier_size_sym);
}
}
}
......
......@@ -130,8 +130,6 @@ ScpcScheduling::ScpcScheduling(time_ms_t scpc_timer_ms,
Probe<int> *remain_probe;
Probe<int> *avail_probe;
char probe_name[128];
unsigned int max_modcod = 0;
vol_sym_t max_bbframe_size_sym = 0;
vol_sym_t carrier_size_sym = carriers->getTotalCapacity() /
carriers->getCarriersNumber();
list<fmt_id_t> fmt_ids = carriers->getFmtIds();
......@@ -149,27 +147,19 @@ ScpcScheduling::ScpcScheduling(time_ms_t scpc_timer_ms,
{
LOG(this->log_scheduling, LEVEL_ERROR,
"Cannot determine the maximum BBFrame size\n");
break;
}
if(size > max_bbframe_size_sym)
{
max_modcod = fmt_id;
max_bbframe_size_sym = size;
continue;
}
}
if(max_bbframe_size_sym > carrier_size_sym)
{
// send a warning message, this will work but this is not
// a good configuration
// if there is more than one carrier, this won't really
// be a problem but this won't be representative
LOG(this->log_scheduling, LEVEL_WARNING,
"Category %s, Carriers group %u : the maximum "
"BBFrame size (%u symbols with MODCOD ID %u) is greater "
"than the carrier size %u\n",
"Category %s, Carriers group %u : the BBFrame size "
"with MODCOD %u (%u symbols) is greater than the carrier "
"size %u. This MODCOD will not work.\n",
this->category->getLabel().c_str(),
carriers->getCarriersId(), max_bbframe_size_sym,
max_modcod, carrier_size_sym);
carriers->getCarriersId(), fmt_id,
size, carrier_size_sym);
}
// For units, if there is only one MODCOD use Kbits/s else symbols
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment