User Manual, Developers Guide and API Documentation

copper::Receiver Class Reference

A simple Receiver with configurable BER patterns. More...

#include <Receiver.hpp>

Inheritance diagram for copper::Receiver:

Inheritance graph
[legend]
Collaboration diagram for copper::Receiver:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Receiver (const wns::pyconfig::View &_pyco, WireInterface *_wire)
 Constructor.
virtual ~Receiver ()
 Destructor.
ReceiverInterface
virtual void onCollision ()
 Called, if a collision occured.
virtual void onCopperBusy ()
 Called, if the wire got busy.
virtual void onCopperFree ()
 Called, if the wire got free.
virtual bool onData (const BroadcastTransmissionPtr &transmission)
 Data (unicast) for this receiver arrived.
virtual bool onData (const UnicastTransmissionPtr &transmission)
 Data (unicast) for this receiver arrived.
wns::service::phy::copper::Notification
virtual void setDLLUnicastAddress (const wns::service::dll::UnicastAddress &_macAddress)
 This is used to set the address we want the copper to listen to.

Private Types

typedef
wns::service::phy::copper::CarrierSensing 
CarrierSensing
typedef
wns::service::phy::copper::Handler 
Handler

Private Attributes

wns::distribution::DistributionberDist
 Distribution of BER.
wns::logger::Logger logger
 Logger.
wns::service::dll::UnicastAddress macAddress
 MAC Address of the higher layerx.
simTimeType sensingTime
 Sensing time.
WireInterfacewire
 Wire, this receiver is listening to.

Classes

struct  OnData
 Used as functor to Handler::onDataCalls. More...


Detailed Description

The BER patterns can be any distribution available in WNS (or a combination of any distribution).

Definition at line 53 of file Receiver.hpp.


Member Typedef Documentation

Definition at line 61 of file Receiver.hpp.

Definition at line 58 of file Receiver.hpp.


Constructor & Destructor Documentation

Receiver::Receiver ( const wns::pyconfig::View _pyco,
WireInterface _wire 
)

Definition at line 36 of file Receiver.cpp.

Receiver::~Receiver (  )  [virtual]

Definition at line 49 of file Receiver.cpp.


Member Function Documentation

void Receiver::onCollision (  )  [virtual]

Implements copper::ReceiverInterface.

Definition at line 99 of file Receiver.cpp.

void Receiver::onCopperBusy (  )  [virtual]

Implements copper::ReceiverInterface.

Definition at line 90 of file Receiver.cpp.

void Receiver::onCopperFree (  )  [virtual]

Implements copper::ReceiverInterface.

Definition at line 81 of file Receiver.cpp.

virtual bool copper::Receiver::onData ( const BroadcastTransmissionPtr transmission  )  [virtual]

Each receiver implementation will need to check if the packet is good or bad. The current BER is also determined by the receiver. This leaves as much room for the implementation as possible.

Implements copper::ReceiverInterface.

bool Receiver::onData ( const UnicastTransmissionPtr transmission  )  [virtual]

Each receiver implementation will need to check if the packet is good or bad. The current BER is also determined by the receiver. This leaves as much room for the implementation as possible.

Implements copper::ReceiverInterface.

Definition at line 54 of file Receiver.cpp.

void Receiver::setDLLUnicastAddress ( const wns::service::dll::UnicastAddress macAddress  )  [virtual]

In reality this is of course not handled this way. There, the MAC is filtering the packets. But for efficiency reasons this "hint" is provided to the PHY.

Implements wns::service::phy::copper::Notification.

Definition at line 108 of file Receiver.cpp.


Member Data Documentation

Definition at line 141 of file Receiver.hpp.

Definition at line 154 of file Receiver.hpp.

Definition at line 131 of file Receiver.hpp.

This delays the onCarrierIdle and onCarrierBusy calls to the CarrierSensing instance

Definition at line 149 of file Receiver.hpp.

Definition at line 136 of file Receiver.hpp.


The documentation for this class was generated from the following files:

Generated on Sat May 26 03:32:29 2012 for openWNS by  doxygen 1.5.5