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
flow-id-tag.h
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@sophia.inria.fr>
7
*/
8
#ifndef FLOW_ID_TAG_H
9
#define FLOW_ID_TAG_H
10
11
#include "ns3/tag.h"
12
13
namespace
ns3
14
{
15
16
class
FlowIdTag
:
public
Tag
17
{
18
public
:
19
/**
20
* \brief Get the type ID.
21
* \return the object TypeId
22
*/
23
static
TypeId
GetTypeId
();
24
TypeId
GetInstanceTypeId
()
const override
;
25
uint32_t
GetSerializedSize
()
const override
;
26
void
Serialize
(
TagBuffer
buf)
const override
;
27
void
Deserialize
(
TagBuffer
buf)
override
;
28
void
Print
(std::ostream& os)
const override
;
29
FlowIdTag
();
30
31
/**
32
* Constructs a FlowIdTag with the given flow id
33
*
34
* \param flowId Id to use for the tag
35
*/
36
FlowIdTag
(
uint32_t
flowId);
37
/**
38
* Sets the flow id for the tag
39
* \param flowId Id to assign to the tag
40
*/
41
void
SetFlowId
(
uint32_t
flowId);
42
/**
43
* Gets the flow id for the tag
44
* \returns current flow id for this tag
45
*/
46
uint32_t
GetFlowId
()
const
;
47
/**
48
* Uses a static variable to generate sequential flow id
49
* \returns flow id allocated
50
*/
51
static
uint32_t
AllocateFlowId
();
52
53
private
:
54
uint32_t
m_flowId
;
//!< Flow ID
55
};
56
57
}
// namespace ns3
58
59
#endif
/* FLOW_ID_TAG_H */
ns3::FlowIdTag
Definition
flow-id-tag.h:17
ns3::FlowIdTag::Deserialize
void Deserialize(TagBuffer buf) override
Definition
flow-id-tag.cc:50
ns3::FlowIdTag::GetFlowId
uint32_t GetFlowId() const
Gets the flow id for the tag.
Definition
flow-id-tag.cc:84
ns3::FlowIdTag::Serialize
void Serialize(TagBuffer buf) const override
Definition
flow-id-tag.cc:43
ns3::FlowIdTag::FlowIdTag
FlowIdTag()
Definition
flow-id-tag.cc:63
ns3::FlowIdTag::SetFlowId
void SetFlowId(uint32_t flowId)
Sets the flow id for the tag.
Definition
flow-id-tag.cc:77
ns3::FlowIdTag::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition
flow-id-tag.cc:30
ns3::FlowIdTag::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
flow-id-tag.cc:20
ns3::FlowIdTag::Print
void Print(std::ostream &os) const override
Definition
flow-id-tag.cc:57
ns3::FlowIdTag::m_flowId
uint32_t m_flowId
Flow ID.
Definition
flow-id-tag.h:54
ns3::FlowIdTag::AllocateFlowId
static uint32_t AllocateFlowId()
Uses a static variable to generate sequential flow id.
Definition
flow-id-tag.cc:91
ns3::FlowIdTag::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition
flow-id-tag.cc:36
ns3::TagBuffer
read and write tag data
Definition
tag-buffer.h:41
ns3::Tag
tag a set of bytes in a packet
Definition
tag.h:28
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.
src
network
utils
flow-id-tag.h
Generated on Fri Nov 8 2024 13:59:05 for ns-3 by
1.11.0