|
ns-3
|
#include <mpi-receiver.h>


Public Member Functions | |
| void | Receive (Ptr< Packet > p) |
| Direct an incoming packet to the device Receive() method. | |
| void | SetReceiveCallback (Callback< void, Ptr< Packet > > callback) |
| Set the receive callback to get packets to net devices. | |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| This method returns the TypeId associated to ns3::Object. | |
Class to aggregate to a NetDevice if it supports MPI capability
MpiInterface::ReceiveMessages () needs to send packets to a NetDevice Receive() method. Since each NetDevice's Receive() method is specific to the derived class, and since we do not know whether such a NetDevice is MPI-capable, we aggregate one of these objects to each MPI-capable device. In addition, we must hook up a NetDevice::Receive() method to the callback. So the two steps to enable MPI capability are to aggregate this object to a NetDevice, and to set the callback.
| TypeId ns3::MpiReceiver::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::Object.
This object is accessible through the following paths with Config::Set and Config::Connect:
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::Object.
References ns3::TypeId::SetParent().
| void ns3::MpiReceiver::Receive | ( | Ptr< Packet > | p | ) |
Direct an incoming packet to the device Receive() method.
| p | Packet to receive |
References NS_ASSERT.
Referenced by ns3::MpiInterface::ReceiveMessages().
| void ns3::MpiReceiver::SetReceiveCallback | ( | Callback< void, Ptr< Packet > > | callback | ) |
Set the receive callback to get packets to net devices.
| callback | the callback itself |