MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / packU32BE

Function packU32BE

app/src/IO/Checksum.cpp:271–276  ·  view source on GitHub ↗

* @brief Packs a 32-bit unsigned integer into a big-endian QByteArray. */

Source from the content-addressed store, hash-verified

269 * @brief Packs a 32-bit unsigned integer into a big-endian QByteArray.
270 */
271static QByteArray packU32BE(uint32_t v)
272{
273 uint8_t out[4];
274 big_endian_memcpy(out, &v, sizeof(v));
275 return QByteArray(reinterpret_cast<char*>(out), sizeof(out));
276}
277
278//--------------------------------------------------------------------------------------------------
279// Utility functions

Callers 1

Checksum.cppFile · 0.85

Calls 1

big_endian_memcpyFunction · 0.85

Tested by

no test coverage detected