Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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. | |
| void | setUnencodedUrlData (uint8_t *rawFrame, int8_t advTxPower, const char *rawUrl) |
| Construct the raw bytes of the Eddystone-URL frame from an unencoded URL (a null terminated string) that will be directly used in the advertising packets. | |
| void | clearFrame (uint8_t *frame) |
| Clear frame (intervally indicated by length = 0 ) | |
| void | setData (uint8_t *rawFrame, int8_t advPowerLevel, const uint8_t *encodedUrlData, uint8_t encodedUrlLen) |
| Construct the raw bytes of the Eddystone-URL frame from an encoded URL plus length information. | |
| uint8_t * | getData (uint8_t *rawFrame) |
| Get the URL frame data from the Eddystone-URL frame. | |
| uint8_t | getDataLength (uint8_t *rawFrame) |
| Get the length of the URL frame data from the Eddystone-UID frame. | |
| uint8_t * | getAdvFrame (uint8_t *rawFrame) |
| Get the URL Adv data from the Eddystone-URLframe. | |
| uint8_t | getAdvFrameLength (uint8_t *rawFrame) |
| Get the length of the URLAdv data from the Eddystone-URL frame. | |
| uint8_t * | getEncodedUrl (uint8_t *rawFrame) |
| Get just the encoded URL data from the Eddystone-URL frame. | |
| uint8_t | getEncodedUrlLength (uint8_t *rawFrame) |
| Get the length of just the encoded URL data from the Eddystone-URL frame. | |
| void | setAdvTxPower (uint8_t *rawFrame, int8_t advTxPower) |
| Set the Adv TX Power in the frame. | |
Static Public Attributes | |
| static const uint8_t | FRAME_TYPE_URL = 0x10 |
| The byte ID of an Eddystone-URL frame. | |
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 20 of file URLFrame.cpp.
Member Function Documentation
| void clearFrame | ( | uint8_t * | frame ) |
Clear frame (intervally indicated by length = 0 )
Definition at line 32 of file URLFrame.cpp.
| uint8_t * getAdvFrame | ( | uint8_t * | rawFrame ) |
Get the URL Adv data from the Eddystone-URLframe.
This is the full service data included in the BLE service data params
- Parameters:
-
[in] rawFrame Pointer to the location where the raw frame will be stored.
- Returns:
- A pointer to the bytes of the Eddystone-URLAdv frame data.
Definition at line 57 of file URLFrame.cpp.
| uint8_t getAdvFrameLength | ( | uint8_t * | rawFrame ) |
Get the length of the URLAdv data from the Eddystone-URL frame.
- Parameters:
-
[in] rawFrame Pointer to the location where the raw frame will be stored.
- Returns:
- The size in bytes of the Eddystone-URL Adv frame data.
Definition at line 62 of file URLFrame.cpp.
| uint8_t * getData | ( | uint8_t * | rawFrame ) |
Get the URL frame data from the Eddystone-URL frame.
- Parameters:
-
[in] rawFrame Pointer to the location where the raw frame will be stored.
- Returns:
- A pointer to the bytes of the Eddystone-URL frame data.
Definition at line 48 of file URLFrame.cpp.
| uint8_t getDataLength | ( | uint8_t * | rawFrame ) |
Get the length of the URL frame data from the Eddystone-UID frame.
- Parameters:
-
[in] rawFrame Pointer to the location where the raw frame will be stored.
- Returns:
- The size in bytes of the Eddystone-URL frame.
Definition at line 53 of file URLFrame.cpp.
| uint8_t * getEncodedUrl | ( | uint8_t * | rawFrame ) |
Get just the encoded URL data from the Eddystone-URL frame.
- Parameters:
-
[in] rawFrame Pointer to the location where the raw frame will be stored.
- Returns:
- A pointer to the bytes of the encoded URL in the Eddystone-URL frame.
Definition at line 67 of file URLFrame.cpp.
| uint8_t getEncodedUrlLength | ( | uint8_t * | rawFrame ) |
Get the length of just the encoded URL data from the Eddystone-URL frame.
- Parameters:
-
[in] rawFrame Pointer to the location where the raw frame will be stored.
- Returns:
- The size in bytes of the encoded URL in the Eddystone-URL frame.
Definition at line 72 of file URLFrame.cpp.
| void setAdvTxPower | ( | uint8_t * | rawFrame, |
| int8_t | advTxPower | ||
| ) |
Set the Adv TX Power in the frame.
This is necessary because the adv Tx Power might be updated independent of the data bytes
- Parameters:
-
[in] rawFrame Pointer to the location where the raw frame will be stored. [in] advPowerLevel Power level value included in the raw frame.
Definition at line 148 of file URLFrame.cpp.
| void setData | ( | uint8_t * | rawFrame, |
| int8_t | advPowerLevel, | ||
| const uint8_t * | encodedUrlData, | ||
| uint8_t | encodedUrlLen | ||
| ) |
Construct the raw bytes of the Eddystone-URL frame from an encoded URL plus length information.
- Parameters:
-
[in] rawFrame Pointer to the location where the raw frame will be stored. [in] advPowerLevel Power level value included in the raw frame. [in] encodedUrlData A pointer to the encoded URL bytes. [in] encodedUrlLen The length in bytes of the encoded URL
Definition at line 36 of file URLFrame.cpp.
| void setUnencodedUrlData | ( | uint8_t * | rawFrame, |
| int8_t | advTxPower, | ||
| const char * | rawUrl | ||
| ) |
Construct the raw bytes of the Eddystone-URL frame from an unencoded URL (a null terminated string) 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 in the raw frame. [in] rawURL A null terminated string containing the URL
Definition at line 24 of file URLFrame.cpp.
Field Documentation
const uint8_t FRAME_TYPE_URL = 0x10 [static] |
The byte ID of an Eddystone-URL frame.
Definition at line 146 of file URLFrame.h.
Generated on Thu Jul 14 2022 09:28:18 by
1.7.2