Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
direct_bt::TROOctets Class Reference

Transient read only octet data, i.e. More...

#include <OctetTypes.hpp>

Inheritance diagram for direct_bt::TROOctets:
Collaboration diagram for direct_bt::TROOctets:

Public Member Functions

 TROOctets (const uint8_t *source, const jau::nsize_t len)
 Transient passthrough read-only memory, w/o ownership . More...
 
 TROOctets (const TROOctets &o) noexcept=default
 
 TROOctets (TROOctets &&o) noexcept=default
 
TROOctetsoperator= (const TROOctets &o) noexcept=default
 
TROOctetsoperator= (TROOctets &&o) noexcept=default
 
virtual ~TROOctets () noexcept
 
void check_range (const jau::nsize_t i, const jau::nsize_t count, const char *file, int line) const
 
constexpr bool is_range_valid (const jau::nsize_t i, const jau::nsize_t count) const noexcept
 
constexpr jau::nsize_t getSize () const noexcept
 Returns the used memory size for read and write operations, may be zero. More...
 
uint8_t get_uint8 (const jau::nsize_t i) const
 
constexpr uint8_t get_uint8_nc (const jau::nsize_t i) const noexcept
 
int8_t get_int8 (const jau::nsize_t i) const
 
constexpr int8_t get_int8_nc (const jau::nsize_t i) const noexcept
 
uint16_t get_uint16 (const jau::nsize_t i) const
 
constexpr uint16_t get_uint16_nc (const jau::nsize_t i) const noexcept
 
uint32_t get_uint32 (const jau::nsize_t i) const
 
constexpr uint32_t get_uint32_nc (const jau::nsize_t i) const noexcept
 
EUI48 get_eui48 (const jau::nsize_t i) const
 
EUI48 get_eui48_nc (const jau::nsize_t i) const noexcept
 
uint64_t get_uint64 (const jau::nsize_t i) const
 
constexpr uint64_t get_uint64_nc (const jau::nsize_t i) const noexcept
 
jau::uint128_t get_uint128 (const jau::nsize_t i) const
 
constexpr jau::uint128_t get_uint128_nc (const jau::nsize_t i) const noexcept
 
jau::uint192_t get_uint192 (const jau::nsize_t i) const
 
constexpr jau::uint192_t get_uint192_nc (const jau::nsize_t i) const noexcept
 
jau::uint256_t get_uint256 (const jau::nsize_t i) const
 
constexpr jau::uint256_t get_uint256_nc (const jau::nsize_t i) const noexcept
 
std::string get_string (const jau::nsize_t i) const
 Assumes a null terminated string. More...
 
constexpr_cxx20 std::string get_string_nc (const jau::nsize_t i) const noexcept
 Assumes a null terminated string. More...
 
std::string get_string (const jau::nsize_t i, const jau::nsize_t length) const
 Assumes a string with defined length, not necessarily null terminated. More...
 
uuid16_t get_uuid16 (const jau::nsize_t i) const
 
uuid16_t get_uuid16_nc (const jau::nsize_t i) const noexcept
 
uuid128_t get_uuid128 (const jau::nsize_t i) const
 
uuid128_t get_uuid128_nc (const jau::nsize_t i) const noexcept
 
std::unique_ptr< const uuid_tget_uuid (const jau::nsize_t i, const uuid_t::TypeSize tsize) const
 
constexpr uint8_t const * get_ptr () const noexcept
 
uint8_t const * get_ptr (const jau::nsize_t i) const
 
constexpr uint8_t const * get_ptr_nc (const jau::nsize_t i) const noexcept
 
bool operator== (const TROOctets &rhs) const noexcept
 
bool operator!= (const TROOctets &rhs) const noexcept
 
std::string toString () const noexcept
 

Protected Member Functions

constexpr uint8_t * data () noexcept
 
void setData (uint8_t *d, jau::nsize_t s)
 
constexpr void setSize (jau::nsize_t s) noexcept
 

Static Protected Member Functions

static void checkPtr (uint8_t *d, jau::nsize_t s)
 

Detailed Description

Transient read only octet data, i.e.

non persistent passthrough, owned by caller.

Either ATT value (Vol 3, Part F 3.2.4) or PDU data.

Examples
dbt_scanner00.cpp, dbt_scanner01.cpp, and dbt_scanner10.cpp.

Definition at line 58 of file OctetTypes.hpp.

Constructor & Destructor Documentation

◆ TROOctets() [1/3]

