|
| template<typename T> |
| T | mm::core::util::parseHex (const std::string &s) |
| | Parses a hexadecimal string into an unsigned integer of type T.
|
| template<typename T> |
| T | mm::core::util::toInteger (const std::vector< std::uint8_t > &data, std::size_t offset=0, Endianness endian=Endianness::LITTLE) |
| | Converts a byte sequence to an integer of type T with optional offset and endianness.
|
| std::vector< std::vector< uint8_t > > | mm::core::util::splitIntoParts (const std::vector< uint8_t > &input, size_t partSize) |
| | Splits a byte vector into parts of a specified maximum size.
|
| std::vector< uint8_t > | mm::core::util::zipData (const std::string &filename, const std::vector< uint8_t > &data) |
| | Compresses a block of data into a ZIP archive containing a single file.
|
| std::unordered_map< std::string, std::vector< uint8_t > > | mm::core::util::unzipData (const std::vector< uint8_t > &data) |
| | Unzips a ZIP archive from an in-memory byte buffer.
|
| template<typename T> |
| bool | mm::core::util::stringViewToNumber (std::string_view sv, T &result) |
| | Converts a string_view to a numeric type.
|
| template<typename T> |
| std::vector< uint8_t > | mm::core::util::toBytes (T value, bool bigEndian=false) |
| | Converts a trivially copyable value to a byte vector.
|
| template<typename T> |
| T | mm::core::util::fromBytes (const std::vector< uint8_t > &bytes, bool bigEndian=false) |
| | Reconstructs a value of type T from a byte vector.
|
| std::string | mm::core::util::makeParameterId (int index, int subindex) |
| | Formats the given index and subindex into a parameter identifier string.
|
| std::string | mm::core::util::toHex (const std::vector< uint8_t > &data) |
| | Converts a vector of bytes to a space-separated hexadecimal string.
|
| template<typename T> |
| std::string | mm::core::util::toHex (T value) |
| | Converts an integer value to its hexadecimal string representation.
|
| std::vector< uint8_t > | mm::core::util::readBinaryFile (const std::string &filename) |
| | Reads the entire contents of a binary file into a byte vector.
|
| std::string | mm::core::util::readTextFile (const std::string &filename) |
| | Reads the entire content of a text file into a std::string.
|
| std::string | mm::core::util::joinStrings (const std::vector< std::string > &list, const std::string &delimiter) |
| | Joins a list of strings into a single string with a delimiter.
|
| std::string | mm::core::util::formatMacAddress (const std::string &originalMacAddress) |
| | Formats a MAC address string to ensure each component is two digits and uppercase.
|
| std::string | mm::core::util::extractIpAddress (const std::string &socketAddress) |
| | Extracts the IP address from a socket address string.
|
| uint16_t | mm::core::util::extractPort (const std::string &socketAddress) |
| | Extracts the port number from a socket address string.
|
| bool | mm::core::util::endsWith (const std::string &str, const std::string &suffix) |
| | Checks whether a string ends with the given suffix.
|
| size_t | mm::core::util::countStringsStartingWith (const std::vector< std::string > &strings, const std::string &prefix) |
| | Count how many strings in the list start with the given prefix.
|
| std::vector< std::string > | mm::core::util::split (const std::string &input, char delimiter) |
| | Splits a string into substrings based on a delimiter character.
|
| int64_t | mm::core::util::currentTimeMillis () |
| | Gets the current system time in milliseconds since the Unix epoch.
|
| template<typename T> |
| constexpr T | mm::core::util::linearScale (T value, T inMin, T inMax, T outMin, T outMax) |
| std::map< std::string, std::string > | mm::core::util::parseQueryString (const std::string &query) |
| | Parses a URL query string into an ordered map of key-value pairs.
|
| double | mm::core::util::fromQ (int32_t rawValue, uint8_t qFractionalBits=15, bool round=false) |
| | Converts a raw fixed-point integer value (e.g., Q15) to a floating-point number.
|
| std::vector< std::tuple< int32_t, int16_t, int32_t > > | mm::core::util::parseHrdBuffer (const std::vector< uint8_t > &data) |
| | Parses an HRD (High-Resolution Data) buffer into a sequence of samples.
|
| bool | mm::core::util::writeToFile (const std::string &filename, const std::string &content) |
| | Writes the given content to a file.
|
| void | mm::core::util::exportHrdSamplesToCsv (const std::string &filename, const std::vector< std::tuple< int32_t, int16_t, int32_t > > &samples) |
| | Export HRD samples as CSV and write to a file.
|