mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 17:47:10 -06:00
* Created new SerialBufferBase as a parent of SerializeBufferBase. Renaming interface functions to be less confusing. * Deprecating copyRawOffset. No direct use-cases in F' core. * Make SerialBufferBase a true pure virtual interface. * Changing Serializable to work with SerialBufferBase parent interface. * Changing copyRaw and copyRawOffset to work with SerialBufferBase * Updating documentation for SerialBufferBase usage * Adding some documentation. Adding missing ASSERT in copyRaw. Fixing some bugs that new ASSERT uncovered. * Renaming SerializeBufferBase to LinearBufferBase. Add a using declaration to maintain backwards compatability. Properly mark LinearBufferBase functions as override. * Filling in the rest of the docstrings for the classes in Serializable * Removing redundant virtual keyword on override function * Applying clang formatting * Incorporating PR comments * Fix compile issues * Bump version to alpha * Format * v --------- Co-authored-by: M Starch <LeStarch@googlemail.com>
52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
// ======================================================================
|
|
// \title Buffers.hpp
|
|
// \author Rob Bocchino
|
|
// \brief Sequence file buffers
|
|
//
|
|
// \copyright
|
|
// Copyright (C) 2009-2018 California Institute of Technology.
|
|
// ALL RIGHTS RESERVED. United States Government Sponsorship
|
|
// acknowledged.
|
|
// ======================================================================
|
|
|
|
#ifndef Svc_SequenceFiles_Buffers_HPP
|
|
#define Svc_SequenceFiles_Buffers_HPP
|
|
|
|
#include "Svc/CmdSequencer/CmdSequencerImpl.hpp"
|
|
|
|
namespace Svc {
|
|
|
|
namespace SequenceFiles {
|
|
|
|
namespace Buffers {
|
|
|
|
//! A file buffer
|
|
class FileBuffer : public Fw::SerializeBufferBase {
|
|
public:
|
|
enum Constants { CAPACITY = 4096 };
|
|
|
|
public:
|
|
DEPRECATED(FwSizeType getBuffCapacity() const, "Use getCapacity() instead");
|
|
FwSizeType getCapacity() const;
|
|
|
|
U8* getBuffAddr();
|
|
|
|
const U8* getBuffAddr() const;
|
|
|
|
private:
|
|
U8 m_buff[CAPACITY];
|
|
};
|
|
|
|
//! Write a buffer to a file
|
|
void write(const Fw::SerializeBufferBase& buffer, //!< The buffer
|
|
const char* fileName //!< The file name
|
|
);
|
|
|
|
} // namespace Buffers
|
|
|
|
} // namespace SequenceFiles
|
|
|
|
} // namespace Svc
|
|
|
|
#endif
|