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
aloha-noack-mac-header.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009, 2010 CTTC
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Nicola Baldo <nbaldo@cttc.es>
7
*/
8
9
#ifndef ALOHA_NOACK_MAC_HEADER_H
10
#define ALOHA_NOACK_MAC_HEADER_H
11
12
#include <ns3/address-utils.h>
13
#include <ns3/header.h>
14
#include <ns3/mac48-address.h>
15
16
namespace
ns3
17
{
18
19
/**
20
* \ingroup spectrum
21
* Header for the AlohaNoack NetDevice
22
*
23
*/
24
class
AlohaNoackMacHeader
:
public
Header
25
{
26
public
:
27
/**
28
* \brief Get the type ID.
29
* \return the object TypeId
30
*/
31
static
TypeId
GetTypeId
();
32
TypeId
GetInstanceTypeId
()
const override
;
33
uint32_t
GetSerializedSize
()
const override
;
34
void
Serialize
(
Buffer::Iterator
start)
const override
;
35
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
36
void
Print
(std::ostream& os)
const override
;
37
38
/**
39
* Set the source address
40
* \param source the source address
41
*/
42
void
SetSource
(
Mac48Address
source);
43
/**
44
* Set the destination address
45
* \param destination the destination address
46
*/
47
void
SetDestination
(
Mac48Address
destination);
48
49
/**
50
* Get the source address
51
* \returns the source address
52
*/
53
Mac48Address
GetSource
()
const
;
54
/**
55
* Get the destination address
56
* \returns the destination address
57
*/
58
Mac48Address
GetDestination
()
const
;
59
60
private
:
61
Mac48Address
m_source
;
//!< source address
62
Mac48Address
m_destination
;
//!< destination address
63
};
64
65
}
// namespace ns3
66
67
#endif
/* ALOHA_NOACK_MAC_HEADER_H */
ns3::AlohaNoackMacHeader
Header for the AlohaNoack NetDevice.
Definition
aloha-noack-mac-header.h:25
ns3::AlohaNoackMacHeader::GetSource
Mac48Address GetSource() const
Get the source address.
Definition
aloha-noack-mac-header.cc:70
ns3::AlohaNoackMacHeader::m_source
Mac48Address m_source
source address
Definition
aloha-noack-mac-header.h:61
ns3::AlohaNoackMacHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition
aloha-noack-mac-header.cc:43
ns3::AlohaNoackMacHeader::SetDestination
void SetDestination(Mac48Address destination)
Set the destination address.
Definition
aloha-noack-mac-header.cc:76
ns3::AlohaNoackMacHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Definition
aloha-noack-mac-header.cc:50
ns3::AlohaNoackMacHeader::Print
void Print(std::ostream &os) const override
Definition
aloha-noack-mac-header.cc:58
ns3::AlohaNoackMacHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition
aloha-noack-mac-header.cc:37
ns3::AlohaNoackMacHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
aloha-noack-mac-header.cc:21
ns3::AlohaNoackMacHeader::GetDestination
Mac48Address GetDestination() const
Get the destination address.
Definition
aloha-noack-mac-header.cc:82
ns3::AlohaNoackMacHeader::m_destination
Mac48Address m_destination
destination address
Definition
aloha-noack-mac-header.h:62
ns3::AlohaNoackMacHeader::SetSource
void SetSource(Mac48Address source)
Set the source address.
Definition
aloha-noack-mac-header.cc:64
ns3::AlohaNoackMacHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition
aloha-noack-mac-header.cc:31
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::Header
Protocol header serialization and deserialization.
Definition
header.h:33
ns3::Mac48Address
an EUI-48 address
Definition
mac48-address.h:35
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
spectrum
model
aloha-noack-mac-header.h
Generated on Fri Nov 8 2024 13:59:06 for ns-3 by
1.11.0