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-10-11 15:05:20 Functions: 0.0 % 2 0

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

Generated by: LCOV version 2.0-1