fprime/Autocoders/Python/test/noargport/ExampleComponentImpl.cpp
Joshua Anderson 3d73695493
Improve argument-less port autocoder tests
There's been reports of the autocoder failing to generate valid c++ for
ports without arguments. This improves the existing test case for argument-
less ports to validate that the autocoder correctly generates code for these
ports.
2020-12-21 13:57:40 -08:00

83 lines
1.9 KiB
C++

// ======================================================================
// \title ExampleComponentImpl.cpp
// \author joshuaa
// \brief cpp file for Example component implementation class
//
// \copyright
// Copyright 2009-2015, by the California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include <Autocoders/Python/test/noargport/ExampleComponentImpl.hpp>
#include "Fw/Types/BasicTypes.hpp"
namespace ExampleComponents {
// ----------------------------------------------------------------------
// Construction, initialization, and destruction
// ----------------------------------------------------------------------
ExampleComponentImpl ::
ExampleComponentImpl(
const char *const compName
) : ExampleComponentBase(compName)
{
}
void ExampleComponentImpl ::
init(
const NATIVE_INT_TYPE queueDepth,
const NATIVE_INT_TYPE instance
)
{
ExampleComponentBase::init(queueDepth, instance);
}
ExampleComponentImpl ::
~ExampleComponentImpl(void)
{
}
// ----------------------------------------------------------------------
// Handler implementations for user-defined typed input ports
// ----------------------------------------------------------------------
void ExampleComponentImpl ::
noArgPort_handler(
const NATIVE_INT_TYPE portNum
)
{
// TODO
}
void ExampleComponentImpl ::
asyncNoArgPort_handler(
const NATIVE_INT_TYPE portNum
)
{
// TODO
}
void ExampleComponentImpl ::
guardedNoArgPort_handler(
const NATIVE_INT_TYPE portNum
)
{
// TODO
}
U32 ExampleComponentImpl ::
exampleInput_handler(
const NATIVE_INT_TYPE portNum
)
{
return 0;
}
} // end namespace ExampleComponents