User Manual, Developers Guide and API Documentation

copper::WireInterface Class Reference

Defines the connection between 'n' Transmitters/Receivers. More...

#include <Wire.hpp>

Inheritance diagram for copper::WireInterface:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void addReceiver (ReceiverInterface *r, const wns::service::dll::UnicastAddress &macAddress)=0
 Receiver need to register themselves via this method.
virtual simTimeType blockedSince () const =0
 Returns the time for which the medium has been blocked.
virtual void sendData (const BroadcastTransmissionPtr &bt, simTimeType duration)=0
 Send data (Boradcast Transmission).
virtual void sendData (const UnicastTransmissionPtr &ut, simTimeType duration)=0
 Send data (Unicast Transmission).
virtual void stopTransmission (const wns::osi::PDUPtr &pdu)=0
 Stops a transmission before the duration specified in send data is reached.
virtual ~WireInterface ()
 Destructor.


Detailed Description

A wire instance allows a Transmitter to send data to a Receiver connected to the same wire instance. The number of Receivers connected to a wire is unlimted. If one transmission is active the wire is blocked. If another transmitter will transmit although the wire is not free a collision will occur.

Definition at line 59 of file Wire.hpp.


Constructor & Destructor Documentation

virtual copper::WireInterface::~WireInterface (  )  [inline, virtual]

Definition at line 66 of file Wire.hpp.


Member Function Documentation

virtual void copper::WireInterface::addReceiver ( ReceiverInterface r,
const wns::service::dll::UnicastAddress macAddress 
) [pure virtual]

Implemented in copper::Wire.

virtual simTimeType copper::WireInterface::blockedSince (  )  const [pure virtual]

Three different groups of return values must be distinguished:

  • values < 0.0: The wire is free

  • values == 0.0: A transmission has just been started (at exactly the same time, the wire is asked)

  • values > 0.0: A transmission is ongoing since "value" seconds

Implemented in copper::Wire.

virtual void copper::WireInterface::sendData ( const BroadcastTransmissionPtr bt,
simTimeType  duration 
) [pure virtual]

Parameters:
bt Data (broadcast) to be sent
duration The duration of the data transmission

Implemented in copper::Wire, and copper::Wire.

virtual void copper::WireInterface::sendData ( const UnicastTransmissionPtr ut,
simTimeType  duration 
) [pure virtual]

Parameters:
ut Data (unicast) to be sent
duration The duration of the data transmission

Implemented in copper::Wire, and copper::Wire.

virtual void copper::WireInterface::stopTransmission ( const wns::osi::PDUPtr pdu  )  [pure virtual]

Note:
this is only needed in case the transmission needs to be stopped BEFORE the duration that has been provided to send data is elapsed.


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

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