class Address final : public pdl::packet::Builder { public: static constexpr size_t kLength = 6;
// Bluetooth MAC address bytes saved in little endian format. // The address MSB is address[5], the address LSB is address[0]. // Note that the textual representation follows the big endian format, // ie. Address{0, 1, 2, 3, 4, 5} is represented as 05:04:03:02:01:00.
std::array<uint8_t, kLength> address = {};
// Converts |string| to Address and places it in |to|. If |from| does // not represent a Bluetooth address, |to| is not modified and this function // returns false. Otherwise, it returns true. staticbool FromString(const std::string& from, Address& to);
// Copies |from| raw Bluetooth address octets to the local object. // Returns the number of copied octets - should be always Address::kLength
size_t FromOctets(const uint8_t* from);
// Parses format specifications of the form ['x' | 'X'].
constexpr auto parse(format_parse_context& ctx) -> format_parse_context::iterator { // Parse the presentation format and store it in the formatter: auto it = ctx.begin(); auto end = ctx.end(); if (it != end && (*it == 'x' || *it == 'X')) {
presentation = *it++;
}
// Check if reached the end of the range: if (it != end && *it != '}') {
report_error("invalid format");
}
// Return an iterator past the end of the parsed range: return it;
}
// Formats the address a using the parsed format specification (presentation) // stored in this formatter. auto format(const bluetooth::hci::Address& a,
format_context& ctx) const -> format_context::iterator { return presentation == 'x'
? fmt::format_to(ctx.out(), "{:02x}:{:02x}:{:02x}:{:02x}:{:02x}:{:02x}",
a.address[5], a.address[4], a.address[3], a.address[2],
a.address[1], a.address[0])
: fmt::format_to(ctx.out(), "{:02X}:{:02X}:{:02X}:{:02X}:{:02X}:{:02X}",
a.address[5], a.address[4], a.address[3], a.address[2],
a.address[1], a.address[0]);
}
};
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.