BLE EddystoneService example
URLFrame Class Reference
Class that encapsulates data that belongs to the Eddystone-URL frame. More...
#include <URLFrame.h>
Public Member Functions | |
URLFrame (void) | |
Construct a new instance of this class. | |
URLFrame (const char *urlDataIn) | |
Construct a new instance of this class. | |
URLFrame (UrlData_t urlDataIn, uint8_t urlDataLengthIn) | |
Construct a new instance of this class. | |
void | constructURLFrame (uint8_t *rawFrame, int8_t advPowerLevel) |
Construct the raw bytes of the Eddystone-URL frame that will be directly used in the advertising packets. | |
size_t | getRawFrameSize (void) const |
Get the size of the Eddystone-URL frame constructed with the current state of the URLFrame object. | |
uint8_t * | getEncodedURLData (void) |
Get a pointer to the encoded URL data. | |
uint8_t | getEncodedURLDataLength (void) const |
Get the encoded URL data length. | |
void | setURLData (const char *urlDataIn) |
Set a new URL. | |
void | setEncodedURLData (const uint8_t *urlEncodedDataIn, const uint8_t urlEncodedDataLengthIn) |
Set an encoded URL. |
Detailed Description
Class that encapsulates data that belongs to the Eddystone-URL frame.
For more information refer to https://github.com/google/eddystone/tree/master/eddystone-url.
Definition at line 27 of file URLFrame.h.
Constructor & Destructor Documentation
URLFrame | ( | void | ) |
Construct a new instance of this class.
Definition at line 19 of file URLFrame.cpp.
URLFrame | ( | const char * | urlDataIn ) |
Construct a new instance of this class.
- Parameters:
-
[in] urlDataIn A null terminated string representing a URL.
Definition at line 25 of file URLFrame.cpp.
URLFrame | ( | UrlData_t | urlDataIn, |
uint8_t | urlDataLengthIn | ||
) |
Construct a new instance of this class.
- Parameters:
-
[in] urlDataIn An encoded URL. [in] urlDataLengthIn The length (in bytes) of the encoded URL.
Definition at line 30 of file URLFrame.cpp.
Member Function Documentation
void constructURLFrame | ( | uint8_t * | rawFrame, |
int8_t | advPowerLevel | ||
) |
Construct the raw bytes of the Eddystone-URL frame that will be directly used in the advertising packets.
- Parameters:
-
[in] rawFrame Pointer to the location where the raw frame will be stored. [in] advPowerLevel Power level value included withing the raw frame.
Definition at line 36 of file URLFrame.cpp.
uint8_t * getEncodedURLData | ( | void | ) |
Get a pointer to the encoded URL data.
- Returns:
- A pointer to the encoded URL data.
Definition at line 51 of file URLFrame.cpp.
uint8_t getEncodedURLDataLength | ( | void | ) | const |
Get the encoded URL data length.
- Returns:
- The length (in bytes) of the encoded URL data frame.
Definition at line 56 of file URLFrame.cpp.
size_t getRawFrameSize | ( | void | ) | const |
Get the size of the Eddystone-URL frame constructed with the current state of the URLFrame object.
- Returns:
- The size in bytes of the Eddystone-URL frame.
Definition at line 46 of file URLFrame.cpp.
void setEncodedURLData | ( | const uint8_t * | urlEncodedDataIn, |
const uint8_t | urlEncodedDataLengthIn | ||
) |
Set an encoded URL.
- Parameters:
-
[in] urlEncodedDataIn A pointer to the encoded URL data. [in] urlEncodedDataLengthIn The lenght of the encoded URL data pointed to by urlEncodedDataIn
.
Definition at line 66 of file URLFrame.cpp.
void setURLData | ( | const char * | urlDataIn ) |
Set a new URL.
- Parameters:
-
[in] urlDataIn A null terminated string containing the new URL.
Definition at line 61 of file URLFrame.cpp.
Generated on Tue Jul 12 2022 19:55:16 by 1.7.2