direct_bt::TROOctets::TROOctets ( const uint8_t *  source,
const jau::nsize_t  len 
)
inline

Transient passthrough read-only memory, w/o ownership .

Parameters
sourcea non nullptr memory, otherwise throws exception. Actual capacity known by owner.
lenreadable size of the memory, may be zero

Definition at line 94 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ TROOctets() [2/3]

direct_bt::TROOctets::TROOctets ( const TROOctets o)
defaultnoexcept

◆ TROOctets() [3/3]

direct_bt::TROOctets::TROOctets ( TROOctets &&  o)
defaultnoexcept

◆ ~TROOctets()

virtual direct_bt::TROOctets::~TROOctets ( )
inlinevirtualnoexcept

Definition at line 104 of file OctetTypes.hpp.

Member Function Documentation

◆ check_range()

void direct_bt::TROOctets::check_range ( const jau::nsize_t  i,
const jau::nsize_t  count,
const char *  file,
int  line 
) const
inline

Definition at line 106 of file OctetTypes.hpp.

Here is the caller graph for this function:

◆ checkPtr()

static void direct_bt::TROOctets::checkPtr ( uint8_t *  d,
jau::nsize_t  s 
)
inlinestaticprotected

Definition at line 67 of file OctetTypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data()

constexpr uint8_t* direct_bt::TROOctets::data ( )
inlineconstexprprotectednoexcept

Definition at line 73 of file OctetTypes.hpp.

Here is the caller graph for this function:

◆ get_eui48()

EUI48 direct_bt::TROOctets::get_eui48 ( const jau::nsize_t  i) const
inline

Definition at line 152 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_eui48_nc()

EUI48 direct_bt::TROOctets::get_eui48_nc ( const jau::nsize_t  i) const
inlinenoexcept

Definition at line 156 of file OctetTypes.hpp.

Here is the caller graph for this function:

◆ get_int8()

int8_t direct_bt::TROOctets::get_int8 ( const jau::nsize_t  i) const
inline

Definition at line 128 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_int8_nc()

constexpr int8_t direct_bt::TROOctets::get_int8_nc ( const jau::nsize_t  i) const
inlineconstexprnoexcept

Definition at line 132 of file OctetTypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_ptr() [1/2]

constexpr uint8_t const* direct_bt::TROOctets::get_ptr ( ) const
inlineconstexprnoexcept

Definition at line 228 of file OctetTypes.hpp.

Here is the caller graph for this function:

◆ get_ptr() [2/2]

uint8_t const* direct_bt::TROOctets::get_ptr ( const jau::nsize_t  i) const
inline

Definition at line 229 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_ptr_nc()

constexpr uint8_t const* direct_bt::TROOctets::get_ptr_nc ( const jau::nsize_t  i) const
inlineconstexprnoexcept

Definition at line 233 of file OctetTypes.hpp.

◆ get_string() [1/2]

std::string direct_bt::TROOctets::get_string ( const jau::nsize_t  i) const
inline

Assumes a null terminated string.

Definition at line 193 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_string() [2/2]

std::string direct_bt::TROOctets::get_string ( const jau::nsize_t  i,
const jau::nsize_t  length 
) const
inline

Assumes a string with defined length, not necessarily null terminated.

Definition at line 203 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_string_nc()

constexpr_cxx20 std::string direct_bt::TROOctets::get_string_nc ( const jau::nsize_t  i) const
inlinenoexcept

Assumes a null terminated string.

Definition at line 198 of file OctetTypes.hpp.

Here is the caller graph for this function:

◆ get_uint128()

jau::uint128_t direct_bt::TROOctets::get_uint128 ( const jau::nsize_t  i) const
inline

Definition at line 168 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_uint128_nc()

constexpr jau::uint128_t direct_bt::TROOctets::get_uint128_nc ( const jau::nsize_t  i) const
inlineconstexprnoexcept

Definition at line 172 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_uint16()

uint16_t direct_bt::TROOctets::get_uint16 ( const jau::nsize_t  i) const
inline

Definition at line 136 of file OctetTypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_uint16_nc()

constexpr uint16_t direct_bt::TROOctets::get_uint16_nc ( const jau::nsize_t  i) const
inlineconstexprnoexcept

Definition at line 140 of file OctetTypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_uint192()

jau::uint192_t direct_bt::TROOctets::get_uint192 ( const jau::nsize_t  i) const
inline

Definition at line 176 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_uint192_nc()

