F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
HashBuffer.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title Hash.hpp
3// \author dinkel
4// \brief hpp file for Hash class
5//
6// \copyright
7// Copyright 2009-2024, by the California Institute of Technology.
8// ALL RIGHTS RESERVED. United States Government Sponsorship
9// acknowledged.
10//
11// ======================================================================
12
13#ifndef UTILS_HASH_BUFFER_HPP
14#define UTILS_HASH_BUFFER_HPP
15
16#include <FpConfig.hpp>
17#include <Fw/Types/Assert.hpp>
20
21namespace Utils {
22
27 public:
28 // ----------------------------------------------------------------------
29 // Construction and destruction
30 // ----------------------------------------------------------------------
31
34 HashBuffer(const U8* args, NATIVE_UINT_TYPE size);
35 HashBuffer(const HashBuffer& other);
36 HashBuffer();
37
40 virtual ~HashBuffer();
41
42 // ----------------------------------------------------------------------
43 // Public instance methods
44 // ----------------------------------------------------------------------
45
48 HashBuffer& operator=(const HashBuffer& other);
49
52 bool operator==(const HashBuffer& other) const;
53
56 bool operator!=(const HashBuffer& other) const;
57
60 NATIVE_UINT_TYPE getBuffCapacity() const; // !< returns capacity, not current size, of buffer
61
64 U8* getBuffAddr();
65 const U8* getBuffAddr() const;
66
68 U32 asBigEndianU32() const;
69
70 private:
71 // ----------------------------------------------------------------------
72 // Private member variables
73 // ----------------------------------------------------------------------
74
77 U8 m_bufferData[HASH_DIGEST_LENGTH] = {}; // packet data buffer
78};
79} // namespace Utils
80
81#endif
uint8_t U8
8-bit unsigned integer
Definition BasicTypes.h:30
PlatformUIntType NATIVE_UINT_TYPE
Definition BasicTypes.h:56
#define HASH_DIGEST_LENGTH
Definition CRC32.hpp:18
C++-compatible configuration header for fprime configuration.
A container class for holding a hash buffer.
HashBuffer & operator=(const HashBuffer &other)
NATIVE_UINT_TYPE getBuffCapacity() const
U32 asBigEndianU32() const
Convert bytes 0 through 3 of the hash data to a big-Endian U32 value.
bool operator==(const HashBuffer &other) const
bool operator!=(const HashBuffer &other) const