ns-3 PLC model
 All Classes Functions Variables Enumerations
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
ns3::PLC_Phy Class Reference

#include <plc-phy.h>

Inheritance diagram for ns3::PLC_Phy:
ns3::PLC_HalfDuplexOfdmPhy ns3::PLC_ErrorRatePhy ns3::PLC_InformationRatePhy ns3::PLC_ChaseCombiningPhy

List of all members.

Public Member Functions

bool StartTx (Ptr< Packet > p)
void StartRx (Ptr< const Packet > p, uint32_t txId, Ptr< SpectrumValue > &rxPsd, Time duration, Ptr< const PLC_TrxMetaInfo > metaInfo)
void RxPsdChanged (uint32_t txId, Ptr< SpectrumValue > newRxPsd)
Ptr< PLC_NodeGetNode (void)
void SetDataFrameSentCallback (PLC_PhyDataFrameSentCallback c)
void SetReceiveSuccessCallback (PhyRxEndOkCallback c)
void SetReceiveErrorCallback (PhyRxEndErrorCallback c)
PLC_ChannelTransferImplGetChannelTransferImpl (Ptr< PLC_Phy > rxPhy)
Ptr< PLC_TransferBaseGetChannelTransferVector (Ptr< PLC_Phy > rxPhy)
void NotifyDataFrameSent (void)

Static Public Member Functions

static TypeId GetTypeId (void)
static void SetSymbolDuration (Time tSymbol)
 Set the global symbol duration value for all PHYs.
static Time GetSymbolDuration (void)

Protected Member Functions

virtual void DoStart (void)
virtual void DoDispose (void)
virtual bool DoStartTx (Ptr< Packet > p)=0
virtual void DoStartRx (Ptr< const Packet > p, uint32_t txId, Ptr< SpectrumValue > &rxPsd, Time duration, Ptr< const PLC_TrxMetaInfo > metaInfo)=0
virtual void DoUpdateRxPsd (uint32_t txId, Ptr< SpectrumValue > newRxPsd)=0
virtual PLC_ChannelTransferImplDoGetChannelTransferImpl (Ptr< PLC_Phy > rxPhy)=0

Protected Attributes

Ptr< PLC_Nodem_node
PLC_PhyDataFrameSentCallback m_data_frame_sent_callback
PhyRxEndOkCallback m_receive_success_cb
PhyRxEndErrorCallback m_receive_error_cb

Static Protected Attributes

static Time symbol_duration = MicroSeconds(2240)

Detailed Description

Abstract base class for PLC PHYs


Member Function Documentation

Returns:
Channel transfer implementation to rxPhy
Returns:
Channel transfer vector to rxPhy
Ptr<PLC_Node> ns3::PLC_Phy::GetNode ( void  ) [inline]
Returns:
PLC_Node the PHY is attached to
Time ns3::PLC_Phy::GetSymbolDuration ( void  ) [static]
Returns:
The global modulation symbol duration

Notify subclasses that data frame has been sent

void ns3::PLC_Phy::RxPsdChanged ( uint32_t  txId,
Ptr< SpectrumValue >  newRxPsd 
)

Notify the PLC_Phy instance that the Power Spectral Density of the incoming waveform transmitted by interface txId has changed to newRxPsd

Parameters:
txId
newRxPsd
void ns3::PLC_Phy::SetDataFrameSentCallback ( PLC_PhyDataFrameSentCallback  c)

Callback after a successful frame transmission

Parameters:
c
void ns3::PLC_Phy::SetReceiveErrorCallback ( PhyRxEndErrorCallback  c)

Callback for a failed datagram/message reception

Parameters:
c
void ns3::PLC_Phy::SetReceiveSuccessCallback ( PhyRxEndOkCallback  c)

Callback for a successful datagram/message reception

Parameters:
c
void ns3::PLC_Phy::SetSymbolDuration ( Time  tSymbol) [static]

Set the global symbol duration value for all PHYs.

This method should not be called directly, but by calling PLC_TimeModel::SetPeriodicityModel, as the simulations time resolution will be adapted to symbol granularity

Parameters:
tSymbolDuration of a modulation symbol
void ns3::PLC_Phy::StartRx ( Ptr< const Packet >  p,
uint32_t  txId,
Ptr< SpectrumValue > &  rxPsd,
Time  duration,
Ptr< const PLC_TrxMetaInfo metaInfo 
)

Notify the PLC_Phy instance of an incoming waveform

Parameters:
pthe Packet associated with the incoming waveform
rxPsdthe Power Spectral Density of the incoming
durationthe duration of the incoming waveform
metaInfometa information for link performance emulation
bool ns3::PLC_Phy::StartTx ( Ptr< Packet >  p)

Start transmitting a packet

Parameters:
pPacket
txPsdPower Spectral Density of the waveform to be transmitted
durationTime the packet needs for transmission
Returns:
True if PHY started transmission

The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations