A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
mpi-receiver.cc
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: GPL-2.0-only
3 *
4 * Author: George Riley <riley@ece.gatech.edu>
5 */
6
7/**
8 * \file
9 * \ingroup mpi
10 * ns3::MpiReceiver implementation,
11 * provides an interface to aggregate to MPI-compatible NetDevices.
12 */
13
14#include "mpi-receiver.h"
15
16namespace ns3
17{
18
19TypeId
21{
22 static TypeId tid = TypeId("ns3::MpiReceiver")
24 .SetGroupName("Mpi")
25 .AddConstructor<MpiReceiver>();
26 return tid;
27}
28
32
33void
35{
36 m_rxCallback = callback;
37}
38
39void
45
46void
51
52} // namespace ns3
Callback template class.
Definition callback.h:422
bool IsNull() const
Check for null implementation.
Definition callback.h:555
Class to aggregate to a NetDevice if it supports MPI capability.
Callback< void, Ptr< Packet > > m_rxCallback
Callback to send received packets to.
void Receive(Ptr< Packet > p)
Direct an incoming packet to the device Receive() method.
static TypeId GetTypeId()
Register this type.
void DoDispose() override
Destructor implementation.
~MpiReceiver() override
void SetReceiveCallback(Callback< void, Ptr< Packet > > callback)
Set the receive callback to get packets to net devices.
A base class which provides memory management and object aggregation.
Definition object.h:78
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
Definition type-id.h:48
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition assert.h:55
Callback< R, Args... > MakeNullCallback()
Definition callback.h:727
ns3::MpiReceiver declaration, provides an interface to aggregate to MPI-compatible NetDevices.
Every class exported by the ns3 library is enclosed in the ns3 namespace.