Class BLEBeacon
-
class iBeacon
Description
A class used for managing iBeacon BLE advertising data.
Syntax
class iBeacon
Members
Public Constructors |
|
iBeacon::iBeacon |
Create an instance of iBeacon advertising data |
Public Methods |
|
iBeacon::getManufacturerId |
Get current manufacturer ID value |
iBeacon::getUUID |
Get current UUID value |
iBeacon::getMajor |
Get current Major value |
iBeacon::getMinor |
Get current Minor value |
iBeacon::getRSSI |
Get current RSSI value |
iBeacon::setManufacturerId |
Set manufacturer ID value |
iBeacon::setUUID |
Set UUID value |
iBeacon::setMajor |
Set Major value |
iBeacon::setMinor |
Set Minor value |
iBeacon::setRSSI |
Set RSSI value |
iBeacon::getAdvData |
Get current advertising data |
iBeacon::getScanRsp |
Get current scan response data |
-
class altBeacon
Description
A class used for managing altBeacon BLE advertising data.
Syntax
class altBeacon
Members
Public Constructors |
|
altBeacon::altBeacon |
Create an instance of altBeacon
advertising data |
Public Methods |
|
altBeacon::getManufacturerId |
Get current manufacturer ID value |
altBeacon::getUUID |
Get current UUID value |
altBeacon::getMajor |
Get current Major value |
altBeacon::getMinor |
Get current Minor value |
altBeacon::getRSSI |
Get current RSSI value |
altBeacon::getRSVD |
Get current Reserved value |
altBeacon::setManufacturerId |
Set manufacturer ID value |
altBeacon::setUUID |
Set UUID value |
altBeacon::setMajor |
Set Major value |
altBeacon::setMinor |
Set Minor value |
altBeacon::setRSSI |
Set RSSI value |
altBeacon::setRSVD |
Set Reserved value |
altBeacon::getAdvData |
Get current advertising data |
altBeacon::getScanRsp |
Get current scan response data |
-
iBeacon::iBeacon
Description
Create an iBeacon object.
Syntax
Parameters
The function requires no input parameter.
Returns
The function returns nothing.
Example Code
NA
Notes and Warnings
Include “BLEBeacon.h” to use this class function.
altBeacon::altBeacon
Description
Create an altBeacon object.
Syntax
void altBeacon(void);
Parameters
The function requires no input parameter.
Returns
The function returns nothing.
Notes and Warnings
Include “BLEBeacon.h” to use this class function.
iBeacon::getManufacturerId
altBeacon::getManufacturerId
Description
Get current Manufacturer ID value.
Syntax
uint16_t getManufacturerId(void);
Parameters
The function requires no input parameter.
Returns
A 16-bit unsigned integer containing the current Company ID.
iBeacon::getUUID
altBeacon::getUUID
Description
Get the current UUID value.
Syntax
void getUUID(uint8_t* UUID);
Parameters
UUID: pointer to a 16 element uint8_t array, current UUID will be
copied into the array.
Returns
The function returns nothing.
Notes and Warnings
UUID is a 128-bit number used to uniquely identify a beacon. It is
commonly expressed as a 32-character hexadecimal string. UUIDs can be
generated at
https://www.uuidgenerator.net/.
iBeacon::getMajor
altBeacon::getMajor
Description
Get current Major value.
Syntax
uint16_t getMajor(void);
Parameters
The function requires no input parameter.
Returns
A 16-bit unsigned integer containing the current Major value.
iBeacon::getMinor
altBeacon::getMinor
Description
Get current Minor value.
Syntax
uint16_t getMinor(void);
Parameters
The function requires no input parameter.
Returns
A 16-bit unsigned integer containing the current Minor value.
iBeacon::getRSSI
altBeacon::getRSSI
Description
Get the current RSSI value.
Syntax
int8_t getRSSI(void);
Parameters
The function requires no input parameter.
Returns
An 8-bit signed integer containing the currently set RSSI value.
iBeacon::setManufacturerId
altBeacon::setManufacturerId
Description
Set Manufacturer ID value.
Syntax
void setManufacturerId(uint16_t id);
Parameters
id: desired Manufacturer ID
Returns
The function returns nothing.
Example Code
Example: BLEBeacon
iBeacon::setUUID
altBeacon::setUUID
Description
Set UUID value.
Syntax
void setUUID(uint8_t* UUID);
void setUUID(const char* UUID);
Parameters
uint8_t* UUID: pointer to a 16 element uint8_t array containing the
desired UUID
const char* UUID: desired UUID expressed as a character string
Returns
The function returns nothing.
Example Code
Example: BLEBeacon
Notes and Warnings
UUID is a 128-bit number used to uniquely identify a beacon. It is
commonly expressed as a 32-character hexadecimal string. UUIDs can be
generated at
https://www.uuidgenerator.net/.
iBeacon::setMajor
altBeacon::setMajor
Description
Set Major value.
Syntax
void setMajor(uint16_t major);
Parameters
major: desired Major value
Returns
The function returns nothing.
Example Code
Example: BLEBeacon
iBeacon::setMinor
altBeacon::setMinor
Description
Set Minor value.
Syntax
void setMinor(uint16_t minor);
Parameters
minor: desired Minor value
Returns
The function returns nothing.
Example Code
Example: BLEBeacon
iBeacon::setRSSI
altBeacon::setRSSI
Description
Set RSSI value.
Syntax
void setRSSI(int8_t RSSI);
Parameters
RSSI: desired RSSI value
Returns
The function returns nothing.
Example Code
Example: BLEBeacon
iBeacon::getAdvData
altBeacon::getAdvData
Description
Get current beacon advertising data.
Syntax
uint8_t* getAdvData(void);
Parameters
The function requires no input parameter.
Returns
A uint8_t pointer to the structure containing beacon advertising data.
Notes and Warnings
Avoid changing the beacon data through the returned pointer, use the
member functions instead.
iBeacon::getScanRsp
altBeacon::getScanRsp
Description
Get current beacon advertising scan response data.
Syntax
uint8_t* getScanRsp(void);
Parameters
The function requires no input parameter.
Returns
A uint8_t pointer to the structure containing beacon advertising scan
response data.
Notes and Warnings
Avoid changing the beacon data through the returned pointer, use the
member functions instead.
altBeacon::getRSVD
Description
Get current Reserved value.
Syntax
uint8_t getRSVD(void);
Parameters
The function requires no input parameter.
Returns
An 8-bit unsigned integer containing the current Reserved value.
Notes and Warnings
Reserved for use by the manufacturer to implement special features.
The interpretation of this value is to be defined by the manufacturer
and is to be evaluated based on the MFG ID value. Refer
to
https://altbeacon.org/ for more information.
altBeacon::setRSVD
Description
Set Reserved value.
Syntax
void setRSVD(uint8_t rsvd);
Parameters
rsvd: desired Reserved value
Returns
The function returns nothing.
Notes and Warnings
Reserved for use by the manufacturer to implement special features.
The interpretation of this value is to be defined by the manufacturer
and is to be evaluated based on the MFG ID value. Refer
to
https://altbeacon.org/ for more information.