libdoip  0.1.0
DoIP (Diagnostics over Internet Protocol) ISO 13400 C++17 Library
ByteArray.h File Reference

Defines the ByteArray type and utility functions for byte manipulation. More...

#include <iomanip>
#include <ostream>
#include <stdint.h>
#include <type_traits>
#include <vector>
Include dependency graph for ByteArray.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  doip::ByteArray
 A dynamic array of bytes with utility methods for network protocol handling. More...
 

Namespaces

 doip
 
 doip::util
 

Typedefs

using doip::ByteArrayRef = std::pair< const uint8_t *, size_t >
 Reference to raw array of bytes. More...
 

Functions

uint16_t doip::util::readU16BE (const uint8_t *data, size_t index)
 Reads a 16-bit unsigned integer in big-endian format from a byte array. More...
 
uint32_t doip::util::readU32BE (const uint8_t *data, size_t index)
 Reads a 32-bit unsigned integer in big-endian format from a byte array. More...
 
std::ostream & doip::operator<< (std::ostream &os, const ByteArray &arr)
 Stream operator for ByteArray. More...
 

Detailed Description

Defines the ByteArray type and utility functions for byte manipulation.

This file provides a ByteArray type (based on std::vector<uint8_t>) with convenient methods for reading and writing multi-byte integer values in big-endian format, commonly used in network protocols.

Definition in file ByteArray.h.