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
* SPDX-License-Identifier: GPL-2.0-only
7
*/
8
9
#ifndef SEQ_TS_SIZE_HEADER_H
10
#define SEQ_TS_SIZE_HEADER_H
11
12
#include "
seq-ts-header.h
"
13
14
namespace
ns3
15
{
16
/**
17
* \ingroup applications
18
* \brief Header with a sequence, a timestamp, and a "size" attribute
19
*
20
* This header adds a size attribute to the sequence number and timestamp
21
* of class \c SeqTsHeader. The size attribute can be used to track
22
* application data units for stream-based sockets such as TCP.
23
*
24
* \sa ns3::SeqTsHeader
25
*/
26
class
SeqTsSizeHeader
:
public
SeqTsHeader
27
{
28
public
:
29
/**
30
* \brief Get the type ID.
31
* \return the object TypeId
32
*/
33
static
TypeId
GetTypeId
();
34
35
/**
36
* \brief constructor
37
*/
38
SeqTsSizeHeader
();
39
40
/**
41
* \brief Set the size information that the header will carry
42
* \param size the size
43
*/
44
void
SetSize
(uint64_t size);
45
46
/**
47
* \brief Get the size information that the header is carrying
48
* \return the size
49
*/
50
uint64_t
GetSize
()
const
;
51
52
// Inherited
53
TypeId
GetInstanceTypeId
()
const override
;
54
void
Print
(std::ostream& os)
const override
;
55
uint32_t
GetSerializedSize
()
const override
;
56
void
Serialize
(
Buffer::Iterator
start)
const override
;
57
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
58
59
private
:
60
uint64_t
m_size
{0};
//!< The 'size' information that the header is carrying
61
};
62
63
}
// namespace ns3
64
65
#endif
/* SEQ_TS_SIZE_HEADER */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::SeqTsHeader
Packet header to carry sequence number and timestamp.
Definition
seq-ts-header.h:34
ns3::SeqTsSizeHeader
Header with a sequence, a timestamp, and a "size" attribute.
Definition
seq-ts-size-header.h:27
ns3::SeqTsSizeHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition
seq-ts-size-header.cc:64
ns3::SeqTsSizeHeader::GetSize
uint64_t GetSize() const
Get the size information that the header is carrying.
Definition
seq-ts-size-header.cc:50
ns3::SeqTsSizeHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Definition
seq-ts-size-header.cc:79
ns3::SeqTsSizeHeader::Print
void Print(std::ostream &os) const override
Definition
seq-ts-size-header.cc:56
ns3::SeqTsSizeHeader::SeqTsSizeHeader
SeqTsSizeHeader()
constructor
Definition
seq-ts-size-header.cc:21
ns3::SeqTsSizeHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition
seq-ts-size-header.cc:38
ns3::SeqTsSizeHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
seq-ts-size-header.cc:28
ns3::SeqTsSizeHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition
seq-ts-size-header.cc:70
ns3::SeqTsSizeHeader::SetSize
void SetSize(uint64_t size)
Set the size information that the header will carry.
Definition
seq-ts-size-header.cc:44
ns3::SeqTsSizeHeader::m_size
uint64_t m_size
The 'size' information that the header is carrying.
Definition
seq-ts-size-header.h:60
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
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 Fri Nov 8 2024 13:58:59 for ns-3 by
1.11.0