Common utilities.
More...
|
| using | flash_string_vector = std::vector< const __FlashStringHelper * > |
| | Type definition for a std::vector of flash strings. More...
|
| |
|
| uint64_t | get_uptime_ms () |
| | Get the current uptime as a 64-bit milliseconds value. More...
|
| |
| void | loop () |
| | Loop function that must be called regularly to detect a 32-bit uptime overflow. More...
|
| |
| size_t | print_to_string (const Printable &printable, std::string &output) |
| | Append to a std::string by printing a Printable object. More...
|
| |
| std::string | printable_to_string (const Printable &printable) |
| | Create a std::string from a Printable object. More...
|
| |
| std::string | read_flash_string (const __FlashStringHelper *flash_str) |
| | Read a string from flash and convert it to a std::string. More...
|
| |
◆ flash_string_vector
Type definition for a std::vector of flash strings.
- Since
- 1.0.0
Definition at line 99 of file common.h.
◆ get_uptime_ms()
| uint64_t uuid::get_uptime_ms |
( |
| ) |
|
Get the current uptime as a 64-bit milliseconds value.
- Returns
- The current uptime in milliseconds.
- Since
- 1.0.0
Definition at line 30 of file get_uptime_ms.cpp.
◆ loop()
Loop function that must be called regularly to detect a 32-bit uptime overflow.
- Since
- 1.0.0
Definition at line 25 of file loop.cpp.
◆ print_to_string()
| size_t uuid::print_to_string |
( |
const Printable & |
printable, |
|
|
std::string & |
output |
|
) |
| |
Append to a std::string by printing a Printable object.
- Parameters
-
| [in] | printable | Printable object. |
| [in,out] | output | String to append to. |
- Returns
- The number of bytes that were written.
- Since
- 1.1.0
Definition at line 49 of file printable_to_string.cpp.
◆ printable_to_string()
| std::string uuid::printable_to_string |
( |
const Printable & |
printable | ) |
|
Create a std::string from a Printable object.
- Parameters
-
| [in] | printable | Printable object. |
- Returns
- A string containing the printed output.
- Since
- 1.1.0
Definition at line 55 of file printable_to_string.cpp.
◆ read_flash_string()
| std::string uuid::read_flash_string |
( |
const __FlashStringHelper * |
flash_str | ) |
|
Read a string from flash and convert it to a std::string.
The flash string must be stored with appropriate alignment for reading it on the platform.
- Parameters
-
| [in] | flash_str | Pointer to string stored in flash. |
- Returns
- A string copy of the flash string.
- Since
- 1.0.0
Definition at line 27 of file read_flash_string.cpp.
◆ thread_safe
| constexpr bool uuid::thread_safe = true |
|
staticconstexpr |
Thread-safe status of the library.
- Since
- 1.1.2
Definition at line 58 of file common.h.