A Discrete-Event Network Simulator
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
16namespace ns3
17{
18
19/**
20 * \ingroup spectrum
21 * Header for the AlohaNoack NetDevice
22 *
23 */
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;
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 */
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 */
Header for the AlohaNoack NetDevice.
Mac48Address GetSource() const
Get the source address.
Mac48Address m_source
source address
void Serialize(Buffer::Iterator start) const override
void SetDestination(Mac48Address destination)
Set the destination address.
uint32_t Deserialize(Buffer::Iterator start) override
void Print(std::ostream &os) const override
uint32_t GetSerializedSize() const override
static TypeId GetTypeId()
Get the type ID.
Mac48Address GetDestination() const
Get the destination address.
Mac48Address m_destination
destination address
void SetSource(Mac48Address source)
Set the source address.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
iterator in a Buffer instance
Definition buffer.h:89
Protocol header serialization and deserialization.
Definition header.h:33
an EUI-48 address
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.