A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
uan-header-common.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 University of Washington
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Leonard Tracy <lentracy@gmail.com>
19
*/
20
21
#ifndef UAN_HEADER_COMMON_H
22
#define UAN_HEADER_COMMON_H
23
24
#include "ns3/header.h"
25
#include "ns3/nstime.h"
26
#include "ns3/simulator.h"
27
#include "
uan-address.h
"
28
29
namespace
ns3 {
30
41
class
UanHeaderCommon
:
public
Header
42
{
43
public
:
45
UanHeaderCommon
();
54
UanHeaderCommon
(
const
UanAddress
src,
const
UanAddress
dest, uint8_t type);
56
virtual
~UanHeaderCommon
();
57
62
static
TypeId
GetTypeId
(
void
);
63
69
void
SetDest
(
UanAddress
dest);
75
void
SetSrc
(
UanAddress
src);
82
void
SetType
(uint8_t type);
83
89
UanAddress
GetDest
(
void
)
const
;
95
UanAddress
GetSrc
(
void
)
const
;
101
uint8_t
GetType
(
void
)
const
;
102
103
104
// Inherited methods
105
virtual
uint32_t
GetSerializedSize
(
void
)
const
;
106
virtual
void
Serialize
(
Buffer::Iterator
start
)
const
;
107
virtual
uint32_t
Deserialize
(
Buffer::Iterator
start);
108
virtual
void
Print
(std::ostream &os)
const
;
109
virtual
TypeId
GetInstanceTypeId
(
void
)
const
;
110
private
:
111
UanAddress
m_dest
;
112
UanAddress
m_src
;
113
uint8_t
m_type
;
114
115
};
// class UanHeaderCommon
116
117
}
// namespace ns3
118
119
#endif
/* UAN_HEADER_COMMON_H */
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:42
visualizer.core.start
def start
Definition:
core.py:1482
ns3::UanHeaderCommon::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition:
uan-header-common.cc:112
ns3::UanHeaderCommon::GetType
uint8_t GetType(void) const
Get the header type value.
Definition:
uan-header-common.cc:90
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:98
ns3::UanHeaderCommon::Print
virtual void Print(std::ostream &os) const
Definition:
uan-header-common.cc:124
uan-address.h
ns3::UanAddress
A class used for addressing UAN MAC's.
Definition:
uan-address.h:40
ns3::UanHeaderCommon::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
uan-header-common.cc:98
ns3::UanHeaderCommon::m_dest
UanAddress m_dest
The destination address.
Definition:
uan-header-common.h:111
ns3::UanHeaderCommon::~UanHeaderCommon
virtual ~UanHeaderCommon()
Destructor.
Definition:
uan-header-common.cc:57
ns3::UanHeaderCommon::SetSrc
void SetSrc(UanAddress src)
Set the source address.
Definition:
uan-header-common.cc:68
ns3::UanHeaderCommon::UanHeaderCommon
UanHeaderCommon()
Default constructor.
Definition:
uan-header-common.cc:29
ns3::UanHeaderCommon::SetDest
void SetDest(UanAddress dest)
Set the destination address.
Definition:
uan-header-common.cc:63
ns3::UanHeaderCommon::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition:
uan-header-common.cc:43
ns3::UanHeaderCommon::m_type
uint8_t m_type
The type field.
Definition:
uan-header-common.h:113
ns3::UanHeaderCommon::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
uan-header-common.cc:104
ns3::UanHeaderCommon
Common packet header fields.
Definition:
uan-header-common.h:41
ns3::UanHeaderCommon::GetDest
UanAddress GetDest(void) const
Get the destination address.
Definition:
uan-header-common.cc:80
ns3::UanHeaderCommon::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Definition:
uan-header-common.cc:53
ns3::UanHeaderCommon::SetType
void SetType(uint8_t type)
Set the header type.
Definition:
uan-header-common.cc:74
ns3::UanHeaderCommon::GetSrc
UanAddress GetSrc(void) const
Get the source address.
Definition:
uan-header-common.cc:85
ns3::UanHeaderCommon::m_src
UanAddress m_src
The source address.
Definition:
uan-header-common.h:112
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
src
uan
model
uan-header-common.h
Generated on Sat Apr 19 2014 14:07:09 for ns-3 by
1.8.6