mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 17:47:10 -06:00
* 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>
55 lines
1.2 KiB
C++
55 lines
1.2 KiB
C++
#include <FpConfig.hpp>
|
|
#include <Fw/Port/OutputPortBase.hpp>
|
|
#include <Os/Log.hpp>
|
|
#include <cstdio>
|
|
#include <Fw/Types/Assert.hpp>
|
|
|
|
|
|
namespace Fw {
|
|
|
|
OutputPortBase::OutputPortBase() : PortBase()
|
|
#if FW_PORT_SERIALIZATION == 1
|
|
,m_serPort(nullptr)
|
|
#endif
|
|
{
|
|
|
|
}
|
|
|
|
OutputPortBase::~OutputPortBase() {
|
|
}
|
|
|
|
void OutputPortBase::init() {
|
|
PortBase::init();
|
|
}
|
|
#if FW_PORT_SERIALIZATION == 1
|
|
void OutputPortBase::registerSerialPort(InputPortBase* port) {
|
|
FW_ASSERT(port);
|
|
this->m_connObj = port;
|
|
this->m_serPort = port;
|
|
}
|
|
|
|
SerializeStatus OutputPortBase::invokeSerial(SerializeBufferBase &buffer) {
|
|
FW_ASSERT(this->m_serPort);
|
|
return this->m_serPort->invokeSerial(buffer);
|
|
}
|
|
#endif
|
|
|
|
#if FW_OBJECT_TO_STRING == 1
|
|
void OutputPortBase::toString(char* buffer, NATIVE_INT_TYPE size) {
|
|
#if FW_OBJECT_NAMES == 1
|
|
FW_ASSERT(size > 0);
|
|
if (snprintf(buffer, size, "OutputPort: %s %s->(%s)", this->m_objName, this->isConnected() ? "C" : "NC",
|
|
this->isConnected() ? this->m_connObj->getObjName() : "None") < 0) {
|
|
buffer[0] = 0;
|
|
}
|
|
#else
|
|
(void)snprintf(buffer,size,"%s","OutputPort");
|
|
#endif
|
|
|
|
}
|
|
#endif
|
|
|
|
|
|
}
|
|
|