A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
mpi
model
mpi-receiver.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* This program is free software; you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License version 2 as
5
* published by the Free Software Foundation;
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software
14
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15
*
16
* Author: George Riley <riley@ece.gatech.edu>
17
*/
18
19
// Provides an interface to aggregate to MPI-compatible NetDevices
20
21
#ifndef NS3_MPI_RECEIVER_H
22
#define NS3_MPI_RECEIVER_H
23
24
#include "ns3/object.h"
25
#include "ns3/packet.h"
26
27
namespace
ns3
{
28
42
class
MpiReceiver
:
public
Object
43
{
44
public
:
45
static
TypeId
GetTypeId
(
void
);
46
virtual
~MpiReceiver
();
47
52
void
Receive
(
Ptr<Packet>
p);
57
void
SetReceiveCallback
(
Callback
<
void
,
Ptr<Packet>
> callback);
58
private
:
59
virtual
void
DoDispose
(
void
);
60
61
Callback<void, Ptr<Packet>
>
m_rxCallback
;
62
};
63
64
}
// namespace ns3
65
66
#endif
/* NS3_MPI_RECEIVER_H */
ns3::Ptr< Packet >
ns3::Callback
Callback template class.
Definition:
callback.h:1176
ns3::MpiReceiver::~MpiReceiver
virtual ~MpiReceiver()
Definition:
mpi-receiver.cc:33
ns3::MpiReceiver::GetTypeId
static TypeId GetTypeId(void)
Definition:
mpi-receiver.cc:24
ns3::MpiReceiver::Receive
void Receive(Ptr< Packet > p)
Direct an incoming packet to the device Receive() method.
Definition:
mpi-receiver.cc:44
ns3::MpiReceiver
Class to aggregate to a NetDevice if it supports MPI capability.
Definition:
mpi-receiver.h:42
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::MpiReceiver::m_rxCallback
Callback< void, Ptr< Packet > > m_rxCallback
Definition:
mpi-receiver.h:61
ns3::MpiReceiver::SetReceiveCallback
void SetReceiveCallback(Callback< void, Ptr< Packet > > callback)
Set the receive callback to get packets to net devices.
Definition:
mpi-receiver.cc:38
ns3::MpiReceiver::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition:
mpi-receiver.cc:51
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:87
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
Generated on Wed Nov 7 2018 10:02:06 for ns-3 by
1.8.14