A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::BleAccessAddress Class Reference

This class can contain 32 bit access addresses for BLE Devices. More...

#include "ble-access-address.h"

+ Collaboration diagram for ns3::BleAccessAddress:

Public Member Functions

 BleAccessAddress ()
 
 BleAccessAddress (const char *str)
 
void CopyFrom (const uint8_t buffer[4])
 
void CopyTo (uint8_t buffer[4]) const
 
 operator Address () const
 

Static Public Member Functions

static BleAccessAddress Allocate (void)
 Allocate a new BleAccessAddress. More...
 
static BleAccessAddress ConvertFrom (const Address &address)
 
static bool IsMatchingType (const Address &address)
 

Private Member Functions

Address ConvertTo (void) const
 

Static Private Member Functions

static uint8_t GetType (void)
 

Private Attributes

uint8_t m_address [4]
 address value More...
 

Static Private Attributes

static Ptr< UniformRandomVariablem_random = CreateObject<UniformRandomVariable> ()
 

Friends

bool operator!= (const BleAccessAddress &a, const BleAccessAddress &b)
 Not equal to operator. More...
 
bool operator< (const BleAccessAddress &a, const BleAccessAddress &b)
 Less than operator. More...
 
std::ostream & operator<< (std::ostream &os, const BleAccessAddress &address)
 Stream insertion operator. More...
 
bool operator== (const BleAccessAddress &a, const BleAccessAddress &b)
 Equal to operator. More...
 
std::istream & operator>> (std::istream &is, BleAccessAddress &address)
 Stream extraction operator. More...
 

Detailed Description

This class can contain 32 bit access addresses for BLE Devices.

Definition at line 40 of file ble-access-address.h.

Constructor & Destructor Documentation

ns3::BleAccessAddress::BleAccessAddress ( )

Definition at line 66 of file ble-access-address.cc.

References m_address, and NS_LOG_FUNCTION.

ns3::BleAccessAddress::BleAccessAddress ( const char *  str)

Definition at line 72 of file ble-access-address.cc.

References ASCII_a, ASCII_COLON, ASCII_ZERO, ns3::AsciiToLowCase(), m_address, NS_ASSERT, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Function Documentation

BleAccessAddress ns3::BleAccessAddress::Allocate ( void  )
static

Allocate a new BleAccessAddress.

Returns
newly allocated BleAccessAddress

Definition at line 148 of file ble-access-address.cc.

References first::address, ns3::UniformRandomVariable::GetValue(), m_address, m_random, and NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::BleLinkLayer::CreateConnection().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BleAccessAddress ns3::BleAccessAddress::ConvertFrom ( const Address address)
static
Parameters
addressa polymorphic address
Returns
a new BleAccessAddress from the polymorphic address

This function performs a type check and asserts if the type of the input address is not compatible with an BLE Access Address.

Definition at line 131 of file ble-access-address.cc.

References ns3::Address::CopyTo(), IsMatchingType(), m_address, NS_ASSERT, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Address ns3::BleAccessAddress::ConvertTo ( void  ) const
private

Definition at line 141 of file ble-access-address.cc.

References GetType(), m_address, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

void ns3::BleAccessAddress::CopyFrom ( const uint8_t  buffer[4])

Definition at line 105 of file ble-access-address.cc.

References m_address, and NS_LOG_FUNCTION.

Referenced by ns3::BleLinkLayerHeader::Deserialize(), and ns3::BleLinkLayer::ParseConnectionRequestPkt().

+ Here is the caller graph for this function:

void ns3::BleAccessAddress::CopyTo ( uint8_t  buffer[4]) const
uint8_t ns3::BleAccessAddress::GetType ( void  )
staticprivate

Definition at line 167 of file ble-access-address.cc.

References NS_LOG_FUNCTION_NOARGS, and ns3::Address::Register().

Referenced by ConvertTo(), and IsMatchingType().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::BleAccessAddress::IsMatchingType ( const Address address)
static
Parameters
addressaddress to test
Returns
true if the address matches, false otherwise

Definition at line 119 of file ble-access-address.cc.

References ns3::Address::CheckCompatible(), GetType(), and NS_LOG_FUNCTION.

Referenced by ConvertFrom().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ns3::BleAccessAddress::operator Address ( ) const

Definition at line 125 of file ble-access-address.cc.

Friends And Related Function Documentation

bool operator!= ( const BleAccessAddress a,
const BleAccessAddress b 
)
friend

Not equal to operator.

Parameters
athe first operand
bthe first operand
Returns
true if the operands are not equal

Definition at line 164 of file ble-access-address.h.

bool operator< ( const BleAccessAddress a,
const BleAccessAddress b 
)
friend

Less than operator.

Parameters
athe first operand
bthe first operand
Returns
true if the operand a is less than operand b

Definition at line 168 of file ble-access-address.h.

std::ostream& operator<< ( std::ostream &  os,
const BleAccessAddress address 
)
friend

Stream insertion operator.

Parameters
osthe stream
addressthe address
Returns
a reference to the stream

Definition at line 174 of file ble-access-address.cc.

bool operator== ( const BleAccessAddress a,
const BleAccessAddress b 
)
friend

Equal to operator.

Parameters
athe first operand
bthe first operand
Returns
true if the operands are equal

Definition at line 160 of file ble-access-address.h.

std::istream& operator>> ( std::istream &  is,
BleAccessAddress address 
)
friend

Stream extraction operator.

Parameters
isthe stream
addressthe address
Returns
a reference to the stream

Definition at line 193 of file ble-access-address.cc.

Member Data Documentation

uint8_t ns3::BleAccessAddress::m_address[4]
private
Ptr< UniformRandomVariable > ns3::BleAccessAddress::m_random = CreateObject<UniformRandomVariable> ()
staticprivate

Definition at line 95 of file ble-access-address.h.

Referenced by Allocate().


The documentation for this class was generated from the following files: