A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
mesh-l2-routing-protocol.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008,2009 IITP RAS
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Authors: Kirill Andreev <andreev@iitp.ru>
7
* Pavel Boyko <boyko@iitp.ru>
8
*/
9
10
#include "
mesh-l2-routing-protocol.h
"
11
12
#include "
mesh-point-device.h
"
13
14
#include "ns3/log.h"
15
16
namespace
ns3
17
{
18
19
NS_LOG_COMPONENT_DEFINE
(
"MeshL2RoutingProtocol"
);
20
21
NS_OBJECT_ENSURE_REGISTERED
(MeshL2RoutingProtocol);
22
23
TypeId
24
MeshL2RoutingProtocol::GetTypeId
()
25
{
26
static
TypeId
tid =
27
TypeId
(
"ns3::MeshL2RoutingProtocol"
).
SetParent
<
Object
>().SetGroupName(
"Mesh"
);
28
return
tid;
29
}
30
31
MeshL2RoutingProtocol::~MeshL2RoutingProtocol
()
32
{
33
m_mp
=
nullptr
;
34
}
35
36
void
37
MeshL2RoutingProtocol::SetMeshPoint
(
Ptr<MeshPointDevice>
mp)
38
{
39
m_mp
= mp;
40
}
41
42
Ptr<MeshPointDevice>
43
MeshL2RoutingProtocol::GetMeshPoint
()
const
44
{
45
return
m_mp
;
46
}
47
48
}
// namespace ns3
ns3::MeshL2RoutingProtocol::~MeshL2RoutingProtocol
~MeshL2RoutingProtocol() override
virtual D-tor for subclasses
Definition
mesh-l2-routing-protocol.cc:31
ns3::MeshL2RoutingProtocol::SetMeshPoint
void SetMeshPoint(Ptr< MeshPointDevice > mp)
Set host mesh point, analog of SetNode (...) methods for upper layer protocols.
Definition
mesh-l2-routing-protocol.cc:37
ns3::MeshL2RoutingProtocol::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
mesh-l2-routing-protocol.cc:24
ns3::MeshL2RoutingProtocol::GetMeshPoint
Ptr< MeshPointDevice > GetMeshPoint() const
Each mesh protocol must be installed on the mesh point to work.
Definition
mesh-l2-routing-protocol.cc:43
ns3::MeshL2RoutingProtocol::m_mp
Ptr< MeshPointDevice > m_mp
Host mesh point.
Definition
mesh-l2-routing-protocol.h:132
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition
log.h:191
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
mesh-l2-routing-protocol.h
mesh-point-device.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
mesh
model
mesh-l2-routing-protocol.cc
Generated on Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0