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
header.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Mathieu Lacage <mathieu.lacage@cutebugs.net>
7
*/
8
9
#include "
header.h
"
10
11
#include "ns3/log.h"
12
13
namespace
ns3
14
{
15
16
NS_LOG_COMPONENT_DEFINE
(
"Header"
);
17
18
NS_OBJECT_ENSURE_REGISTERED
(Header);
19
20
Header::~Header
()
21
{
22
NS_LOG_FUNCTION
(
this
);
23
}
24
25
TypeId
26
Header::GetTypeId
()
27
{
28
static
TypeId
tid =
TypeId
(
"ns3::Header"
).
SetParent
<
Chunk
>().SetGroupName(
"Network"
);
29
return
tid;
30
}
31
32
std::ostream&
33
operator<<
(std::ostream& os,
const
Header
& header)
34
{
35
header.
Print
(os);
36
return
os;
37
}
38
39
}
// namespace ns3
ns3::Chunk
abstract base class for ns3::Header and ns3::Trailer
Definition
chunk.h:25
ns3::Header
Protocol header serialization and deserialization.
Definition
header.h:33
ns3::Header::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
header.cc:26
ns3::Header::~Header
~Header() override
Definition
header.cc:20
ns3::Header::Print
void Print(std::ostream &os) const override=0
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_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition
log-macros-enabled.h:229
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
header.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition
angles.cc:148
src
network
model
header.cc
Generated on Sat Nov 2 2024 19:37:29 for ns-3 by
1.11.0