mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -06:00
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>
This commit is contained in:
parent
892df7f5ff
commit
b76d8c9a0c
1
.github/actions/spelling/expect.txt
vendored
1
.github/actions/spelling/expect.txt
vendored
@ -644,6 +644,7 @@ instrlen
|
||||
integertypename
|
||||
intlimits
|
||||
ints
|
||||
Inttype
|
||||
inttype
|
||||
invisi
|
||||
ioc
|
||||
|
||||
@ -63,7 +63,7 @@ impl_file_template = """
|
||||
\#include <${output_header}>
|
||||
|
||||
\#include <FpConfig.hpp>
|
||||
\#include <Fw/Types/BasicTypes.hpp>
|
||||
\#include <FpConfig.hpp>
|
||||
\#include <Fw/Time/Time.hpp>
|
||||
|
||||
// Verify packets not too large for ComBuffer
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
\#define ${namespace}_${name}_HPP
|
||||
|
||||
\#include "Fw/Types/String.hpp"
|
||||
\#include "Fw/Types/BasicTypes.hpp"
|
||||
\#include <FpConfig.hpp>
|
||||
\#include "Fw/Types/Serializable.hpp"
|
||||
#for $t in $include_headers:
|
||||
\#include <${t}>
|
||||
|
||||
@ -131,7 +131,7 @@ namespace ${namespace} {
|
||||
#end if
|
||||
get_${instance}_InputPort(NATIVE_INT_TYPE portNum)
|
||||
{
|
||||
FW_ASSERT(portNum < this->getNum_${instance}_InputPorts(),static_cast<AssertArg>(portNum));
|
||||
FW_ASSERT(portNum < this->getNum_${instance}_InputPorts(),static_cast<FwAssertArgType>(portNum));
|
||||
return &this->m_${instance}_InputPort[portNum];
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ namespace ${namespace} {
|
||||
#end if
|
||||
)
|
||||
{
|
||||
FW_ASSERT(portNum < this->getNum_${instance}_OutputPorts(),static_cast<AssertArg>(portNum));
|
||||
FW_ASSERT(portNum < this->getNum_${instance}_OutputPorts(),static_cast<FwAssertArgType>(portNum));
|
||||
#if $type == "Serial":
|
||||
this->m_${instance}_OutputPort[portNum].registerSerialPort(port);
|
||||
#else:
|
||||
@ -189,7 +189,7 @@ namespace ${namespace} {
|
||||
#end if
|
||||
)
|
||||
{
|
||||
FW_ASSERT(portNum < this->getNum_${instance}_OutputPorts(),static_cast<AssertArg>(portNum));
|
||||
FW_ASSERT(portNum < this->getNum_${instance}_OutputPorts(),static_cast<FwAssertArgType>(portNum));
|
||||
return this->m_${instance}_OutputPort[portNum].registerSerialPort(port);
|
||||
}
|
||||
#if $role == "LogTextEvent":
|
||||
@ -507,7 +507,7 @@ namespace ${namespace} {
|
||||
#end if
|
||||
FW_ASSERT(
|
||||
Os::Queue::QUEUE_OK == qStat,
|
||||
static_cast<AssertArg>(qStat)
|
||||
static_cast<FwAssertArgType>(qStat)
|
||||
);
|
||||
#end if
|
||||
|
||||
@ -538,7 +538,7 @@ namespace ${namespace} {
|
||||
Fw::SerializeBufferBase &Buffer
|
||||
)
|
||||
{
|
||||
FW_ASSERT(portNum < this->getNum_${instance}_OutputPorts(),static_cast<AssertArg>(portNum));
|
||||
FW_ASSERT(portNum < this->getNum_${instance}_OutputPorts(),static_cast<FwAssertArgType>(portNum));
|
||||
return this->m_${instance}_OutputPort[portNum].invokeSerial(Buffer);
|
||||
}
|
||||
#else
|
||||
@ -552,7 +552,7 @@ namespace ${namespace} {
|
||||
)
|
||||
{
|
||||
#end if
|
||||
FW_ASSERT(portNum < this->getNum_${instance}_OutputPorts(),static_cast<AssertArg>(portNum));
|
||||
FW_ASSERT(portNum < this->getNum_${instance}_OutputPorts(),static_cast<FwAssertArgType>(portNum));
|
||||
#if $void_return:
|
||||
this->m_${instance}_OutputPort[portNum].invoke($args);
|
||||
#else:
|
||||
@ -596,7 +596,7 @@ namespace ${namespace} {
|
||||
{
|
||||
FW_ASSERT(
|
||||
portNum < this->getNum_${instance}_OutputPorts(),
|
||||
static_cast<AssertArg>(portNum)
|
||||
static_cast<FwAssertArgType>(portNum)
|
||||
);
|
||||
return this->m_${instance}_OutputPort[portNum].isConnected();
|
||||
}
|
||||
@ -813,7 +813,7 @@ namespace ${namespace} {
|
||||
#end if
|
||||
FW_ASSERT (
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
// Fake port number to make message dequeue work
|
||||
@ -821,25 +821,25 @@ namespace ${namespace} {
|
||||
_status = msg.serialize(port);
|
||||
FW_ASSERT (
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
_status = msg.serialize(opCode);
|
||||
FW_ASSERT (
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
_status = msg.serialize(cmdSeq);
|
||||
FW_ASSERT (
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
_status = msg.serialize(args);
|
||||
FW_ASSERT (
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
// send message
|
||||
@ -859,7 +859,7 @@ namespace ${namespace} {
|
||||
#end if
|
||||
FW_ASSERT(
|
||||
qStatus == Os::Queue::QUEUE_OK,
|
||||
static_cast<AssertArg>(qStatus)
|
||||
static_cast<FwAssertArgType>(qStatus)
|
||||
);
|
||||
|
||||
#end if
|
||||
@ -925,7 +925,7 @@ namespace ${namespace} {
|
||||
#end if
|
||||
FW_ASSERT(
|
||||
_stat == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_stat)
|
||||
static_cast<FwAssertArgType>(_stat)
|
||||
);
|
||||
|
||||
FwChanIdType _id;
|
||||
@ -1206,25 +1206,25 @@ namespace ${namespace} {
|
||||
_status = _logBuff.serialize(static_cast<U8>($len($args)+1));
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
// For FATAL, add stack size of 4 and a dummy entry. No support for stacks yet.
|
||||
_status = _logBuff.serialize(static_cast<U8>(4));
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
_status = _logBuff.serialize(static_cast<U32>(0));
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
#else
|
||||
// Serialize the number of arguments
|
||||
_status = _logBuff.serialize(static_cast<U8>($len($args)));
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
#end if
|
||||
\#endif
|
||||
@ -1235,7 +1235,7 @@ namespace ${namespace} {
|
||||
_zero_status = _logBuff.serialize(static_cast<U8>(0));
|
||||
FW_ASSERT(
|
||||
_zero_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_zero_status)
|
||||
static_cast<FwAssertArgType>(_zero_status)
|
||||
);
|
||||
\#endif
|
||||
#end if
|
||||
@ -1247,7 +1247,7 @@ namespace ${namespace} {
|
||||
_status = _logBuff.serialize(static_cast<U8>(sizeof(FwEnumStoreType)));
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
\#endif
|
||||
|
||||
@ -1264,14 +1264,14 @@ namespace ${namespace} {
|
||||
);
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
\#endif
|
||||
_status = _logBuff.serialize($arg_name);
|
||||
#end if
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
#end for
|
||||
@ -1369,14 +1369,14 @@ namespace ${namespace} {
|
||||
_status = msg.serialize(static_cast<NATIVE_INT_TYPE>(INT_IF_${ifname.upper}));
|
||||
FW_ASSERT (
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
// Fake port number to make message dequeue work
|
||||
_status = msg.serialize(static_cast<NATIVE_INT_TYPE>(0));
|
||||
FW_ASSERT (
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
#for $argname, $argtype, $comment, $typeinfo in $internal_interface_args[$ifname]:
|
||||
@ -1385,7 +1385,7 @@ namespace ${namespace} {
|
||||
#else
|
||||
_status = msg.serialize($argname);
|
||||
#end if
|
||||
FW_ASSERT(_status == Fw::FW_SERIALIZE_OK, static_cast<AssertArg>(_status));
|
||||
FW_ASSERT(_status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(_status));
|
||||
#end for
|
||||
|
||||
// send message
|
||||
@ -1405,7 +1405,7 @@ namespace ${namespace} {
|
||||
#end if
|
||||
FW_ASSERT(
|
||||
qStatus == Os::Queue::QUEUE_OK,
|
||||
static_cast<AssertArg>(qStatus)
|
||||
static_cast<FwAssertArgType>(qStatus)
|
||||
);
|
||||
|
||||
}
|
||||
@ -1481,21 +1481,21 @@ namespace ${namespace} {
|
||||
);
|
||||
FW_ASSERT (
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
// serialize port number
|
||||
_status = msgSerBuff.serialize(portNum);
|
||||
FW_ASSERT (
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
// serialize buffer
|
||||
_status = msgSerBuff.serialize(buffer);
|
||||
FW_ASSERT (
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
// send message
|
||||
@ -1515,7 +1515,7 @@ namespace ${namespace} {
|
||||
#end if
|
||||
FW_ASSERT(
|
||||
qStatus == Os::Queue::QUEUE_OK,
|
||||
static_cast<AssertArg>(qStatus)
|
||||
static_cast<FwAssertArgType>(qStatus)
|
||||
);
|
||||
|
||||
#end if
|
||||
@ -1583,7 +1583,7 @@ namespace ${namespace} {
|
||||
{
|
||||
|
||||
// Make sure port number is valid
|
||||
FW_ASSERT(portNum < this->getNum_${instance}_InputPorts(),static_cast<AssertArg>(portNum));
|
||||
FW_ASSERT(portNum < this->getNum_${instance}_InputPorts(),static_cast<FwAssertArgType>(portNum));
|
||||
#if not $void_return_type:
|
||||
${return_type} retVal;
|
||||
#end if
|
||||
@ -1607,13 +1607,13 @@ namespace ${namespace} {
|
||||
);
|
||||
FW_ASSERT (
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
_status = msg.serialize(portNum);
|
||||
FW_ASSERT (
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
#set $args = $port_args[$instance]
|
||||
@ -1628,7 +1628,7 @@ namespace ${namespace} {
|
||||
#end if
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
#end for
|
||||
@ -1650,7 +1650,7 @@ namespace ${namespace} {
|
||||
#end if
|
||||
FW_ASSERT(
|
||||
qStatus == Os::Queue::QUEUE_OK,
|
||||
static_cast<AssertArg>(qStatus)
|
||||
static_cast<FwAssertArgType>(qStatus)
|
||||
);
|
||||
|
||||
#else:
|
||||
@ -1732,7 +1732,7 @@ namespace ${namespace} {
|
||||
Os::Queue::QueueStatus msgStatus = this->m_queue.receive(msg,priority,Os::Queue::QUEUE_BLOCKING);
|
||||
FW_ASSERT(
|
||||
msgStatus == Os::Queue::QUEUE_OK,
|
||||
static_cast<AssertArg>(msgStatus)
|
||||
static_cast<FwAssertArgType>(msgStatus)
|
||||
);
|
||||
#else
|
||||
Os::Queue::QueueStatus msgStatus = this->m_queue.receive(msg,priority,Os::Queue::QUEUE_NONBLOCKING);
|
||||
@ -1741,7 +1741,7 @@ namespace ${namespace} {
|
||||
} else {
|
||||
FW_ASSERT(
|
||||
msgStatus == Os::Queue::QUEUE_OK,
|
||||
static_cast<AssertArg>(msgStatus)
|
||||
static_cast<FwAssertArgType>(msgStatus)
|
||||
);
|
||||
}
|
||||
#end if
|
||||
@ -1753,7 +1753,7 @@ namespace ${namespace} {
|
||||
Fw::SerializeStatus deserStatus = msg.deserialize(desMsg);
|
||||
FW_ASSERT(
|
||||
deserStatus == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(deserStatus)
|
||||
static_cast<FwAssertArgType>(deserStatus)
|
||||
);
|
||||
|
||||
MsgTypeEnum msgType = static_cast<MsgTypeEnum>(desMsg);
|
||||
@ -1766,7 +1766,7 @@ namespace ${namespace} {
|
||||
deserStatus = msg.deserialize(portNum);
|
||||
FW_ASSERT(
|
||||
deserStatus == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(deserStatus)
|
||||
static_cast<FwAssertArgType>(deserStatus)
|
||||
);
|
||||
|
||||
switch (msgType) {
|
||||
@ -1795,7 +1795,7 @@ namespace ${namespace} {
|
||||
#end if
|
||||
FW_ASSERT(
|
||||
deserStatus == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(deserStatus)
|
||||
static_cast<FwAssertArgType>(deserStatus)
|
||||
);
|
||||
|
||||
#end for
|
||||
@ -1806,7 +1806,7 @@ namespace ${namespace} {
|
||||
deserStatus = msg.deserialize(serHandBuff);
|
||||
FW_ASSERT(
|
||||
deserStatus == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(deserStatus)
|
||||
static_cast<FwAssertArgType>(deserStatus)
|
||||
);
|
||||
this->${instance}_handler(portNum, serHandBuff);
|
||||
#else:
|
||||
@ -1846,7 +1846,7 @@ namespace ${namespace} {
|
||||
deserStatus = msg.deserialize(opCode);
|
||||
FW_ASSERT (
|
||||
deserStatus == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(deserStatus)
|
||||
static_cast<FwAssertArgType>(deserStatus)
|
||||
);
|
||||
|
||||
// Deserialize command sequence
|
||||
@ -1854,7 +1854,7 @@ namespace ${namespace} {
|
||||
deserStatus = msg.deserialize(cmdSeq);
|
||||
FW_ASSERT (
|
||||
deserStatus == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(deserStatus)
|
||||
static_cast<FwAssertArgType>(deserStatus)
|
||||
);
|
||||
|
||||
// Deserialize command argument buffer
|
||||
@ -1862,7 +1862,7 @@ namespace ${namespace} {
|
||||
deserStatus = msg.deserialize(args);
|
||||
FW_ASSERT (
|
||||
deserStatus == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(deserStatus)
|
||||
static_cast<FwAssertArgType>(deserStatus)
|
||||
);
|
||||
|
||||
// Reset buffer
|
||||
@ -1939,7 +1939,7 @@ namespace ${namespace} {
|
||||
// Internal interfaces should always deserialize
|
||||
FW_ASSERT(
|
||||
Fw::FW_SERIALIZE_OK == deserStatus,
|
||||
static_cast<AssertArg>(deserStatus)
|
||||
static_cast<FwAssertArgType>(deserStatus)
|
||||
);
|
||||
|
||||
#end for
|
||||
@ -1947,7 +1947,7 @@ namespace ${namespace} {
|
||||
// That means the buffer size was incorrect.
|
||||
FW_ASSERT(
|
||||
msg.getBuffLeft() == 0,
|
||||
static_cast<AssertArg>(msg.getBuffLeft())
|
||||
static_cast<FwAssertArgType>(msg.getBuffLeft())
|
||||
);
|
||||
|
||||
// Call handler function
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
\#define ${namespace}_${name}_HPP
|
||||
|
||||
\#include "Fw/Types/String.hpp"
|
||||
\#include "Fw/Types/BasicTypes.hpp"
|
||||
\#include <FpConfig.hpp>
|
||||
\#include "Fw/Types/Serializable.hpp"
|
||||
|
||||
#if $namespace
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
\#include <${include_path}/${name}.hpp>
|
||||
\#include "Fw/Types/BasicTypes.hpp"
|
||||
\#include <FpConfig.hpp>
|
||||
|
||||
#if $namespace_list != None
|
||||
#for $namespace in $namespace_list
|
||||
|
||||
@ -50,11 +50,11 @@ ${return_type}Output${name}Port::invoke(${args_proto_string}) {
|
||||
_status = _buffer.serialize($arg[0]);
|
||||
#end if
|
||||
#set $num = $num + 1
|
||||
FW_ASSERT(Fw::FW_SERIALIZE_OK == _status,static_cast<AssertArg>(_status));
|
||||
FW_ASSERT(Fw::FW_SERIALIZE_OK == _status,static_cast<FwAssertArgType>(_status));
|
||||
|
||||
#end for
|
||||
_status = this->m_serPort->invokeSerial(_buffer);
|
||||
FW_ASSERT(Fw::FW_SERIALIZE_OK == _status,static_cast<AssertArg>(_status));
|
||||
FW_ASSERT(Fw::FW_SERIALIZE_OK == _status,static_cast<FwAssertArgType>(_status));
|
||||
}
|
||||
\#else
|
||||
}
|
||||
|
||||
@ -4,6 +4,6 @@
|
||||
\#include <Fw/Port/InputPortBase.hpp>
|
||||
\#include <Fw/Port/OutputPortBase.hpp>
|
||||
\#include <Fw/Comp/PassiveComponentBase.hpp>
|
||||
\#include <Fw/Types/BasicTypes.hpp>
|
||||
\#include <FpConfig.hpp>
|
||||
\#include <Fw/Types/Serializable.hpp>
|
||||
\#include <Fw/Types/StringType.hpp>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
\#include <${include_path}/${namespace}${name}SerializableAc.hpp>
|
||||
\#include <Fw/Types/Assert.hpp>
|
||||
\#include <Fw/Types/BasicTypes.hpp>
|
||||
\#include <FpConfig.hpp>
|
||||
\#include <Fw/Types/StringUtils.hpp>
|
||||
\#if FW_SERIALIZABLE_TO_STRING
|
||||
\#include <Fw/Types/String.hpp>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
\#include <Fw/Types/BasicTypes.hpp>
|
||||
\#include <FpConfig.hpp>
|
||||
\#include <Fw/Types/Serializable.hpp>
|
||||
\#if FW_SERIALIZABLE_TO_STRING
|
||||
\#include <Fw/Types/StringType.hpp>
|
||||
|
||||
@ -222,7 +222,7 @@ $emit_cpp_params([ $param_instance ])
|
||||
$emit_cpp_params([ $param_portNum, $param_port ])
|
||||
)
|
||||
{
|
||||
FW_ASSERT(portNum < this->getNum_to_${instance}(),static_cast<AssertArg>(portNum));
|
||||
FW_ASSERT(portNum < this->getNum_to_${instance}(),static_cast<FwAssertArgType>(portNum));
|
||||
#if $type == "Serial":
|
||||
this->m_to_${instance}[portNum].registerSerialPort($instance);
|
||||
#else:
|
||||
@ -259,11 +259,11 @@ $emit_cpp_port_params([ $param_portNum ] + $port_params[$instance])
|
||||
)
|
||||
#end if
|
||||
{
|
||||
FW_ASSERT(portNum < this->getNum_to_${instance}(),static_cast<AssertArg>(portNum));
|
||||
FW_ASSERT(portNum < this->getNum_to_${instance}(),static_cast<FwAssertArgType>(portNum));
|
||||
#if $serial_type:
|
||||
this->m_to_${instance}[portNum].invokeSerial(Buffer);
|
||||
#else
|
||||
FW_ASSERT(portNum < this->getNum_to_${instance}(),static_cast<AssertArg>(portNum));
|
||||
FW_ASSERT(portNum < this->getNum_to_${instance}(),static_cast<FwAssertArgType>(portNum));
|
||||
#if $void_return_type
|
||||
this->m_to_${instance}[portNum].invoke(
|
||||
#else:
|
||||
@ -285,7 +285,7 @@ $emit_cpp_port_params([ $param_portNum ] + $port_params[$instance])
|
||||
bool ${tester_base} ::
|
||||
isConnected_to_${instance}(const NATIVE_INT_TYPE portNum)
|
||||
{
|
||||
FW_ASSERT(portNum < this->getNum_to_${instance}(), static_cast<AssertArg>(portNum));
|
||||
FW_ASSERT(portNum < this->getNum_to_${instance}(), static_cast<FwAssertArgType>(portNum));
|
||||
return this->m_to_${instance}[portNum].isConnected();
|
||||
}
|
||||
|
||||
@ -308,7 +308,7 @@ $emit_cpp_port_params([ $param_portNum ] + $port_params[$instance])
|
||||
#end if
|
||||
get_from_${instance}(const NATIVE_INT_TYPE portNum)
|
||||
{
|
||||
FW_ASSERT(portNum < this->getNum_from_${instance}(),static_cast<AssertArg>(portNum));
|
||||
FW_ASSERT(portNum < this->getNum_from_${instance}(),static_cast<FwAssertArgType>(portNum));
|
||||
return &this->m_from_${instance}[portNum];
|
||||
}
|
||||
#if $role == "LogTextEvent":
|
||||
@ -378,7 +378,7 @@ $emit_cpp_port_params([ $param_callComp, $param_portNum] + $params)
|
||||
Fw::SerializeBufferBase &Buffer $doxygen_post_comment("The serialization buffer")
|
||||
)
|
||||
{
|
||||
FW_ASSERT(portNum < this->getNum_from_${instance}(),static_cast<AssertArg>(portNum));
|
||||
FW_ASSERT(portNum < this->getNum_from_${instance}(),static_cast<FwAssertArgType>(portNum));
|
||||
this->from_${instance}_handler(
|
||||
portNum,
|
||||
Buffer
|
||||
@ -514,7 +514,7 @@ $emit_cpp_port_params([ $param_callComp, $param_portNum] + $params)
|
||||
_ret = _testerBase->m_param_${prm_name}_valid;
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
}
|
||||
break;
|
||||
@ -559,7 +559,7 @@ $emit_cpp_port_params([ $param_callComp, $param_portNum] + $params)
|
||||
_status = val.deserialize(${prmname}Val);
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
FW_ASSERT(
|
||||
${prmname}Val ==
|
||||
@ -569,7 +569,7 @@ $emit_cpp_port_params([ $param_callComp, $param_portNum] + $params)
|
||||
Fw::ParamString ${prmname}Val;
|
||||
_status = val.deserialize(${prmname}Val);
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,static_cast<AssertArg>(_status)
|
||||
_status == Fw::FW_SERIALIZE_OK,static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
FW_ASSERT(
|
||||
${prmname}Val ==
|
||||
@ -580,7 +580,7 @@ $emit_cpp_port_params([ $param_callComp, $param_portNum] + $params)
|
||||
_status = val.deserialize(${prmname}Val);
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
FW_ASSERT(
|
||||
${prmname}Val ==
|
||||
@ -664,7 +664,7 @@ $emit_cpp_port_params([ $param_portNum ] + $port_params[$instance])
|
||||
#end if
|
||||
)
|
||||
{
|
||||
FW_ASSERT(portNum < this->getNum_from_${instance}(),static_cast<AssertArg>(portNum));
|
||||
FW_ASSERT(portNum < this->getNum_from_${instance}(),static_cast<FwAssertArgType>(portNum));
|
||||
#if $void_params and $void_return_type:
|
||||
this->from_${instance}_handler(portNum);
|
||||
#else if $void_params
|
||||
@ -725,7 +725,7 @@ $emit_cpp_params([ $param_instance, $param_cmdSeq ] + $get_command_params($mnemo
|
||||
#else
|
||||
_status = buff.serialize($arg_name);
|
||||
#end if
|
||||
FW_ASSERT(_status == Fw::FW_SERIALIZE_OK,static_cast<AssertArg>(_status));
|
||||
FW_ASSERT(_status == Fw::FW_SERIALIZE_OK,static_cast<FwAssertArgType>(_status));
|
||||
#end for
|
||||
|
||||
// Call output command port
|
||||
@ -950,7 +950,7 @@ $emit_cpp_params([ $param_const_timeTag, $param_val ])
|
||||
_status = args.deserialize(_numArgs);
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
// verify they match expected.
|
||||
#if $severity == "FATAL"
|
||||
@ -960,14 +960,14 @@ $emit_cpp_params([ $param_const_timeTag, $param_val ])
|
||||
_status = args.deserialize(stackArgLen);
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
FW_ASSERT(4 == stackArgLen,stackArgLen);
|
||||
U32 dummyStackArg;
|
||||
_status = args.deserialize(dummyStackArg);
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
FW_ASSERT(0 == dummyStackArg,dummyStackArg);
|
||||
#else
|
||||
@ -983,7 +983,7 @@ $emit_cpp_params([ $param_const_timeTag, $param_val ])
|
||||
_zero_status = args.deserialize(_noArgs);
|
||||
FW_ASSERT(
|
||||
_zero_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_zero_status)
|
||||
static_cast<FwAssertArgType>(_zero_status)
|
||||
);
|
||||
\#endif
|
||||
#end if
|
||||
@ -996,7 +996,7 @@ $emit_cpp_params([ $param_const_timeTag, $param_val ])
|
||||
_status = args.deserialize(_argSize);
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
FW_ASSERT(_argSize == sizeof(FwEnumStoreType),_argSize,sizeof(FwEnumStoreType));
|
||||
}
|
||||
@ -1017,7 +1017,7 @@ $emit_cpp_params([ $param_const_timeTag, $param_val ])
|
||||
_status = args.deserialize(_argSize);
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
FW_ASSERT(_argSize == sizeof(${type}),_argSize,sizeof(${type}));
|
||||
}
|
||||
@ -1026,7 +1026,7 @@ $emit_cpp_params([ $param_const_timeTag, $param_val ])
|
||||
#end if
|
||||
FW_ASSERT(
|
||||
_status == Fw::FW_SERIALIZE_OK,
|
||||
static_cast<AssertArg>(_status)
|
||||
static_cast<FwAssertArgType>(_status)
|
||||
);
|
||||
|
||||
#end for
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define EXAMPLE_TYPE_HPP
|
||||
|
||||
// A hand-coded serializable
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#if FW_SERIALIZABLE_TO_STRING
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include <Autocoders/Python/test/array_xml/ExampleArrayImpl.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/String.hpp>
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
#include <Fw/Obj/SimpleObjRegistry.hpp>
|
||||
#include <Fw/Types/SerialBuffer.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/String.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
#include <Autocoders/Python/test/command2/TestCommandComponentImpl.hpp>
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace AcTest {
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
#include <Autocoders/Python/test/command_res/Test1ComponentImpl.hpp>
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace Cmd {
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
#include <Fw/Port/FwInputPortBase.hpp>
|
||||
#include <Fw/Port/FwOutputPortBase.hpp>
|
||||
#include <Fw/Comp/FwCompBase.hpp>
|
||||
#include <Fw/Types/FwBasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace Drv {
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include <Autocoders/Python/test/enum_xml/Component1Impl.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
@ -130,12 +130,12 @@ void checkAssertionFailure(
|
||||
Test::UnitTestAssert::File file = Test::UnitTestAssert::fileInit;
|
||||
NATIVE_UINT_TYPE lineNo = 0;
|
||||
NATIVE_UINT_TYPE numArgs = 0;
|
||||
AssertArg arg1 = 0;
|
||||
AssertArg arg2 = 0;
|
||||
AssertArg arg3 = 0;
|
||||
AssertArg arg4 = 0;
|
||||
AssertArg arg5 = 0;
|
||||
AssertArg arg6 = 0;
|
||||
FwAssertArgType arg1 = 0;
|
||||
FwAssertArgType arg2 = 0;
|
||||
FwAssertArgType arg3 = 0;
|
||||
FwAssertArgType arg4 = 0;
|
||||
FwAssertArgType arg5 = 0;
|
||||
FwAssertArgType arg6 = 0;
|
||||
uta.retrieveAssert(file, lineNo, numArgs, arg1, arg2, arg3, arg4, arg5, arg6);
|
||||
ASSERT_EQ(expectedLineNumber, lineNo);
|
||||
ASSERT_EQ(1U, numArgs);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define EXAMPLE_TYPE_HPP
|
||||
|
||||
// A hand-coded serializable
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#if FW_SERIALIZABLE_TO_STRING
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include <Autocoders/Python/test/implgen/MathSenderComponentImpl.hpp>
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace Ref {
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef SOME_STRUCT_HPP
|
||||
#define SOME_STRUCT_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
extern "C" {
|
||||
typedef struct {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define EXAMPLE_TYPE_HPP
|
||||
|
||||
// A hand-coded serializable
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#include <Autocoders/Python/test/interface1/SomeStruct.hpp>
|
||||
#if FW_SERIALIZABLE_TO_STRING
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
#include <Autocoders/Python/test/noargport/ExampleComponentImpl.hpp>
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace ExampleComponents {
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include <Autocoders/Python/test/partition/DuckDuckImpl.hpp>
|
||||
#include <Fw/Types/FwBasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include <Autocoders/Python/test/partition/PartitionImpl.hpp>
|
||||
#include <Fw/Types/FwBasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include <Fw/Port/FwInputPortBase.hpp>
|
||||
#include <Fw/Port/FwOutputPortBase.hpp>
|
||||
#include <Fw/Comp/FwCompBase.hpp>
|
||||
#include <Fw/Types/FwBasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/FwSerializable.hpp>
|
||||
|
||||
#include <Fw/Types/FwStringType.hpp>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include <Autocoders/Python/test/pass_by_kind/Component1.hpp>
|
||||
#include <Autocoders/Python/test/pass_by_kind/ExampleTypeSerializableAc.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/SerialBuffer.hpp>
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
#include <Autocoders/Python/test/port_loopback/ExampleComponentImpl.hpp>
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
#include <cstdio>
|
||||
|
||||
namespace ExampleComponents {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define EXAMPLE_TYPE_HPP
|
||||
|
||||
// A hand-coded serializable
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#if FW_SERIALIZABLE_TO_STRING
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define EXAMPLE_TYPE_HPP
|
||||
|
||||
// A hand-coded serializable
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#if FW_SERIALIZABLE_TO_STRING
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
#include <Autocoders/Python/test/serial_passive/TestSerialImpl.hpp>
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace TestComponents {
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef SOME_STRUCT_HPP
|
||||
#define SOME_STRUCT_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
extern "C" {
|
||||
typedef struct {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define EXAMPLE_TYPE_HPP
|
||||
|
||||
// A hand-coded serializable
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#include <Autocoders/Python/test/serialize_user/SomeStruct.hpp>
|
||||
#if FW_SERIALIZABLE_TO_STRING
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
#include <Autocoders/Python/test/testgen/MathSenderComponentImpl.hpp>
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace Ref {
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#ifndef CFDP_Checksum_HPP
|
||||
#define CFDP_Checksum_HPP
|
||||
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace CFDP {
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include <Drv/BlockDriver/BlockDriverImpl.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
|
||||
namespace Drv {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef _DrvDataBuffer_hpp_
|
||||
#define _DrvDataBuffer_hpp_
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
|
||||
namespace Drv {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include <cstring>
|
||||
#include <Drv/Ip/IpSocket.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/StringUtils.hpp>
|
||||
#include <sys/time.h>
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#ifndef DRV_IP_IPHELPER_HPP_
|
||||
#define DRV_IP_IPHELPER_HPP_
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <IpCfg.hpp>
|
||||
#include <Os/Mutex.hpp>
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
#include <Drv/Ip/TcpClientSocket.hpp>
|
||||
#include <Fw/Logger/Logger.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
#ifdef TGT_OS_TYPE_VXWORKS
|
||||
#include <socket.h>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#ifndef DRV_TCPCLIENT_TCPHELPER_HPP_
|
||||
#define DRV_TCPCLIENT_TCPHELPER_HPP_
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Drv/Ip/IpSocket.hpp>
|
||||
#include <IpCfg.hpp>
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// ======================================================================
|
||||
#include <Drv/Ip/TcpServerSocket.hpp>
|
||||
#include <Fw/Logger/Logger.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
|
||||
#ifdef TGT_OS_TYPE_VXWORKS
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#ifndef DRV_TCPSERVER_TCPHELPER_HPP_
|
||||
#define DRV_TCPSERVER_TCPHELPER_HPP_
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Drv/Ip/IpSocket.hpp>
|
||||
#include <IpCfg.hpp>
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include <Drv/Ip/UdpSocket.hpp>
|
||||
#include <Fw/Logger/Logger.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/StringUtils.hpp>
|
||||
|
||||
#ifdef TGT_OS_TYPE_VXWORKS
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#ifndef DRV_IP_UDPSOCKET_HPP_
|
||||
#define DRV_IP_UDPSOCKET_HPP_
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Drv/Ip/IpSocket.hpp>
|
||||
#include <IpCfg.hpp>
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Created by mstarch on 12/10/20.
|
||||
//
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
#ifndef DRV_TEST_PORTSELECTOR_HPP
|
||||
#define DRV_TEST_PORTSELECTOR_HPP
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Created by mstarch on 12/10/20.
|
||||
//
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw//Buffer/Buffer.hpp>
|
||||
#include <Drv/Ip/IpSocket.hpp>
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
#include <Drv/LinuxGpioDriver/LinuxGpioDriverComponentImpl.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Os/TaskString.hpp>
|
||||
|
||||
// TODO make proper static constants for these
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
#include <Drv/LinuxGpioDriver/LinuxGpioDriverComponentImpl.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace Drv {
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
#include <Drv/LinuxGpioDriver/LinuxGpioDriverComponentImpl.hpp>
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace Drv {
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// ======================================================================
|
||||
|
||||
#include "Fw/Types/Assert.hpp"
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
#include <Drv/LinuxI2cDriver/LinuxI2cDriver.hpp>
|
||||
#include <Fw/Logger/Logger.hpp>
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// ======================================================================
|
||||
|
||||
#include "Fw/Types/Assert.hpp"
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
#include <Drv/LinuxI2cDriver/LinuxI2cDriver.hpp>
|
||||
|
||||
#define DEBUG_PRINT 0
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// ======================================================================
|
||||
|
||||
#include <Drv/LinuxSpiDriver/LinuxSpiDriverComponentImpl.hpp>
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// ======================================================================
|
||||
|
||||
#include <Drv/LinuxSpiDriver/LinuxSpiDriverComponentImpl.hpp>
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace Drv {
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// ======================================================================
|
||||
|
||||
#include <Drv/LinuxSpiDriver/LinuxSpiDriverComponentImpl.hpp>
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace Drv {
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// ======================================================================
|
||||
|
||||
#include <Drv/TcpClient/TcpClientComponentImpl.hpp>
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
#include "Fw/Types/Assert.hpp"
|
||||
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// ======================================================================
|
||||
|
||||
#include <Drv/TcpServer/TcpServerComponentImpl.hpp>
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
#include "Fw/Types/Assert.hpp"
|
||||
|
||||
namespace Drv {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
#include <Drv/Udp/UdpComponentImpl.hpp>
|
||||
#include <IpCfg.hpp>
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
#include "Fw/Types/Assert.hpp"
|
||||
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// ======================================================================
|
||||
#include <Fw/Buffer/Buffer.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
#if FW_SERIALIZABLE_TO_STRING
|
||||
#include <Fw/Types/String.hpp>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#ifndef BUFFER_HPP_
|
||||
#define BUFFER_HPP_
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#if FW_SERIALIZABLE_TO_STRING
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Created by mstarch on 11/13/20.
|
||||
//
|
||||
#include "Fw/Buffer/Buffer.hpp"
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
*/
|
||||
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
|
||||
// Check that command/telemetry strings are not larger than an argument buffer
|
||||
|
||||
|
||||
@ -12,9 +12,8 @@
|
||||
#ifndef FW_CMD_ARG_BUFFER_HPP
|
||||
#define FW_CMD_ARG_BUFFER_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#include <Fw/Cfg/SerIds.hpp>
|
||||
|
||||
namespace Fw {
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
#ifndef FW_CMD_STRING_TYPE_HPP
|
||||
#define FW_CMD_STRING_TYPE_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
#include <Fw/Cfg/SerIds.hpp>
|
||||
|
||||
namespace Fw {
|
||||
|
||||
@ -13,7 +13,6 @@
|
||||
#define FW_COM_BUFFER_HPP
|
||||
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
|
||||
namespace Fw {
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
#include <CFDP/Checksum/Checksum.hpp>
|
||||
#include <Fw/Buffer/Buffer.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/SerialBuffer.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
|
||||
|
||||
@ -13,7 +13,6 @@
|
||||
#define FW_LOG_BUFFER_HPP
|
||||
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#include <Fw/Cfg/SerIds.hpp>
|
||||
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
#ifndef FW_LOG_STRING_TYPE_HPP
|
||||
#define FW_LOG_STRING_TYPE_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
#include <Fw/Cfg/SerIds.hpp>
|
||||
|
||||
namespace Fw {
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
#ifndef FW_TEXT_LOG_STRING_TYPE_HPP
|
||||
#define FW_TEXT_LOG_STRING_TYPE_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
#include <Fw/Cfg/SerIds.hpp>
|
||||
|
||||
namespace Fw {
|
||||
|
||||
@ -36,12 +36,12 @@ namespace Fw {
|
||||
FILE_NAME_ARG file,
|
||||
NATIVE_UINT_TYPE lineNo,
|
||||
NATIVE_UINT_TYPE numArgs,
|
||||
AssertArg arg1,
|
||||
AssertArg arg2,
|
||||
AssertArg arg3,
|
||||
AssertArg arg4,
|
||||
AssertArg arg5,
|
||||
AssertArg arg6
|
||||
FwAssertArgType arg1,
|
||||
FwAssertArgType arg2,
|
||||
FwAssertArgType arg3,
|
||||
FwAssertArgType arg4,
|
||||
FwAssertArgType arg5,
|
||||
FwAssertArgType arg6
|
||||
) {
|
||||
// Assumption is that file (when string) goes back to static macro in the code and will persist
|
||||
switch (numArgs) {
|
||||
|
||||
@ -22,12 +22,12 @@ namespace Fw {
|
||||
FILE_NAME_ARG file,
|
||||
NATIVE_UINT_TYPE lineNo,
|
||||
NATIVE_UINT_TYPE numArgs,
|
||||
AssertArg arg1,
|
||||
AssertArg arg2,
|
||||
AssertArg arg3,
|
||||
AssertArg arg4,
|
||||
AssertArg arg5,
|
||||
AssertArg arg6
|
||||
FwAssertArgType arg1,
|
||||
FwAssertArgType arg2,
|
||||
FwAssertArgType arg3,
|
||||
FwAssertArgType arg4,
|
||||
FwAssertArgType arg5,
|
||||
FwAssertArgType arg6
|
||||
);
|
||||
void printAssert(const CHAR* msg);
|
||||
void doAssert();
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#ifndef _Fw_Logger_hpp_
|
||||
#define _Fw_Logger_hpp_
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace Fw {
|
||||
class Logger {
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
* @author mstarch
|
||||
*/
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Logger/Logger.hpp>
|
||||
|
||||
#ifndef FPRIME_FAKELOGGER_HPP
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
#ifndef FPRIME_LOGGERRULES_HPP
|
||||
#define FPRIME_LOGGERRULES_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/String.hpp>
|
||||
#include <Fw/Logger/test/ut/FakeLogger.hpp>
|
||||
#include <STest/STest/Rule/Rule.hpp>
|
||||
|
||||
@ -13,7 +13,6 @@
|
||||
#ifndef FW_OBJ_BASE_HPP
|
||||
#define FW_OBJ_BASE_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace Fw {
|
||||
|
||||
@ -21,7 +21,6 @@
|
||||
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Obj/ObjBase.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
|
||||
#if FW_OBJECT_REGISTRATION == 1
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
#include <Fw/Port/InputPortBase.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <cstdio>
|
||||
|
||||
namespace Fw {
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
#define FW_INPUT_PORT_BASE_HPP
|
||||
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
#include <Fw/Obj/ObjBase.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#include <Fw/Comp/PassiveComponentBase.hpp>
|
||||
#include <Fw/Port/PortBase.hpp>
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
#include <Fw/Port/OutputPortBase.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Os/Log.hpp>
|
||||
#include <cstdio>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
#define FW_OUTPUT_PORT_BASE_HPP
|
||||
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
#include <Fw/Obj/ObjBase.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#include <Fw/Port/InputPortBase.hpp>
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include <Fw/Port/PortBase.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Logger/Logger.hpp>
|
||||
#include <cstdio>
|
||||
#include "Fw/Types/Assert.hpp"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define FW_PORT_BASE_HPP
|
||||
|
||||
#include <Fw/Obj/ObjBase.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
|
||||
#if FW_PORT_TRACING == 1
|
||||
|
||||
@ -13,7 +13,6 @@
|
||||
#define FW_PRM_BUFFER_HPP
|
||||
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#include <Fw/Cfg/SerIds.hpp>
|
||||
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
#ifndef FW_PRM_STRING_TYPE_HPP
|
||||
#define FW_PRM_STRING_TYPE_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
#include <Fw/Cfg/SerIds.hpp>
|
||||
|
||||
namespace Fw {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
#include <Fw/Types/MallocAllocator.hpp>
|
||||
#include <Fw/SerializableFile/SerializableFile.hpp>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef TEST_STRING_TYPE_HPP
|
||||
#define TEST_STRING_TYPE_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
#include <Fw/Cfg/SerIds.hpp>
|
||||
|
||||
|
||||
@ -43,9 +43,9 @@ namespace Test {
|
||||
void UnitTestAssert::doAssert() {
|
||||
this->m_assertFailed = true;
|
||||
#if FW_ASSERT_LEVEL == FW_FILEID_ASSERT
|
||||
(void)fprintf(stderr,"Assert File: 0x%x, Line: %u\n", this->m_file, this->m_lineNo);
|
||||
(void)fprintf(stderr,"Assert File: 0x%x, Line: %" PRI_FwAssertArgType "\n", this->m_file, this->m_lineNo);
|
||||
#else
|
||||
(void)fprintf(stderr,"Assert File: %s, Line: %u\n", this->m_file.toChar(), this->m_lineNo);
|
||||
(void)fprintf(stderr,"Assert File: %s, Line: %" PRI_FwAssertArgType "\n", this->m_file.toChar(), this->m_lineNo);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -53,12 +53,12 @@ namespace Test {
|
||||
FILE_NAME_ARG file,
|
||||
NATIVE_UINT_TYPE lineNo,
|
||||
NATIVE_UINT_TYPE numArgs,
|
||||
AssertArg arg1,
|
||||
AssertArg arg2,
|
||||
AssertArg arg3,
|
||||
AssertArg arg4,
|
||||
AssertArg arg5,
|
||||
AssertArg arg6
|
||||
FwAssertArgType arg1,
|
||||
FwAssertArgType arg2,
|
||||
FwAssertArgType arg3,
|
||||
FwAssertArgType arg4,
|
||||
FwAssertArgType arg5,
|
||||
FwAssertArgType arg6
|
||||
) {
|
||||
|
||||
#if FW_ASSERT_LEVEL == FW_FILEID_ASSERT
|
||||
@ -82,12 +82,12 @@ namespace Test {
|
||||
File& file,
|
||||
NATIVE_UINT_TYPE& lineNo,
|
||||
NATIVE_UINT_TYPE& numArgs,
|
||||
AssertArg& arg1,
|
||||
AssertArg& arg2,
|
||||
AssertArg& arg3,
|
||||
AssertArg& arg4,
|
||||
AssertArg& arg5,
|
||||
AssertArg& arg6
|
||||
FwAssertArgType& arg1,
|
||||
FwAssertArgType& arg2,
|
||||
FwAssertArgType& arg3,
|
||||
FwAssertArgType& arg4,
|
||||
FwAssertArgType& arg5,
|
||||
FwAssertArgType& arg6
|
||||
) const {
|
||||
|
||||
file = this->m_file;
|
||||
|
||||
@ -34,24 +34,24 @@ namespace Test {
|
||||
FILE_NAME_ARG file,
|
||||
NATIVE_UINT_TYPE lineNo,
|
||||
NATIVE_UINT_TYPE numArgs,
|
||||
AssertArg arg1,
|
||||
AssertArg arg2,
|
||||
AssertArg arg3,
|
||||
AssertArg arg4,
|
||||
AssertArg arg5,
|
||||
AssertArg arg6
|
||||
FwAssertArgType arg1,
|
||||
FwAssertArgType arg2,
|
||||
FwAssertArgType arg3,
|
||||
FwAssertArgType arg4,
|
||||
FwAssertArgType arg5,
|
||||
FwAssertArgType arg6
|
||||
);
|
||||
// retrieves assertion failure values
|
||||
void retrieveAssert(
|
||||
File& file,
|
||||
NATIVE_UINT_TYPE& lineNo,
|
||||
NATIVE_UINT_TYPE& numArgs,
|
||||
AssertArg& arg1,
|
||||
AssertArg& arg2,
|
||||
AssertArg& arg3,
|
||||
AssertArg& arg4,
|
||||
AssertArg& arg5,
|
||||
AssertArg& arg6
|
||||
FwAssertArgType& arg1,
|
||||
FwAssertArgType& arg2,
|
||||
FwAssertArgType& arg3,
|
||||
FwAssertArgType& arg4,
|
||||
FwAssertArgType& arg5,
|
||||
FwAssertArgType& arg6
|
||||
) const;
|
||||
|
||||
// check whether assertion failure occurred
|
||||
@ -64,12 +64,12 @@ namespace Test {
|
||||
File m_file;
|
||||
NATIVE_UINT_TYPE m_lineNo;
|
||||
NATIVE_INT_TYPE m_numArgs;
|
||||
AssertArg m_arg1;
|
||||
AssertArg m_arg2;
|
||||
AssertArg m_arg3;
|
||||
AssertArg m_arg4;
|
||||
AssertArg m_arg5;
|
||||
AssertArg m_arg6;
|
||||
FwAssertArgType m_arg1;
|
||||
FwAssertArgType m_arg2;
|
||||
FwAssertArgType m_arg3;
|
||||
FwAssertArgType m_arg4;
|
||||
FwAssertArgType m_arg5;
|
||||
FwAssertArgType m_arg6;
|
||||
|
||||
// Whether an assertion failed
|
||||
bool m_assertFailed;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include <Fw/Time/Time.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace Fw {
|
||||
const Time ZERO_TIME = Time();
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
#ifndef FW_TIME_HPP
|
||||
#define FW_TIME_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace Fw {
|
||||
class Time: public Serializable {
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
#define FW_TLM_BUFFER_HPP
|
||||
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/Serializable.hpp>
|
||||
#include <Fw/Cfg/SerIds.hpp>
|
||||
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
#ifndef FW_TLM_STRING_TYPE_HPP
|
||||
#define FW_TLM_STRING_TYPE_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/StringType.hpp>
|
||||
#include <Fw/Cfg/SerIds.hpp>
|
||||
|
||||
namespace Fw {
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#ifndef FW_TRAP_HPP
|
||||
#define FW_TRAP_HPP
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
|
||||
namespace Fw {
|
||||
/**
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
#else
|
||||
|
||||
#if FW_ASSERT_LEVEL == FW_FILEID_ASSERT
|
||||
#define fileIdFs "Assert file ID 0x%08X: Line: %d "
|
||||
#define fileIdFs "Assert file ID 0x%08X: Line: %" PRI_FwAssertArgType
|
||||
#else
|
||||
#define fileIdFs "Assert file \"%s\": Line: %d "
|
||||
#define fileIdFs "Assert file \"%s\": Line: %" PRI_FwAssertArgType
|
||||
#endif
|
||||
|
||||
namespace Fw {
|
||||
@ -26,12 +26,12 @@ namespace Fw {
|
||||
FILE_NAME_ARG file,
|
||||
NATIVE_UINT_TYPE lineNo,
|
||||
NATIVE_UINT_TYPE numArgs,
|
||||
AssertArg arg1,
|
||||
AssertArg arg2,
|
||||
AssertArg arg3,
|
||||
AssertArg arg4,
|
||||
AssertArg arg5,
|
||||
AssertArg arg6,
|
||||
FwAssertArgType arg1,
|
||||
FwAssertArgType arg2,
|
||||
FwAssertArgType arg3,
|
||||
FwAssertArgType arg4,
|
||||
FwAssertArgType arg5,
|
||||
FwAssertArgType arg6,
|
||||
CHAR* destBuffer,
|
||||
NATIVE_INT_TYPE buffSize
|
||||
) {
|
||||
@ -82,12 +82,12 @@ namespace Fw {
|
||||
FILE_NAME_ARG file,
|
||||
NATIVE_UINT_TYPE lineNo,
|
||||
NATIVE_UINT_TYPE numArgs,
|
||||
AssertArg arg1,
|
||||
AssertArg arg2,
|
||||
AssertArg arg3,
|
||||
AssertArg arg4,
|
||||
AssertArg arg5,
|
||||
AssertArg arg6
|
||||
FwAssertArgType arg1,
|
||||
FwAssertArgType arg2,
|
||||
FwAssertArgType arg3,
|
||||
FwAssertArgType arg4,
|
||||
FwAssertArgType arg5,
|
||||
FwAssertArgType arg6
|
||||
)
|
||||
{
|
||||
CHAR destBuffer[FW_ASSERT_DFL_MSG_LEN];
|
||||
@ -149,7 +149,7 @@ namespace Fw {
|
||||
}
|
||||
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo,
|
||||
AssertArg arg1) {
|
||||
FwAssertArgType arg1) {
|
||||
if (nullptr == s_assertHook) {
|
||||
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
|
||||
defaultReportAssert(
|
||||
@ -174,8 +174,8 @@ namespace Fw {
|
||||
}
|
||||
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo,
|
||||
AssertArg arg1,
|
||||
AssertArg arg2) {
|
||||
FwAssertArgType arg1,
|
||||
FwAssertArgType arg2) {
|
||||
if (nullptr == s_assertHook) {
|
||||
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
|
||||
defaultReportAssert(
|
||||
@ -199,9 +199,9 @@ namespace Fw {
|
||||
}
|
||||
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo,
|
||||
AssertArg arg1,
|
||||
AssertArg arg2,
|
||||
AssertArg arg3) {
|
||||
FwAssertArgType arg1,
|
||||
FwAssertArgType arg2,
|
||||
FwAssertArgType arg3) {
|
||||
if (nullptr == s_assertHook) {
|
||||
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
|
||||
defaultReportAssert(
|
||||
@ -225,10 +225,10 @@ namespace Fw {
|
||||
}
|
||||
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo,
|
||||
AssertArg arg1,
|
||||
AssertArg arg2,
|
||||
AssertArg arg3,
|
||||
AssertArg arg4) {
|
||||
FwAssertArgType arg1,
|
||||
FwAssertArgType arg2,
|
||||
FwAssertArgType arg3,
|
||||
FwAssertArgType arg4) {
|
||||
if (nullptr == s_assertHook) {
|
||||
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
|
||||
defaultReportAssert(
|
||||
@ -252,11 +252,11 @@ namespace Fw {
|
||||
}
|
||||
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo,
|
||||
AssertArg arg1,
|
||||
AssertArg arg2,
|
||||
AssertArg arg3,
|
||||
AssertArg arg4,
|
||||
AssertArg arg5) {
|
||||
FwAssertArgType arg1,
|
||||
FwAssertArgType arg2,
|
||||
FwAssertArgType arg3,
|
||||
FwAssertArgType arg4,
|
||||
FwAssertArgType arg5) {
|
||||
if (nullptr == s_assertHook) {
|
||||
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
|
||||
defaultReportAssert(
|
||||
@ -280,12 +280,12 @@ namespace Fw {
|
||||
}
|
||||
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo,
|
||||
AssertArg arg1,
|
||||
AssertArg arg2,
|
||||
AssertArg arg3,
|
||||
AssertArg arg4,
|
||||
AssertArg arg5,
|
||||
AssertArg arg6) {
|
||||
FwAssertArgType arg1,
|
||||
FwAssertArgType arg2,
|
||||
FwAssertArgType arg3,
|
||||
FwAssertArgType arg4,
|
||||
FwAssertArgType arg5,
|
||||
FwAssertArgType arg6) {
|
||||
if (nullptr == s_assertHook) {
|
||||
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
|
||||
defaultReportAssert(
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
#define FW_ASSERT_HPP
|
||||
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
|
||||
#if FW_ASSERT_LEVEL == FW_NO_ASSERT
|
||||
#define FW_ASSERT(...)
|
||||
@ -36,12 +35,12 @@
|
||||
|
||||
namespace Fw {
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo) CLANG_ANALYZER_NORETURN; //!< Assert with no arguments
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, AssertArg arg1) CLANG_ANALYZER_NORETURN; //!< Assert with one argument
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, AssertArg arg1, AssertArg arg2) CLANG_ANALYZER_NORETURN; //!< Assert with two arguments
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, AssertArg arg1, AssertArg arg2, AssertArg arg3) CLANG_ANALYZER_NORETURN; //!< Assert with three arguments
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, AssertArg arg1, AssertArg arg2, AssertArg arg3, AssertArg arg4) CLANG_ANALYZER_NORETURN; //!< Assert with four arguments
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, AssertArg arg1, AssertArg arg2, AssertArg arg3, AssertArg arg4, AssertArg arg5) CLANG_ANALYZER_NORETURN; //!< Assert with five arguments
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, AssertArg arg1, AssertArg arg2, AssertArg arg3, AssertArg arg4, AssertArg arg5, AssertArg arg6) CLANG_ANALYZER_NORETURN; //!< Assert with six arguments
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, FwAssertArgType arg1) CLANG_ANALYZER_NORETURN; //!< Assert with one argument
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, FwAssertArgType arg1, FwAssertArgType arg2) CLANG_ANALYZER_NORETURN; //!< Assert with two arguments
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3) CLANG_ANALYZER_NORETURN; //!< Assert with three arguments
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4) CLANG_ANALYZER_NORETURN; //!< Assert with four arguments
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5) CLANG_ANALYZER_NORETURN; //!< Assert with five arguments
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5, FwAssertArgType arg6) CLANG_ANALYZER_NORETURN; //!< Assert with six arguments
|
||||
}
|
||||
|
||||
// Base class for declaring an assert hook
|
||||
@ -59,12 +58,12 @@ namespace Fw {
|
||||
FILE_NAME_ARG file,
|
||||
NATIVE_UINT_TYPE lineNo,
|
||||
NATIVE_UINT_TYPE numArgs,
|
||||
AssertArg arg1,
|
||||
AssertArg arg2,
|
||||
AssertArg arg3,
|
||||
AssertArg arg4,
|
||||
AssertArg arg5,
|
||||
AssertArg arg6
|
||||
FwAssertArgType arg1,
|
||||
FwAssertArgType arg2,
|
||||
FwAssertArgType arg3,
|
||||
FwAssertArgType arg4,
|
||||
FwAssertArgType arg5,
|
||||
FwAssertArgType arg6
|
||||
);
|
||||
// default reportAssert() will call this when the message is built
|
||||
// override it to do another kind of print. printf by default
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* \file
|
||||
* \author T. Canham
|
||||
* \brief Declares ISF basic types
|
||||
* \brief Declares fprime basic types
|
||||
*
|
||||
* \copyright
|
||||
* Copyright 2009-2016, by the California Institute of Technology.
|
||||
@ -13,90 +13,52 @@
|
||||
#ifndef FW_BASIC_TYPES_HPP
|
||||
#define FW_BASIC_TYPES_HPP
|
||||
|
||||
#include <FpConfig.hpp>
|
||||
#include <StandardTypes.hpp> // This header will be found be include paths by target. This hides different header files for each target.
|
||||
#include <PlatformTypes.hpp>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
// Define native integer/unsigned integer types
|
||||
#ifdef _WRS_KERNEL
|
||||
typedef int32_t NATIVE_INT_TYPE;
|
||||
typedef uint32_t NATIVE_UINT_TYPE;
|
||||
#else
|
||||
// Allow overriding of native types for systems whose stdint.h is malformed
|
||||
#ifndef FPRIME_OVERRIDE_NATIVE_TYPES
|
||||
typedef int NATIVE_INT_TYPE; //!< native integer type declaration
|
||||
typedef unsigned int NATIVE_UINT_TYPE; //!< native unsigned integer type declaration
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined __GNUC__ || __llvm__
|
||||
|
||||
// This is used to cast pointers to integers
|
||||
// when a pointer needs to be stored generically.
|
||||
// In order to avoid chopping off bits,
|
||||
// the integer bit size needs to match
|
||||
// the pointer bit size.
|
||||
|
||||
#ifdef __SIZEOF_POINTER__
|
||||
#if __SIZEOF_POINTER__ == 8
|
||||
#define POINTER_CAST U64
|
||||
#elif __SIZEOF_POINTER__ == 4
|
||||
#define POINTER_CAST U32
|
||||
#elif __SIZEOF_POINTER__ == 2
|
||||
#define POINTER_CAST U16
|
||||
#else
|
||||
#define POINTER_CAST U8
|
||||
#endif
|
||||
#elif defined (__i386) && __i386 == 1 // GCC 4.1.2
|
||||
#define POINTER_CAST U32
|
||||
#elif defined (__x86_64) && __x86_64 == 1 // GCC 4.1.2
|
||||
#define POINTER_CAST U64
|
||||
#elif defined (CPU) && defined (PPC604) && CPU == PPC604 // VxWorks 6.7 RAD750
|
||||
#define POINTER_CAST U32
|
||||
#elif defined (CPU) && defined(SPARC) && CPU == SPARC
|
||||
#define POINTER_CAST U32
|
||||
#else
|
||||
#error Cannot get size of pointer cast!
|
||||
#error Unsupported compiler!
|
||||
#endif
|
||||
|
||||
#else
|
||||
#error Unsupported compiler!
|
||||
#endif
|
||||
|
||||
// compile-time assert
|
||||
#define COMPILE_TIME_ASSERT( condition, name )\
|
||||
do { \
|
||||
enum { assert_failed_ ## name = 1/(condition) }; \
|
||||
} while(0)
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
typedef int8_t I8; //!< 8-bit signed integer
|
||||
typedef uint8_t U8; //!< 8-bit unsigned integer
|
||||
typedef U8 BYTE; //!< byte type
|
||||
typedef char CHAR;
|
||||
|
||||
#if FW_HAS_16_BIT
|
||||
typedef int16_t I16; //!< 16-bit signed integer
|
||||
typedef uint16_t U16; //!< 16-bit unsigned integer
|
||||
typedef int16_t I16; //!< 16-bit signed integer
|
||||
typedef uint16_t U16; //!< 16-bit unsigned integer
|
||||
#endif
|
||||
|
||||
#if FW_HAS_32_BIT
|
||||
typedef uint32_t U32; //!< 32-bit signed integer
|
||||
typedef int32_t I32; //!< 32-bit unsigned integer
|
||||
typedef uint32_t U32; //!< 32-bit signed integer
|
||||
typedef int32_t I32; //!< 32-bit unsigned integer
|
||||
#endif
|
||||
|
||||
#if FW_HAS_64_BIT
|
||||
typedef int64_t I64; //!< 64-bit signed integer
|
||||
typedef uint64_t U64; //!< 64-bit unsigned integer
|
||||
typedef int64_t I64; //!< 64-bit signed integer
|
||||
typedef uint64_t U64; //!< 64-bit unsigned integer
|
||||
#endif
|
||||
|
||||
typedef float F32; //!< 32-bit floating point
|
||||
#if FW_HAS_F64
|
||||
typedef double F64; //!< 64-bit floating point
|
||||
typedef double F64; //!< 64-bit floating point
|
||||
#endif
|
||||
|
||||
typedef char CHAR;
|
||||
typedef PlatformIntType NATIVE_INT_TYPE;
|
||||
typedef PlatformUIntType NATIVE_UINT_TYPE;
|
||||
typedef PlatformPointerCastType POINTER_CAST;
|
||||
|
||||
// compile-time assert
|
||||
#define COMPILE_TIME_ASSERT( condition, name )\
|
||||
do { \
|
||||
enum { assert_failed_ ## name = 1/(condition) }; \
|
||||
} while(0)
|
||||
|
||||
|
||||
#define FW_NUM_ARRAY_ELEMENTS(a) (sizeof(a)/sizeof((a)[0])) //!< number of elements in an array
|
||||
|
||||
@ -121,4 +83,33 @@ typedef char CHAR;
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
/**
|
||||
* BasicLimits:
|
||||
*
|
||||
* Limits for the fprime provided types. Implemented as a class with static
|
||||
* constants to ensure that storage is not allocated although the definitions
|
||||
* exist.
|
||||
*/
|
||||
struct BasicLimits : PlatformLimits {
|
||||
static const int8_t I8_MIN = INT8_MIN;
|
||||
static const int8_t I8_MAX = INT8_MAX;
|
||||
static const uint8_t U8_MIN = 0;
|
||||
static const uint8_t U8_MAX = UINT8_MAX;
|
||||
|
||||
static const I16 I16_MIN = INT16_MIN;
|
||||
static const I16 I16_MAX = INT16_MAX;
|
||||
static const U16 U16_MIN = 0;
|
||||
static const U16 U16_MAX = UINT16_MAX;
|
||||
|
||||
static const I32 I32_MIN = INT32_MIN;
|
||||
static const I32 I32_MAX = INT32_MAX;
|
||||
static const U32 U32_MIN = 0;
|
||||
static const U32 U32_MAX = UINT32_MAX;
|
||||
|
||||
static const I64 I64_MIN = INT64_MIN;
|
||||
static const I64 I64_MAX = INT64_MAX;
|
||||
static const U64 U64_MIN = 0;
|
||||
static const U64 U64_MAX = UINT64_MAX;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#ifndef Fw_ByteArray_HPP
|
||||
#define Fw_ByteArray_HPP
|
||||
|
||||
#include "Fw/Types/BasicTypes.hpp"
|
||||
#include <FpConfig.hpp>
|
||||
|
||||
namespace Fw {
|
||||
|
||||
|
||||
@ -9,7 +9,6 @@
|
||||
#define FWCASSERT_HPP_
|
||||
|
||||
#include <FpConfig.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
|
||||
#if FW_ASSERT_LEVEL == FW_NO_ASSERT
|
||||
|
||||
|
||||
@ -6,8 +6,9 @@
|
||||
#
|
||||
# Note: using PROJECT_NAME as EXECUTABLE_NAME
|
||||
####
|
||||
set(SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/Assert.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Types.fpp"
|
||||
|
||||
set(SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/Types.fpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Assert.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/String.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/InternalInterfaceString.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/MallocAllocator.cpp"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user