mirror of
https://github.com/nasa/fprime.git
synced 2025-12-17 13:37:29 -06:00
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.
83 lines
1.9 KiB
C++
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
|