mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 17:47:10 -06:00
* NATIVE_INT_TYPE use in toString * NATIVE_INT_TYPE use in SimpleObjRegistry * NATIVE_INT_TYPE use in Asserts * NATIVE_INT_TYPE use in Fw/Comp * NATIVE_INT_TYPE use in getCapacity * NATIVE_INT_TYPE use in getEntries * NATIVE_INT_TYPE use in size/length * NATIVE_INT_TYPE use in FILE_NAME_ARG * NATIVE_INT_TYPE use in Fw (misc) * NATIVE_INT_TYPE use in identifier * NATIVE_INT_TYPE use in Fw (misc II) * POINTER_CAST in Buffer * POINTER_CAST in Serializable * sp * Removing no longer used DefaultTypes.hpp * Fixes to accomidate Fw refactor * Unit-test and CI fixes * Fixing review comments - pt 1
61 lines
1.1 KiB
C++
61 lines
1.1 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:
|
|
|
|
FwSizeType getBuffCapacity() 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
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|