fpp/compiler/tools/fpp-to-cpp/test/component/base/NoArgsPortAc.ref.hpp
Robert L. Bocchino Jr 96ce443541 Revise C++ code gen
Eliminate uses of NATIVE_[U]INT_TYPE
2024-02-27 19:38:27 -08:00

132 lines
3.2 KiB
C++

// ======================================================================
// \title NoArgsPortAc.hpp
// \author Generated by fpp-to-cpp
// \brief hpp file for NoArgs port
// ======================================================================
#ifndef Ports_NoArgsPortAc_HPP
#define Ports_NoArgsPortAc_HPP
#include <cstdio>
#include <cstring>
#include "FpConfig.hpp"
#include "Fw/Comp/PassiveComponentBase.hpp"
#include "Fw/Port/InputPortBase.hpp"
#include "Fw/Port/OutputPortBase.hpp"
#include "Fw/Types/Serializable.hpp"
#include "Fw/Types/StringType.hpp"
namespace Ports {
//! Input NoArgs port
//! A typed port with no arguments
class InputNoArgsPort :
public Fw::InputPortBase
{
public:
// ----------------------------------------------------------------------
// Constants
// ----------------------------------------------------------------------
enum {
//! The size of the serial representations of the port arguments
SERIALIZED_SIZE = 0
};
public:
// ----------------------------------------------------------------------
// Types
// ----------------------------------------------------------------------
//! The port callback function type
typedef void (*CompFuncPtr)(
Fw::PassiveComponentBase* callComp,
FwIndexType portNum
);
public:
// ----------------------------------------------------------------------
// Input Port Member functions
// ----------------------------------------------------------------------
//! Constructor
InputNoArgsPort();
//! Initialization function
void init();
//! Register a component
void addCallComp(
Fw::PassiveComponentBase* callComp, //!< The containing component
CompFuncPtr funcPtr //!< The port callback function
);
//! Invoke a port interface
void invoke();
private:
#if FW_PORT_SERIALIZATION == 1
//! Invoke the port with serialized arguments
Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
#endif
private:
// ----------------------------------------------------------------------
// Member variables
// ----------------------------------------------------------------------
//! The pointer to the port callback function
CompFuncPtr m_func;
};
//! Output NoArgs port
//! A typed port with no arguments
class OutputNoArgsPort :
public Fw::OutputPortBase
{
public:
// ----------------------------------------------------------------------
// Output Port Member functions
// ----------------------------------------------------------------------
//! Constructor
OutputNoArgsPort();
//! Initialization function
void init();
//! Register an input port
void addCallPort(
InputNoArgsPort* callPort //!< The input port
);
//! Invoke a port interface
void invoke();
private:
// ----------------------------------------------------------------------
// Member variables
// ----------------------------------------------------------------------
//! The pointer to the input port
InputNoArgsPort* m_port;
};
}
#endif