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
seq-ts-size-header.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 INRIA
3
* Copyright (c) 2018 Natale Patriciello <natale.patriciello@gmail.com>
4
* (added timestamp and size fields)
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation;
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
*/
19
20
#ifndef SEQ_TS_SIZE_HEADER_H
21
#define SEQ_TS_SIZE_HEADER_H
22
23
#include "
seq-ts-header.h
"
24
25
namespace
ns3
26
{
27
/**
28
* \ingroup applications
29
* \brief Header with a sequence, a timestamp, and a "size" attribute
30
*
31
* This header adds a size attribute to the sequence number and timestamp
32
* of class \c SeqTsHeader. The size attribute can be used to track
33
* application data units for stream-based sockets such as TCP.
34
*
35
* \sa ns3::SeqTsHeader
36
*/
37
class
SeqTsSizeHeader
:
public
SeqTsHeader
38
{
39
public
:
40
/**
41
* \brief Get the type ID.
42
* \return the object TypeId
43
*/
44
static
TypeId
GetTypeId
();
45
46
/**
47
* \brief constructor
48
*/
49
SeqTsSizeHeader
();
50
51
/**
52
* \brief Set the size information that the header will carry
53
* \param size the size
54
*/
55
void
SetSize
(uint64_t size);
56
57
/**
58
* \brief Get the size information that the header is carrying
59
* \return the size
60
*/
61
uint64_t
GetSize
()
const
;
62
63
// Inherited
64
TypeId
GetInstanceTypeId
()
const override
;
65
void
Print
(std::ostream& os)
const override
;
66
uint32_t
GetSerializedSize
()
const override
;
67
void
Serialize
(
Buffer::Iterator
start)
const override
;
68
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
69
70
private
:
71
uint64_t
m_size
{0};
//!< The 'size' information that the header is carrying
72
};
73
74
}
// namespace ns3
75
76
#endif
/* SEQ_TS_SIZE_HEADER */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:100
ns3::SeqTsHeader
Packet header to carry sequence number and timestamp.
Definition:
seq-ts-header.h:45
ns3::SeqTsSizeHeader
Header with a sequence, a timestamp, and a "size" attribute.
Definition:
seq-ts-size-header.h:38
ns3::SeqTsSizeHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
seq-ts-size-header.cc:75
ns3::SeqTsSizeHeader::GetSize
uint64_t GetSize() const
Get the size information that the header is carrying.
Definition:
seq-ts-size-header.cc:61
ns3::SeqTsSizeHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Definition:
seq-ts-size-header.cc:90
ns3::SeqTsSizeHeader::Print
void Print(std::ostream &os) const override
Definition:
seq-ts-size-header.cc:67
ns3::SeqTsSizeHeader::SeqTsSizeHeader
SeqTsSizeHeader()
constructor
Definition:
seq-ts-size-header.cc:32
ns3::SeqTsSizeHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
seq-ts-size-header.cc:49
ns3::SeqTsSizeHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
seq-ts-size-header.cc:39
ns3::SeqTsSizeHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition:
seq-ts-size-header.cc:81
ns3::SeqTsSizeHeader::SetSize
void SetSize(uint64_t size)
Set the size information that the header will carry.
Definition:
seq-ts-size-header.cc:55
ns3::SeqTsSizeHeader::m_size
uint64_t m_size
The 'size' information that the header is carrying.
Definition:
seq-ts-size-header.h:71
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
seq-ts-header.h
src
applications
model
seq-ts-size-header.h
Generated on Tue May 28 2024 23:34:10 for ns-3 by
1.9.6