mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -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>
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
#ifndef FW_INPUT_SERIALIZE_PORT_HPP
|
|
#define FW_INPUT_SERIALIZE_PORT_HPP
|
|
|
|
#include <Fw/FPrimeBasicTypes.hpp>
|
|
|
|
#if FW_PORT_SERIALIZATION == 1
|
|
|
|
#include <Fw/Port/InputPortBase.hpp>
|
|
|
|
namespace Fw {
|
|
|
|
class InputSerializePort final : public InputPortBase {
|
|
public:
|
|
InputSerializePort();
|
|
virtual ~InputSerializePort();
|
|
|
|
void init() override;
|
|
|
|
SerializeStatus invokeSerial(
|
|
LinearBufferBase& buffer) override; // !< invoke the port with a serialized version of the call
|
|
|
|
typedef void (*CompFuncPtr)(Fw::PassiveComponentBase* callComp,
|
|
FwIndexType portNum,
|
|
LinearBufferBase& arg); //!< port callback definition
|
|
void addCallComp(Fw::PassiveComponentBase* callComp, CompFuncPtr funcPtr); //!< call to register a component
|
|
|
|
protected:
|
|
#if FW_OBJECT_TO_STRING == 1
|
|
const char* getToStringFormatString() override; //!< Get format string for toString call
|
|
#endif
|
|
|
|
private:
|
|
CompFuncPtr m_func; //!< pointer to port callback function
|
|
InputSerializePort(InputSerializePort*);
|
|
InputSerializePort(InputSerializePort&);
|
|
InputSerializePort& operator=(InputSerializePort&);
|
|
};
|
|
|
|
} // namespace Fw
|
|
|
|
#endif // FW_INPUT_SERIALIZE_PORT_HPP
|
|
|
|
#endif
|