A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
flame-header.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 IITP RAS
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Kirill Andreev <andreev@iitp.ru>
18
*/
19
20
#ifndef FLAME_HEADER_H
21
#define FLAME_HEADER_H
22
23
#include "ns3/header.h"
24
#include "ns3/mac48-address.h"
25
26
namespace
ns3
27
{
28
namespace
flame
29
{
39
class
FlameHeader
:
public
Header
40
{
41
public
:
42
FlameHeader
();
43
~FlameHeader
()
override
;
44
49
static
TypeId
GetTypeId
();
50
// Inherited from Header class:
51
TypeId
GetInstanceTypeId
()
const override
;
52
void
Print
(std::ostream& os)
const override
;
53
uint32_t
GetSerializedSize
()
const override
;
54
void
Serialize
(
Buffer::Iterator
start
)
const override
;
55
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
56
57
// Seeters/Getters for fields:
62
void
AddCost
(uint8_t cost);
67
uint8_t
GetCost
()
const
;
72
void
SetSeqno
(uint16_t seqno);
77
uint16_t
GetSeqno
()
const
;
82
void
SetOrigDst
(
Mac48Address
dst);
87
Mac48Address
GetOrigDst
()
const
;
92
void
SetOrigSrc
(
Mac48Address
OrigSrc);
97
Mac48Address
GetOrigSrc
()
const
;
102
void
SetProtocol
(uint16_t protocol);
107
uint16_t
GetProtocol
()
const
;
108
109
private
:
110
uint8_t
m_cost
;
111
uint16_t
m_seqno
;
112
Mac48Address
m_origDst
;
113
Mac48Address
m_origSrc
;
114
uint16_t
m_protocol
;
122
friend
bool
operator==
(
const
FlameHeader
& a,
const
FlameHeader
& b);
123
};
124
125
bool
operator==
(
const
FlameHeader
& a,
const
FlameHeader
& b);
126
}
// namespace flame
127
}
// namespace ns3
128
#endif
/* FLAME_HEADER_H */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:100
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:44
ns3::Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
ns3::Mac48Address
an EUI-48 address
Definition:
mac48-address.h:46
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::flame::FlameHeader
Flame header.
Definition:
flame-header.h:40
ns3::flame::FlameHeader::m_cost
uint8_t m_cost
cost
Definition:
flame-header.h:110
ns3::flame::FlameHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
flame-header.cc:68
ns3::flame::FlameHeader::m_origDst
Mac48Address m_origDst
origin destination
Definition:
flame-header.h:112
ns3::flame::FlameHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
flame-header.cc:45
ns3::flame::FlameHeader::m_protocol
uint16_t m_protocol
protocol
Definition:
flame-header.h:114
ns3::flame::FlameHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
flame-header.cc:55
ns3::flame::FlameHeader::GetCost
uint8_t GetCost() const
Get cost value.
Definition:
flame-header.cc:111
ns3::flame::FlameHeader::m_seqno
uint16_t m_seqno
sequence number
Definition:
flame-header.h:111
ns3::flame::FlameHeader::FlameHeader
FlameHeader()
Definition:
flame-header.cc:32
ns3::flame::FlameHeader::GetOrigDst
Mac48Address GetOrigDst() const
Get origin destination address.
Definition:
flame-header.cc:135
ns3::flame::FlameHeader::GetOrigSrc
Mac48Address GetOrigSrc() const
Get origin source address.
Definition:
flame-header.cc:147
ns3::flame::FlameHeader::SetOrigSrc
void SetOrigSrc(Mac48Address OrigSrc)
Set origin source function.
Definition:
flame-header.cc:141
ns3::flame::FlameHeader::AddCost
void AddCost(uint8_t cost)
Add cost value.
Definition:
flame-header.cc:105
ns3::flame::FlameHeader::Print
void Print(std::ostream &os) const override
Definition:
flame-header.cc:61
ns3::flame::FlameHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition:
flame-header.cc:80
ns3::flame::FlameHeader::operator==
friend bool operator==(const FlameHeader &a, const FlameHeader &b)
equality operator
Definition:
flame-header.cc:165
ns3::flame::FlameHeader::GetSeqno
uint16_t GetSeqno() const
Get sequence number value.
Definition:
flame-header.cc:123
ns3::flame::FlameHeader::SetOrigDst
void SetOrigDst(Mac48Address dst)
Set origin destination address.
Definition:
flame-header.cc:129
ns3::flame::FlameHeader::SetProtocol
void SetProtocol(uint16_t protocol)
Set protocol value.
Definition:
flame-header.cc:153
ns3::flame::FlameHeader::~FlameHeader
~FlameHeader() override
Definition:
flame-header.cc:40
ns3::flame::FlameHeader::m_origSrc
Mac48Address m_origSrc
origin source
Definition:
flame-header.h:113
ns3::flame::FlameHeader::GetProtocol
uint16_t GetProtocol() const
Get protocol value.
Definition:
flame-header.cc:159
ns3::flame::FlameHeader::SetSeqno
void SetSeqno(uint16_t seqno)
Set sequence number value.
Definition:
flame-header.cc:117
ns3::flame::operator==
bool operator==(const FlameHeader &a, const FlameHeader &b)
Definition:
flame-header.cc:165
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
two-ray-to-three-gpp-ch-calibration.start
start
Definition:
two-ray-to-three-gpp-ch-calibration.py:520
src
mesh
model
flame
flame-header.h
Generated on Sun Mar 3 2024 17:11:05 for ns-3 by
1.9.1