LCOV - code coverage report
Current view: top level - tdemodules/src - utilities.cpp (source / functions) Coverage Total Hit
Test: code.result Lines: 0.0 % 12 0
Test Date: 2026-02-16 10:18:04 Functions: 0.0 % 2 0

            Line data    Source code
       1              : #include "utilities.hpp"
       2              : #include <boost/endian/arithmetic.hpp>
       3              : 
       4              : 
       5              : namespace dunedaq {
       6              : namespace tdemodules {
       7              : 
       8              : // Append a 16-bit big-endian value to a buffer
       9            0 : void append_big_uint16(std::vector<uint8_t>& buffer, uint16_t value) {
      10            0 :     boost::endian::big_uint16_t be_val = value;
      11            0 :     uint8_t temp[2];
      12            0 :     std::memcpy(temp, &be_val, sizeof(be_val));
      13            0 :     buffer.insert(buffer.end(), temp, temp + sizeof(be_val));
      14            0 : }
      15              : 
      16              : // Append a 32-bit big-endian value to a buffer
      17            0 : void append_big_uint32(std::vector<uint8_t>& buffer, uint32_t value) {
      18            0 :     boost::endian::big_uint32_t be_val = value;
      19            0 :     uint8_t temp[4];
      20            0 :     std::memcpy(temp, &be_val, sizeof(be_val));
      21            0 :     buffer.insert(buffer.end(), temp, temp + sizeof(be_val));
      22            0 : }
      23              : 
      24              : }
      25              : } // namespace dunedaq
        

Generated by: LCOV version 2.0-1