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
trailer.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 "
trailer.h
"
10
11
#include "ns3/log.h"
12
13
namespace
ns3
14
{
15
16
NS_LOG_COMPONENT_DEFINE
(
"Trailer"
);
17
18
NS_OBJECT_ENSURE_REGISTERED
(Trailer);
19
20
Trailer::~Trailer
()
21
{
22
NS_LOG_FUNCTION
(
this
);
23
}
24
25
TypeId
26
Trailer::GetTypeId
()
27
{
28
static
TypeId
tid =
TypeId
(
"ns3::Trailer"
).
SetParent
<
Chunk
>().SetGroupName(
"Network"
);
29
return
tid;
30
}
31
32
// This default implementation is provided for backward compatibility
33
// reasons. Subclasses should implement this method themselves.
34
uint32_t
35
Trailer::Deserialize
(
Buffer::Iterator
start,
Buffer::Iterator
end)
36
{
37
return
Deserialize
(end);
38
}
39
40
std::ostream&
41
operator<<
(std::ostream& os,
const
Trailer
& trailer)
42
{
43
trailer.
Print
(os);
44
return
os;
45
}
46
47
}
// namespace ns3
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::Chunk
abstract base class for ns3::Header and ns3::Trailer
Definition
chunk.h:25
ns3::Trailer
Protocol trailer serialization and deserialization.
Definition
trailer.h:30
ns3::Trailer::~Trailer
~Trailer() override
Definition
trailer.cc:20
ns3::Trailer::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
trailer.cc:26
ns3::Trailer::Print
void Print(std::ostream &os) const override=0
ns3::Trailer::Deserialize
uint32_t Deserialize(Buffer::Iterator end) 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
uint32_t
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
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
trailer.h
src
network
model
trailer.cc
Generated on Fri Nov 8 2024 13:59:05 for ns-3 by
1.11.0