fpp/compiler/tools/fpp-to-cpp/test/component/impl/PassiveSerial.template.ref.hpp
Robert L. Bocchino Jr b765cb4b34 Revise generated C++ code
Replace uses of native types for port numbers
2024-02-27 15:28:45 -08:00

263 lines
8.1 KiB
C++

// ======================================================================
// \title PassiveSerial.hpp
// \author [user name]
// \brief hpp file for PassiveSerial component implementation class
// ======================================================================
#ifndef PassiveSerial_HPP
#define PassiveSerial_HPP
#include "PassiveSerialComponentAc.hpp"
class PassiveSerial :
public PassiveSerialComponentBase
{
public:
// ----------------------------------------------------------------------
// Component construction and destruction
// ----------------------------------------------------------------------
//! Construct PassiveSerial object
PassiveSerial(
const char* const compName //!< The component name
);
//! Destroy PassiveSerial object
~PassiveSerial();
PRIVATE:
// ----------------------------------------------------------------------
// Handler implementations for user-defined typed input ports
// ----------------------------------------------------------------------
//! Handler implementation for noArgsGuarded
//!
//! A typed guarded input
void noArgsGuarded_handler(
FwIndexType portNum //!< The port number
) override;
//! Handler implementation for noArgsReturnGuarded
//!
//! A typed guarded input
U32 noArgsReturnGuarded_handler(
FwIndexType portNum //!< The port number
) override;
//! Handler implementation for noArgsReturnSync
//!
//! A typed sync input port
U32 noArgsReturnSync_handler(
FwIndexType portNum //!< The port number
) override;
//! Handler implementation for noArgsSync
//!
//! A typed sync input port
void noArgsSync_handler(
FwIndexType portNum //!< The port number
) override;
//! Handler implementation for typedGuarded
//!
//! A typed guarded input
void typedGuarded_handler(
FwIndexType portNum, //!< The port number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Ports::TypedPortStrings::StringSize80& str1, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
) override;
//! Handler implementation for typedReturnGuarded
//!
//! A typed guarded input with a return type
F32 typedReturnGuarded_handler(
FwIndexType portNum, //!< The port number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Ports::TypedReturnPortStrings::StringSize80& str2, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
) override;
//! Handler implementation for typedReturnSync
//!
//! A typed sync input port with a return type
F32 typedReturnSync_handler(
FwIndexType portNum, //!< The port number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Ports::TypedReturnPortStrings::StringSize80& str2, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
) override;
//! Handler implementation for typedSync
//!
//! A typed sync input port
void typedSync_handler(
FwIndexType portNum, //!< The port number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Ports::TypedPortStrings::StringSize80& str1, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
) override;
PRIVATE:
// ----------------------------------------------------------------------
// Handler implementations for user-defined serial input ports
// ----------------------------------------------------------------------
//! Handler implementation for serialGuarded
//!
//! A serial guarded input
void serialGuarded_handler(
FwIndexType portNum, //!< The port number
Fw::SerializeBufferBase& buffer //!< The serialization buffer
) override;
//! Handler implementation for serialSync
//!
//! A serial sync input port
void serialSync_handler(
FwIndexType portNum, //!< The port number
Fw::SerializeBufferBase& buffer //!< The serialization buffer
) override;
PRIVATE:
// ----------------------------------------------------------------------
// Handler implementations for commands
// ----------------------------------------------------------------------
//! Handler implementation for command CMD_SYNC
//!
//! A sync command with no params
void CMD_SYNC_cmdHandler(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq //!< The command sequence number
) override;
//! Handler implementation for command CMD_SYNC_PRIMITIVE
//!
//! An async command with primitive params
void CMD_SYNC_PRIMITIVE_cmdHandler(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b //!< A boolean
) override;
//! Handler implementation for command CMD_SYNC_STRING
//!
//! A sync command with string params
void CMD_SYNC_STRING_cmdHandler(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
const Fw::CmdStringArg& str1, //!< A string
const Fw::CmdStringArg& str2 //!< Another string
) override;
//! Handler implementation for command CMD_SYNC_ENUM
//!
//! A sync command with enum params
void CMD_SYNC_ENUM_cmdHandler(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
E e //!< An enum
) override;
//! Handler implementation for command CMD_SYNC_ARRAY
//!
//! A sync command with array params
void CMD_SYNC_ARRAY_cmdHandler(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
A a //!< An array
) override;
//! Handler implementation for command CMD_SYNC_STRUCT
//!
//! A sync command with struct params
void CMD_SYNC_STRUCT_cmdHandler(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
S s //!< A struct
) override;
//! Handler implementation for command CMD_GUARDED
//!
//! A guarded command with no params
void CMD_GUARDED_cmdHandler(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq //!< The command sequence number
) override;
//! Handler implementation for command CMD_GUARDED_PRIMITIVE
//!
//! A guarded command with primitive params
void CMD_GUARDED_PRIMITIVE_cmdHandler(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b //!< A boolean
) override;
//! Handler implementation for command CMD_GUARDED_STRING
//!
//! A guarded command with string params
void CMD_GUARDED_STRING_cmdHandler(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
const Fw::CmdStringArg& str1, //!< A string
const Fw::CmdStringArg& str2 //!< Another string
) override;
//! Handler implementation for command CMD_GUARDED_ENUM
//!
//! A guarded command with enum params
void CMD_GUARDED_ENUM_cmdHandler(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
E e //!< An enum
) override;
//! Handler implementation for command CMD_GUARDED_ARRAY
//!
//! A guarded command with array params
void CMD_GUARDED_ARRAY_cmdHandler(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
A a //!< An array
) override;
//! Handler implementation for command CMD_GUARDED_STRUCT
//!
//! A guarded command with struct params
void CMD_GUARDED_STRUCT_cmdHandler(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
S s //!< A struct
) override;
};
#endif