M Starch b76d8c9a0c
Update/types refactor as constants (#1623)
* lestarch: adding logical types implementation into Linux/StandardTypes.hpp

* lestarch: removing VxWorks StandardTypes from repository

* updated fprime types for correct compilation with vxworks and baremetal

* lestarch: refactoring types and configuration header w.r.t type design

* lestarch: replacing usages of AssertArg with FwAssertArgType

* lestarch: missspelled configuration

* lestarch: minor compilation fixes

* lestarch: renaming StandardTypes.hpp -> PlatformTypes.hpp

* lestarch: updating PRI tokens

* lestarch: replacing BasicTypes.hpp includes with FpConfig.hpp

* lestarch: UT and compilation fixes for types refactor

* lestarch: sp

* lestarch: fixing RPI issues in PassiveConsoleTextLogger

* lestarch: converting RPI build to debug

* lestarch: removing duplicate config imports

* lestarch: fixing documentation

* lestarch: fixing up multiple definitions and RPI compilation problems

* lestarch: reverting debug build

* lestarch: reverting platform types to class-based constants

* lestarch: reworking basic types

* lestarch: configured types refactor into classes

* lestarch: fixing bugs with static constants in classes

* lestarch: fixing platform types spelling and documentation

* lestarch: adding include guards to types headers

Co-authored-by: Kevin F Ortega <kevin.f.ortega@jpl.nasa.gov>
2022-08-18 13:25:56 -07:00

51 lines
1.7 KiB
C++

#include <Autocoders/Python/test/pass_by_kind/Component1.hpp>
#include <Autocoders/Python/test/pass_by_kind/ExampleTypeSerializableAc.hpp>
#include <FpConfig.hpp>
#include <Fw/Types/SerialBuffer.hpp>
#include <cstdio>
#include <iostream>
using namespace std;
namespace Example {
Component1::Component1(const char* compName) : Component1ComponentBase(compName) {
}
Component1::~Component1() {
}
void Component1::init(NATIVE_INT_TYPE queueDepth) {
Component1ComponentBase::init(queueDepth);
}
void Component1::AsyncPort_handler(NATIVE_INT_TYPE portNum,U32 *arg1, U32 &arg2, U32 arg3,
ExampleType *arg4, ExampleType &arg5, const ExampleType &arg6,
Arg7String *arg7, Arg8String &arg8, const Arg9String &arg9) {
*arg1 = 1;
arg2 = 1;
// arg3 is a stack variable -- assigning to it has no effect
arg4->set(1);
arg5.set(1);
// arg6 is a const ref -- compiler won't let us modify through it
*arg7 = "one";
arg8 = "one";
// arg9 is a const ref -- compiler won't let us modify through it
}
void Component1::SyncPort_handler(NATIVE_INT_TYPE portNum,U32 *arg1, U32 &arg2, U32 arg3,
ExampleType *arg4, ExampleType &arg5, const ExampleType &arg6,
Arg7String *arg7, Arg8String &arg8, const Arg9String &arg9) {
*arg1 = 1;
arg2 = 1;
// arg3 is a stack variable -- assigning to it has no effect
arg4->set(1);
arg5.set(1);
// arg6 is a const ref -- compiler won't let us modify through it
*arg7 = "one";
arg8 = "one";
// arg9 is a const ref -- compiler won't let us modify through it
}
};