| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // ====================================================================== | ||
| 2 | // \title ByteArray.hpp | ||
| 3 | // \author bocchino | ||
| 4 | // \brief hpp file for ByteArray type | ||
| 5 | // | ||
| 6 | // \copyright | ||
| 7 | // Copyright (C) 2016 California Institute of Technology. | ||
| 8 | // ALL RIGHTS RESERVED. United States Government Sponsorship | ||
| 9 | // acknowledged. | ||
| 10 | // | ||
| 11 | // ====================================================================== | ||
| 12 | |||
| 13 | #ifndef Fw_ByteArray_HPP | ||
| 14 | #define Fw_ByteArray_HPP | ||
| 15 | |||
| 16 | #include <Fw/FPrimeBasicTypes.hpp> | ||
| 17 | |||
| 18 | namespace Fw { | ||
| 19 | |||
| 20 | //! \class ByteArray | ||
| 21 | //! \brief A variable-length byte array | ||
| 22 | //! | ||
| 23 | struct ByteArray { | ||
| 24 | // ---------------------------------------------------------------------- | ||
| 25 | // Construction | ||
| 26 | // ---------------------------------------------------------------------- | ||
| 27 | |||
| 28 | //! Construct a ByteArray | ||
| 29 | //! | ||
| 30 | 84 | ByteArray(U8* const a_bytes, //!< Pointer to the bytes | |
| 31 | const FwSizeType a_size //!< The array size | ||
| 32 | ) | ||
| 33 | 84 | : bytes(a_bytes), size(a_size) {} | |
| 34 | |||
| 35 | // ---------------------------------------------------------------------- | ||
| 36 | // Data | ||
| 37 | // ---------------------------------------------------------------------- | ||
| 38 | |||
| 39 | //! The bytes | ||
| 40 | U8* const bytes; | ||
| 41 | |||
| 42 | //! The size | ||
| 43 | const FwSizeType size; | ||
| 44 | }; | ||
| 45 | |||
| 46 | } // namespace Fw | ||
| 47 | |||
| 48 | #endif | ||
| 49 |