NimBLE-Arduino 2.1.2
Loading...
Searching...
No Matches
NimBLEBeacon Class Reference

Representation of a beacon. See: More...

#include <NimBLEBeacon.h>

Public Member Functions

const BeaconData & getData ()
 Retrieve the data that is being advertised.
 
uint16_t getMajor ()
 Get the major value being advertised.
 
uint16_t getMinor ()
 Get the minor value being advertised.
 
uint16_t getManufacturerId ()
 Get the manufacturer ID being advertised.
 
NimBLEUUID getProximityUUID ()
 Get the proximity UUID being advertised.
 
int8_t getSignalPower ()
 Get the signal power being advertised.
 
void setData (const uint8_t *data, uint8_t length)
 Set the beacon data.
 
void setData (const BeaconData &data)
 Set the beacon data.
 
void setMajor (uint16_t major)
 Set the major value.
 
void setMinor (uint16_t minor)
 Set the minor value.
 
void setManufacturerId (uint16_t manufacturerId)
 Set the manufacturer ID.
 
void setProximityUUID (const NimBLEUUID &uuid)
 Set the proximity UUID.
 
void setSignalPower (int8_t signalPower)
 Set the signal power.
 

Detailed Description

Representation of a beacon. See:

Member Function Documentation

◆ getData()

const NimBLEBeacon::BeaconData & NimBLEBeacon::getData ( )

Retrieve the data that is being advertised.

Returns
The advertised data.

◆ getMajor()

uint16_t NimBLEBeacon::getMajor ( )

Get the major value being advertised.

Returns
The major value advertised.

◆ getManufacturerId()

uint16_t NimBLEBeacon::getManufacturerId ( )

Get the manufacturer ID being advertised.

Returns
The manufacturer ID value advertised.

◆ getMinor()

uint16_t NimBLEBeacon::getMinor ( )

Get the minor value being advertised.

Returns
minor value advertised.

◆ getProximityUUID()

NimBLEUUID NimBLEBeacon::getProximityUUID ( )

Get the proximity UUID being advertised.

Returns
The UUID advertised.

◆ getSignalPower()

int8_t NimBLEBeacon::getSignalPower ( )

Get the signal power being advertised.

Returns
signal power level advertised.

◆ setData() [1/2]

void NimBLEBeacon::setData ( const BeaconData &  data)

Set the beacon data.

Parameters
[in]dataThe data that the beacon should advertise.

◆ setData() [2/2]

void NimBLEBeacon::setData ( const uint8_t *  data,
uint8_t  length 
)

Set the beacon data.

Parameters
[in]dataA pointer to the raw data that the beacon should advertise.
[in]lengthThe length of the data.

◆ setMajor()

void NimBLEBeacon::setMajor ( uint16_t  major)

Set the major value.

Parameters
[in]majorThe major value.

◆ setManufacturerId()

void NimBLEBeacon::setManufacturerId ( uint16_t  manufacturerId)

Set the manufacturer ID.

Parameters
[in]manufacturerIdThe manufacturer ID value.

◆ setMinor()

void NimBLEBeacon::setMinor ( uint16_t  minor)

Set the minor value.

Parameters
[in]minorThe minor value.

◆ setProximityUUID()

void NimBLEBeacon::setProximityUUID ( const NimBLEUUID uuid)

Set the proximity UUID.

Parameters
[in]uuidThe proximity UUID.

◆ setSignalPower()

void NimBLEBeacon::setSignalPower ( int8_t  signalPower)

Set the signal power.

Parameters
[in]signalPowerThe signal power value.