Commit bf588e4f authored by Joaquin Muguerza's avatar Joaquin Muguerza

Add probe total CN on reception

parent 3ff53b8d
......@@ -126,6 +126,7 @@ error:
BlockPhysicalLayer::Upward::Upward(const string &name, tal_id_t mac_id):
GroundPhysicalChannel(mac_id),
RtUpward(name),
probe_total_cn(NULL),
attenuation_hdl(NULL)
{
}
......@@ -153,6 +154,9 @@ bool BlockPhysicalLayer::Upward::onInit()
return true;
}
// Initialize the total CN probe
this->probe_total_cn = Output::registerProbe<float>("Phy.Total_cn", "dB", true, SAMPLE_LAST);
// Initialize the attenuation handler
this->attenuation_hdl = new AttenuationHandler(this->log_channel);
if(!this->attenuation_hdl->initialize(DOWNLINK_PHYSICAL_LAYER_SECTION,
......@@ -303,6 +307,9 @@ bool BlockPhysicalLayer::Upward::forwardPacketWithAttenuation(DvbFrame *dvb_fram
delete dvb_frame;
return false;
}
// Update probe
this->probe_total_cn->put(dvb_frame->getCn());
}
// Send frame to upper layer
......
......@@ -67,6 +67,10 @@ class BlockPhysicalLayer: public Block
*/
class Upward: public GroundPhysicalChannel, public RtUpward
{
private:
/// Probes
Probe<float> *probe_total_cn;
protected:
/// The attenuation process
AttenuationHandler *attenuation_hdl;
......
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