constexpr jau::uint192_t direct_bt::TROOctets::get_uint192_nc ( const jau::nsize_t  i) const
inlineconstexprnoexcept

Definition at line 180 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_uint256()

jau::uint256_t direct_bt::TROOctets::get_uint256 ( const jau::nsize_t  i) const
inline

Definition at line 184 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_uint256_nc()

constexpr jau::uint256_t direct_bt::TROOctets::get_uint256_nc ( const jau::nsize_t  i) const
inlineconstexprnoexcept

Definition at line 188 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_uint32()

uint32_t direct_bt::TROOctets::get_uint32 ( const jau::nsize_t  i) const
inline

Definition at line 144 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_uint32_nc()

constexpr uint32_t direct_bt::TROOctets::get_uint32_nc ( const jau::nsize_t  i) const
inlineconstexprnoexcept

Definition at line 148 of file OctetTypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_uint64()

uint64_t direct_bt::TROOctets::get_uint64 ( const jau::nsize_t  i) const
inline

Definition at line 160 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_uint64_nc()

constexpr uint64_t direct_bt::TROOctets::get_uint64_nc ( const jau::nsize_t  i) const
inlineconstexprnoexcept

Definition at line 164 of file OctetTypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_uint8()

uint8_t direct_bt::TROOctets::get_uint8 ( const jau::nsize_t  i) const
inline

Definition at line 120 of file OctetTypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_uint8_nc()

constexpr uint8_t direct_bt::TROOctets::get_uint8_nc ( const jau::nsize_t  i) const
inlineconstexprnoexcept

Definition at line 124 of file OctetTypes.hpp.

◆ get_uuid()

std::unique_ptr<const uuid_t> direct_bt::TROOctets::get_uuid ( const jau::nsize_t  i,
const uuid_t::TypeSize  tsize 
) const
inline

Definition at line 223 of file OctetTypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_uuid128()

uuid128_t direct_bt::TROOctets::get_uuid128 ( const jau::nsize_t  i) const
inline

Definition at line 215 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_uuid128_nc()

uuid128_t direct_bt::TROOctets::get_uuid128_nc ( const jau::nsize_t  i) const
inlinenoexcept

Definition at line 219 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_uuid16()

uuid16_t direct_bt::TROOctets::get_uuid16 ( const jau::nsize_t  i) const
inline

Definition at line 208 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ get_uuid16_nc()

uuid16_t direct_bt::TROOctets::get_uuid16_nc ( const jau::nsize_t  i) const
inlinenoexcept

Definition at line 211 of file OctetTypes.hpp.

Here is the call graph for this function:

◆ getSize()

constexpr jau::nsize_t direct_bt::TROOctets::getSize ( ) const
inlineconstexprnoexcept

Returns the used memory size for read and write operations, may be zero.

Definition at line 118 of file OctetTypes.hpp.

Here is the caller graph for this function:

◆ is_range_valid()

constexpr bool direct_bt::TROOctets::is_range_valid ( const jau::nsize_t  i,
const jau::nsize_t  count 
) const
inlineconstexprnoexcept

Definition at line 113 of file OctetTypes.hpp.

Here is the caller graph for this function:

◆ operator!=()

bool direct_bt::TROOctets::operator!= ( const TROOctets rhs) const
inlinenoexcept

Definition at line 240 of file OctetTypes.hpp.

◆ operator=() [1/2]

TROOctets& direct_bt::TROOctets::operator= ( const TROOctets o)
defaultnoexcept

◆ operator=() [2/2]

TROOctets& direct_bt::TROOctets::operator= ( TROOctets &&  o)
defaultnoexcept

◆ operator==()

bool direct_bt::TROOctets::operator== ( const TROOctets rhs) const
inlinenoexcept

Definition at line 237 of file OctetTypes.hpp.

◆ setData()

void direct_bt::TROOctets::setData ( uint8_t *  d,
jau::nsize_t  s 
)
inlineprotected
Parameters
da non nullptr memory, otherwise throws exception
sused memory size, may be zero

Definition at line 79 of file OctetTypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSize()

constexpr void direct_bt::TROOctets::setSize ( jau::nsize_t  s)
inlineconstexprprotectednoexcept

Definition at line 86 of file OctetTypes.hpp.

Here is the caller graph for this function:

◆ toString()

std::string direct_bt::TROOctets::toString ( ) const
inlinenoexcept
Examples
dbt_scanner10.cpp.

Definition at line 244 of file OctetTypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

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