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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
uan-address.h
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_ADDRESS_H
22
#define UAN_ADDRESS_H
23
24
#include "ns3/address.h"
25
#include <iostream>
26
27
namespace
ns3 {
28
37
class
UanAddress
38
{
39
public
:
40
UanAddress
();
45
UanAddress
(uint8_t addr);
46
virtual
~
UanAddress
();
47
52
static
UanAddress
ConvertFrom
(
const
Address
&address);
53
58
static
bool
IsMatchingType
(
const
Address
&address);
59
63
operator
Address
()
const
;
64
69
void
CopyFrom
(
const
uint8_t *pBuffer);
70
75
void
CopyTo
(uint8_t *pBuffer);
76
80
uint8_t
GetAsInt
(
void
)
const
;
81
85
static
UanAddress
GetBroadcast
(
void
);
86
90
static
UanAddress
Allocate
();
91
92
93
private
:
94
uint8_t m_address;
95
96
static
uint8_t GetType (
void
);
97
Address
ConvertTo (
void
)
const
;
98
99
friend
bool
operator ==
(
const
UanAddress
&a,
const
UanAddress
&b);
100
friend
bool
operator !=
(
const
UanAddress
&a,
const
UanAddress
&b);
101
friend
std::ostream&
operator<<
(std::ostream& os,
const
UanAddress
& address);
102
friend
std::istream&
operator>>
(std::istream& is,
UanAddress
& address);
103
104
};
105
106
110
bool
operator == (
const
UanAddress
&a,
const
UanAddress
&b);
111
115
bool
operator != (
const
UanAddress
&a,
const
UanAddress
&b);
116
120
std::ostream&
operator<<
(std::ostream& os,
const
UanAddress
& address);
121
125
std::istream&
operator>>
(std::istream& is,
UanAddress
& address);
126
127
}
// namespace ns3
128
129
#endif
/* UAN_ADDRESS_H */
ns3::operator>>
std::istream & operator>>(std::istream &is, Angles &a)
Definition:
angles.cc:49
ns3::UanAddress::IsMatchingType
static bool IsMatchingType(const Address &address)
Definition:
uan-address.cc:68
ns3::UanAddress::CopyFrom
void CopyFrom(const uint8_t *pBuffer)
Sets address to address stored in parameter.
Definition:
uan-address.cc:79
ns3::Address
a polymophic address class
Definition:
address.h:86
ns3::UanAddress::operator<<
friend std::ostream & operator<<(std::ostream &os, const UanAddress &address)
Writes param address to stream os as 8 bit integer.
Definition:
uan-address.cc:123
ns3::UanAddress
Definition:
uan-address.h:37
ns3::UanAddress::ConvertFrom
static UanAddress ConvertFrom(const Address &address)
Definition:
uan-address.cc:54
ns3::UanAddress::operator!=
friend bool operator!=(const UanAddress &a, const UanAddress &b)
Returns true if byte address a is unequal to byte address b.
Definition:
uan-address.cc:117
ns3::UanAddress::GetBroadcast
static UanAddress GetBroadcast(void)
Definition:
uan-address.cc:92
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition:
angles.cc:43
ns3::UanAddress::GetAsInt
uint8_t GetAsInt(void) const
Definition:
uan-address.cc:63
ns3::UanAddress::operator==
friend bool operator==(const UanAddress &a, const UanAddress &b)
Returns true if byte address a is equal to byte address b.
Definition:
uan-address.cc:111
ns3::UanAddress::CopyTo
void CopyTo(uint8_t *pBuffer)
Writes address to buffer parameter.
Definition:
uan-address.cc:85
ns3::UanAddress::Allocate
static UanAddress Allocate()
Allocates UanAddress from 0-254 (will wrap back to 0 if more than 255 are allocated) ...
Definition:
uan-address.cc:97
ns3::UanAddress::operator>>
friend std::istream & operator>>(std::istream &is, UanAddress &address)
Inputs param address from stream is as 8 bit integer.
Definition:
uan-address.cc:129
src
uan
model
uan-address.h
Generated on Sun Mar 16 2014 11:25:11 for ns-3 by
1.8.6