diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index e1bc9d9d10..62c5b9d029 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -644,6 +644,7 @@ instrlen integertypename intlimits ints +Inttype inttype invisi ioc diff --git a/Autocoders/Python/bin/tlm_packet_gen.py b/Autocoders/Python/bin/tlm_packet_gen.py index f2d5d815d2..b1c82b0e07 100755 --- a/Autocoders/Python/bin/tlm_packet_gen.py +++ b/Autocoders/Python/bin/tlm_packet_gen.py @@ -63,7 +63,7 @@ impl_file_template = """ \#include <${output_header}> \#include -\#include +\#include \#include // Verify packets not too large for ComBuffer diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/arrays/array_hpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/arrays/array_hpp.tmpl index 96c83429e1..2313b77de7 100644 --- a/Autocoders/Python/src/fprime_ac/generators/templates/arrays/array_hpp.tmpl +++ b/Autocoders/Python/src/fprime_ac/generators/templates/arrays/array_hpp.tmpl @@ -15,7 +15,7 @@ \#define ${namespace}_${name}_HPP \#include "Fw/Types/String.hpp" -\#include "Fw/Types/BasicTypes.hpp" +\#include \#include "Fw/Types/Serializable.hpp" #for $t in $include_headers: \#include <${t}> diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/component/cpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/component/cpp.tmpl index e475948005..0974c86792 100644 --- a/Autocoders/Python/src/fprime_ac/generators/templates/component/cpp.tmpl +++ b/Autocoders/Python/src/fprime_ac/generators/templates/component/cpp.tmpl @@ -131,7 +131,7 @@ namespace ${namespace} { #end if get_${instance}_InputPort(NATIVE_INT_TYPE portNum) { - FW_ASSERT(portNum < this->getNum_${instance}_InputPorts(),static_cast(portNum)); + FW_ASSERT(portNum < this->getNum_${instance}_InputPorts(),static_cast(portNum)); return &this->m_${instance}_InputPort[portNum]; } @@ -157,7 +157,7 @@ namespace ${namespace} { #end if ) { - FW_ASSERT(portNum < this->getNum_${instance}_OutputPorts(),static_cast(portNum)); + FW_ASSERT(portNum < this->getNum_${instance}_OutputPorts(),static_cast(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(portNum)); + FW_ASSERT(portNum < this->getNum_${instance}_OutputPorts(),static_cast(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(qStat) + static_cast(qStat) ); #end if @@ -538,7 +538,7 @@ namespace ${namespace} { Fw::SerializeBufferBase &Buffer ) { - FW_ASSERT(portNum < this->getNum_${instance}_OutputPorts(),static_cast(portNum)); + FW_ASSERT(portNum < this->getNum_${instance}_OutputPorts(),static_cast(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(portNum)); + FW_ASSERT(portNum < this->getNum_${instance}_OutputPorts(),static_cast(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(portNum) + static_cast(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(_status) + static_cast(_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(_status) + static_cast(_status) ); _status = msg.serialize(opCode); FW_ASSERT ( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); _status = msg.serialize(cmdSeq); FW_ASSERT ( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); _status = msg.serialize(args); FW_ASSERT ( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); // send message @@ -859,7 +859,7 @@ namespace ${namespace} { #end if FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, - static_cast(qStatus) + static_cast(qStatus) ); #end if @@ -925,7 +925,7 @@ namespace ${namespace} { #end if FW_ASSERT( _stat == Fw::FW_SERIALIZE_OK, - static_cast(_stat) + static_cast(_stat) ); FwChanIdType _id; @@ -1206,25 +1206,25 @@ namespace ${namespace} { _status = _logBuff.serialize(static_cast($len($args)+1)); FW_ASSERT( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); // For FATAL, add stack size of 4 and a dummy entry. No support for stacks yet. _status = _logBuff.serialize(static_cast(4)); FW_ASSERT( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); _status = _logBuff.serialize(static_cast(0)); FW_ASSERT( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); #else // Serialize the number of arguments _status = _logBuff.serialize(static_cast($len($args))); FW_ASSERT( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); #end if \#endif @@ -1235,7 +1235,7 @@ namespace ${namespace} { _zero_status = _logBuff.serialize(static_cast(0)); FW_ASSERT( _zero_status == Fw::FW_SERIALIZE_OK, - static_cast(_zero_status) + static_cast(_zero_status) ); \#endif #end if @@ -1247,7 +1247,7 @@ namespace ${namespace} { _status = _logBuff.serialize(static_cast(sizeof(FwEnumStoreType))); FW_ASSERT( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); \#endif @@ -1264,14 +1264,14 @@ namespace ${namespace} { ); FW_ASSERT( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); \#endif _status = _logBuff.serialize($arg_name); #end if FW_ASSERT( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); #end for @@ -1369,14 +1369,14 @@ namespace ${namespace} { _status = msg.serialize(static_cast(INT_IF_${ifname.upper})); FW_ASSERT ( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); // Fake port number to make message dequeue work _status = msg.serialize(static_cast(0)); FW_ASSERT ( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_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(_status)); + FW_ASSERT(_status == Fw::FW_SERIALIZE_OK, static_cast(_status)); #end for // send message @@ -1405,7 +1405,7 @@ namespace ${namespace} { #end if FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, - static_cast(qStatus) + static_cast(qStatus) ); } @@ -1481,21 +1481,21 @@ namespace ${namespace} { ); FW_ASSERT ( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); // serialize port number _status = msgSerBuff.serialize(portNum); FW_ASSERT ( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); // serialize buffer _status = msgSerBuff.serialize(buffer); FW_ASSERT ( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); // send message @@ -1515,7 +1515,7 @@ namespace ${namespace} { #end if FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, - static_cast(qStatus) + static_cast(qStatus) ); #end if @@ -1583,7 +1583,7 @@ namespace ${namespace} { { // Make sure port number is valid - FW_ASSERT(portNum < this->getNum_${instance}_InputPorts(),static_cast(portNum)); + FW_ASSERT(portNum < this->getNum_${instance}_InputPorts(),static_cast(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(_status) + static_cast(_status) ); _status = msg.serialize(portNum); FW_ASSERT ( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); #set $args = $port_args[$instance] @@ -1628,7 +1628,7 @@ namespace ${namespace} { #end if FW_ASSERT( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_status) ); #end for @@ -1650,7 +1650,7 @@ namespace ${namespace} { #end if FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, - static_cast(qStatus) + static_cast(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(msgStatus) + static_cast(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(msgStatus) + static_cast(msgStatus) ); } #end if @@ -1753,7 +1753,7 @@ namespace ${namespace} { Fw::SerializeStatus deserStatus = msg.deserialize(desMsg); FW_ASSERT( deserStatus == Fw::FW_SERIALIZE_OK, - static_cast(deserStatus) + static_cast(deserStatus) ); MsgTypeEnum msgType = static_cast(desMsg); @@ -1766,7 +1766,7 @@ namespace ${namespace} { deserStatus = msg.deserialize(portNum); FW_ASSERT( deserStatus == Fw::FW_SERIALIZE_OK, - static_cast(deserStatus) + static_cast(deserStatus) ); switch (msgType) { @@ -1795,7 +1795,7 @@ namespace ${namespace} { #end if FW_ASSERT( deserStatus == Fw::FW_SERIALIZE_OK, - static_cast(deserStatus) + static_cast(deserStatus) ); #end for @@ -1806,7 +1806,7 @@ namespace ${namespace} { deserStatus = msg.deserialize(serHandBuff); FW_ASSERT( deserStatus == Fw::FW_SERIALIZE_OK, - static_cast(deserStatus) + static_cast(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(deserStatus) + static_cast(deserStatus) ); // Deserialize command sequence @@ -1854,7 +1854,7 @@ namespace ${namespace} { deserStatus = msg.deserialize(cmdSeq); FW_ASSERT ( deserStatus == Fw::FW_SERIALIZE_OK, - static_cast(deserStatus) + static_cast(deserStatus) ); // Deserialize command argument buffer @@ -1862,7 +1862,7 @@ namespace ${namespace} { deserStatus = msg.deserialize(args); FW_ASSERT ( deserStatus == Fw::FW_SERIALIZE_OK, - static_cast(deserStatus) + static_cast(deserStatus) ); // Reset buffer @@ -1939,7 +1939,7 @@ namespace ${namespace} { // Internal interfaces should always deserialize FW_ASSERT( Fw::FW_SERIALIZE_OK == deserStatus, - static_cast(deserStatus) + static_cast(deserStatus) ); #end for @@ -1947,7 +1947,7 @@ namespace ${namespace} { // That means the buffer size was incorrect. FW_ASSERT( msg.getBuffLeft() == 0, - static_cast(msg.getBuffLeft()) + static_cast(msg.getBuffLeft()) ); // Call handler function diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/enums/enum_hpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/enums/enum_hpp.tmpl index 2d9df6a7c0..defe4540fb 100644 --- a/Autocoders/Python/src/fprime_ac/generators/templates/enums/enum_hpp.tmpl +++ b/Autocoders/Python/src/fprime_ac/generators/templates/enums/enum_hpp.tmpl @@ -15,7 +15,7 @@ \#define ${namespace}_${name}_HPP \#include "Fw/Types/String.hpp" -\#include "Fw/Types/BasicTypes.hpp" +\#include \#include "Fw/Types/Serializable.hpp" #if $namespace diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/impl/cpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/impl/cpp.tmpl index 2fdb13bad1..2d641b8914 100644 --- a/Autocoders/Python/src/fprime_ac/generators/templates/impl/cpp.tmpl +++ b/Autocoders/Python/src/fprime_ac/generators/templates/impl/cpp.tmpl @@ -6,7 +6,7 @@ \#include <${include_path}/${name}.hpp> -\#include "Fw/Types/BasicTypes.hpp" +\#include #if $namespace_list != None #for $namespace in $namespace_list diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/port/finishPortCpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/port/finishPortCpp.tmpl index feee95aa01..c0aae49b91 100644 --- a/Autocoders/Python/src/fprime_ac/generators/templates/port/finishPortCpp.tmpl +++ b/Autocoders/Python/src/fprime_ac/generators/templates/port/finishPortCpp.tmpl @@ -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(_status)); + FW_ASSERT(Fw::FW_SERIALIZE_OK == _status,static_cast(_status)); #end for _status = this->m_serPort->invokeSerial(_buffer); - FW_ASSERT(Fw::FW_SERIALIZE_OK == _status,static_cast(_status)); + FW_ASSERT(Fw::FW_SERIALIZE_OK == _status,static_cast(_status)); } \#else } diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/port/includes1PortH.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/port/includes1PortH.tmpl index 47a7d3ec3f..c772e94d00 100644 --- a/Autocoders/Python/src/fprime_ac/generators/templates/port/includes1PortH.tmpl +++ b/Autocoders/Python/src/fprime_ac/generators/templates/port/includes1PortH.tmpl @@ -4,6 +4,6 @@ \#include \#include \#include -\#include +\#include \#include \#include diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/serialize/includes1SerialCpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/serialize/includes1SerialCpp.tmpl index 0d11c2af0e..02a96490a0 100644 --- a/Autocoders/Python/src/fprime_ac/generators/templates/serialize/includes1SerialCpp.tmpl +++ b/Autocoders/Python/src/fprime_ac/generators/templates/serialize/includes1SerialCpp.tmpl @@ -1,6 +1,6 @@ \#include <${include_path}/${namespace}${name}SerializableAc.hpp> \#include -\#include +\#include \#include \#if FW_SERIALIZABLE_TO_STRING \#include diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/serialize/includes1SerialH.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/serialize/includes1SerialH.tmpl index 394fb1a265..8593a29087 100644 --- a/Autocoders/Python/src/fprime_ac/generators/templates/serialize/includes1SerialH.tmpl +++ b/Autocoders/Python/src/fprime_ac/generators/templates/serialize/includes1SerialH.tmpl @@ -1,4 +1,4 @@ -\#include +\#include \#include \#if FW_SERIALIZABLE_TO_STRING \#include diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/test/cpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/test/cpp.tmpl index a69e7c5744..a148bbfa0b 100644 --- a/Autocoders/Python/src/fprime_ac/generators/templates/test/cpp.tmpl +++ b/Autocoders/Python/src/fprime_ac/generators/templates/test/cpp.tmpl @@ -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(portNum)); + FW_ASSERT(portNum < this->getNum_to_${instance}(),static_cast(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(portNum)); + FW_ASSERT(portNum < this->getNum_to_${instance}(),static_cast(portNum)); #if $serial_type: this->m_to_${instance}[portNum].invokeSerial(Buffer); #else - FW_ASSERT(portNum < this->getNum_to_${instance}(),static_cast(portNum)); + FW_ASSERT(portNum < this->getNum_to_${instance}(),static_cast(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(portNum)); + FW_ASSERT(portNum < this->getNum_to_${instance}(), static_cast(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(portNum)); + FW_ASSERT(portNum < this->getNum_from_${instance}(),static_cast(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(portNum)); + FW_ASSERT(portNum < this->getNum_from_${instance}(),static_cast(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(_status) + static_cast(_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(_status) + static_cast(_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(_status) + _status == Fw::FW_SERIALIZE_OK,static_cast(_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(_status) + static_cast(_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(portNum)); + FW_ASSERT(portNum < this->getNum_from_${instance}(),static_cast(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(_status)); + FW_ASSERT(_status == Fw::FW_SERIALIZE_OK,static_cast(_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(_status) + static_cast(_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(_status) + static_cast(_status) ); FW_ASSERT(4 == stackArgLen,stackArgLen); U32 dummyStackArg; _status = args.deserialize(dummyStackArg); FW_ASSERT( _status == Fw::FW_SERIALIZE_OK, - static_cast(_status) + static_cast(_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(_zero_status) + static_cast(_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(_status) + static_cast(_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(_status) + static_cast(_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(_status) + static_cast(_status) ); #end for diff --git a/Autocoders/Python/templates/ExampleType.hpp b/Autocoders/Python/templates/ExampleType.hpp index ecc2762ccd..91883bbbd7 100644 --- a/Autocoders/Python/templates/ExampleType.hpp +++ b/Autocoders/Python/templates/ExampleType.hpp @@ -2,7 +2,7 @@ #define EXAMPLE_TYPE_HPP // A hand-coded serializable -#include +#include #include #if FW_SERIALIZABLE_TO_STRING #include diff --git a/Autocoders/Python/test/array_xml/ExampleArrayImpl.cpp b/Autocoders/Python/test/array_xml/ExampleArrayImpl.cpp index b055302ec4..d56216b7ea 100644 --- a/Autocoders/Python/test/array_xml/ExampleArrayImpl.cpp +++ b/Autocoders/Python/test/array_xml/ExampleArrayImpl.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/Autocoders/Python/test/array_xml/test/ut/main.cpp b/Autocoders/Python/test/array_xml/test/ut/main.cpp index 6d0cfc6463..3f95f88783 100644 --- a/Autocoders/Python/test/array_xml/test/ut/main.cpp +++ b/Autocoders/Python/test/array_xml/test/ut/main.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include diff --git a/Autocoders/Python/test/command2/TestCommandComponentImpl.cpp b/Autocoders/Python/test/command2/TestCommandComponentImpl.cpp index 8c94288e73..3e5ff44765 100644 --- a/Autocoders/Python/test/command2/TestCommandComponentImpl.cpp +++ b/Autocoders/Python/test/command2/TestCommandComponentImpl.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace AcTest { diff --git a/Autocoders/Python/test/command_res/Test1ComponentImpl.cpp b/Autocoders/Python/test/command_res/Test1ComponentImpl.cpp index e3b7586c9c..61f8a570fe 100644 --- a/Autocoders/Python/test/command_res/Test1ComponentImpl.cpp +++ b/Autocoders/Python/test/command_res/Test1ComponentImpl.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Cmd { diff --git a/Autocoders/Python/test/enum1port/DrvTimingSignalPort.hpp b/Autocoders/Python/test/enum1port/DrvTimingSignalPort.hpp index 2db34fd0d6..193576f0b8 100644 --- a/Autocoders/Python/test/enum1port/DrvTimingSignalPort.hpp +++ b/Autocoders/Python/test/enum1port/DrvTimingSignalPort.hpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include namespace Drv { diff --git a/Autocoders/Python/test/enum_xml/Component1Impl.cpp b/Autocoders/Python/test/enum_xml/Component1Impl.cpp index c471aab6bb..95b80dbadd 100644 --- a/Autocoders/Python/test/enum_xml/Component1Impl.cpp +++ b/Autocoders/Python/test/enum_xml/Component1Impl.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/Autocoders/Python/test/enum_xml/main.cpp b/Autocoders/Python/test/enum_xml/main.cpp index 601a18b068..079b282405 100644 --- a/Autocoders/Python/test/enum_xml/main.cpp +++ b/Autocoders/Python/test/enum_xml/main.cpp @@ -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); diff --git a/Autocoders/Python/test/ext_dict/ExampleType.hpp b/Autocoders/Python/test/ext_dict/ExampleType.hpp index 1c8f104d06..c67f30aee7 100644 --- a/Autocoders/Python/test/ext_dict/ExampleType.hpp +++ b/Autocoders/Python/test/ext_dict/ExampleType.hpp @@ -2,7 +2,7 @@ #define EXAMPLE_TYPE_HPP // A hand-coded serializable -#include +#include #include #if FW_SERIALIZABLE_TO_STRING #include diff --git a/Autocoders/Python/test/implgen/templates/MathSenderComponentImpl_cpp-template.txt b/Autocoders/Python/test/implgen/templates/MathSenderComponentImpl_cpp-template.txt index 4b5678a73e..7ad49e9d0c 100644 --- a/Autocoders/Python/test/implgen/templates/MathSenderComponentImpl_cpp-template.txt +++ b/Autocoders/Python/test/implgen/templates/MathSenderComponentImpl_cpp-template.txt @@ -1,5 +1,5 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Ref { diff --git a/Autocoders/Python/test/interface1/SomeStruct.hpp b/Autocoders/Python/test/interface1/SomeStruct.hpp index 110fc5ff55..df60193f9c 100644 --- a/Autocoders/Python/test/interface1/SomeStruct.hpp +++ b/Autocoders/Python/test/interface1/SomeStruct.hpp @@ -1,7 +1,7 @@ #ifndef SOME_STRUCT_HPP #define SOME_STRUCT_HPP -#include +#include extern "C" { typedef struct { diff --git a/Autocoders/Python/test/interface1/UserSerializer.hpp b/Autocoders/Python/test/interface1/UserSerializer.hpp index b6ea7948f4..c6c730aca0 100644 --- a/Autocoders/Python/test/interface1/UserSerializer.hpp +++ b/Autocoders/Python/test/interface1/UserSerializer.hpp @@ -2,7 +2,7 @@ #define EXAMPLE_TYPE_HPP // A hand-coded serializable -#include +#include #include #include #if FW_SERIALIZABLE_TO_STRING diff --git a/Autocoders/Python/test/noargport/ExampleComponentImpl.cpp b/Autocoders/Python/test/noargport/ExampleComponentImpl.cpp index 4cba2dc177..7c96b21ea6 100644 --- a/Autocoders/Python/test/noargport/ExampleComponentImpl.cpp +++ b/Autocoders/Python/test/noargport/ExampleComponentImpl.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace ExampleComponents { diff --git a/Autocoders/Python/test/partition/DuckDuckImpl.cpp b/Autocoders/Python/test/partition/DuckDuckImpl.cpp index 091f9654ce..10145e5d7a 100644 --- a/Autocoders/Python/test/partition/DuckDuckImpl.cpp +++ b/Autocoders/Python/test/partition/DuckDuckImpl.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/Autocoders/Python/test/partition/PartitionImpl.cpp b/Autocoders/Python/test/partition/PartitionImpl.cpp index e43fae07c9..d90c2fd23a 100644 --- a/Autocoders/Python/test/partition/PartitionImpl.cpp +++ b/Autocoders/Python/test/partition/PartitionImpl.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/Autocoders/Python/test/pass_by_attrib/Msg1Port.hpp b/Autocoders/Python/test/pass_by_attrib/Msg1Port.hpp index ab2bb158b9..85ab6e77d0 100644 --- a/Autocoders/Python/test/pass_by_attrib/Msg1Port.hpp +++ b/Autocoders/Python/test/pass_by_attrib/Msg1Port.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/Autocoders/Python/test/pass_by_kind/Component1.cpp b/Autocoders/Python/test/pass_by_kind/Component1.cpp index a7d5c33e97..5965125c18 100644 --- a/Autocoders/Python/test/pass_by_kind/Component1.cpp +++ b/Autocoders/Python/test/pass_by_kind/Component1.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include #include diff --git a/Autocoders/Python/test/port_loopback/ExampleComponentImpl.cpp b/Autocoders/Python/test/port_loopback/ExampleComponentImpl.cpp index f9760799ba..ace6e94c1b 100644 --- a/Autocoders/Python/test/port_loopback/ExampleComponentImpl.cpp +++ b/Autocoders/Python/test/port_loopback/ExampleComponentImpl.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include #include namespace ExampleComponents { diff --git a/Autocoders/Python/test/port_loopback/ExampleType.hpp b/Autocoders/Python/test/port_loopback/ExampleType.hpp index ecc2762ccd..91883bbbd7 100644 --- a/Autocoders/Python/test/port_loopback/ExampleType.hpp +++ b/Autocoders/Python/test/port_loopback/ExampleType.hpp @@ -2,7 +2,7 @@ #define EXAMPLE_TYPE_HPP // A hand-coded serializable -#include +#include #include #if FW_SERIALIZABLE_TO_STRING #include diff --git a/Autocoders/Python/test/port_nogen/ExampleType.hpp b/Autocoders/Python/test/port_nogen/ExampleType.hpp index 8809099da4..6a60913da9 100644 --- a/Autocoders/Python/test/port_nogen/ExampleType.hpp +++ b/Autocoders/Python/test/port_nogen/ExampleType.hpp @@ -2,7 +2,7 @@ #define EXAMPLE_TYPE_HPP // A hand-coded serializable -#include +#include #include #if FW_SERIALIZABLE_TO_STRING #include diff --git a/Autocoders/Python/test/serial_passive/TestSerialImpl.cpp b/Autocoders/Python/test/serial_passive/TestSerialImpl.cpp index 073e4276c8..657e7a9ad9 100644 --- a/Autocoders/Python/test/serial_passive/TestSerialImpl.cpp +++ b/Autocoders/Python/test/serial_passive/TestSerialImpl.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace TestComponents { diff --git a/Autocoders/Python/test/serialize_user/SomeStruct.hpp b/Autocoders/Python/test/serialize_user/SomeStruct.hpp index 110fc5ff55..df60193f9c 100644 --- a/Autocoders/Python/test/serialize_user/SomeStruct.hpp +++ b/Autocoders/Python/test/serialize_user/SomeStruct.hpp @@ -1,7 +1,7 @@ #ifndef SOME_STRUCT_HPP #define SOME_STRUCT_HPP -#include +#include extern "C" { typedef struct { diff --git a/Autocoders/Python/test/serialize_user/UserSerializer.hpp b/Autocoders/Python/test/serialize_user/UserSerializer.hpp index d46584ff18..c460623999 100644 --- a/Autocoders/Python/test/serialize_user/UserSerializer.hpp +++ b/Autocoders/Python/test/serialize_user/UserSerializer.hpp @@ -2,7 +2,7 @@ #define EXAMPLE_TYPE_HPP // A hand-coded serializable -#include +#include #include #include #if FW_SERIALIZABLE_TO_STRING diff --git a/Autocoders/Python/test/testgen/MathSenderComponentImpl.cpp b/Autocoders/Python/test/testgen/MathSenderComponentImpl.cpp index 1e5d4a8ba6..f6b6d9c465 100644 --- a/Autocoders/Python/test/testgen/MathSenderComponentImpl.cpp +++ b/Autocoders/Python/test/testgen/MathSenderComponentImpl.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Ref { diff --git a/CFDP/Checksum/Checksum.hpp b/CFDP/Checksum/Checksum.hpp index 7ccfe2e8fd..7f444a3cf2 100644 --- a/CFDP/Checksum/Checksum.hpp +++ b/CFDP/Checksum/Checksum.hpp @@ -13,7 +13,7 @@ #ifndef CFDP_Checksum_HPP #define CFDP_Checksum_HPP -#include "Fw/Types/BasicTypes.hpp" +#include namespace CFDP { diff --git a/Drv/BlockDriver/BlockDriverImpl.cpp b/Drv/BlockDriver/BlockDriverImpl.cpp index bf8f40fb88..ecd20c2083 100644 --- a/Drv/BlockDriver/BlockDriverImpl.cpp +++ b/Drv/BlockDriver/BlockDriverImpl.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include namespace Drv { diff --git a/Drv/DataTypes/DataBuffer.hpp b/Drv/DataTypes/DataBuffer.hpp index 99215f5006..5530a5bbd0 100644 --- a/Drv/DataTypes/DataBuffer.hpp +++ b/Drv/DataTypes/DataBuffer.hpp @@ -1,7 +1,7 @@ #ifndef _DrvDataBuffer_hpp_ #define _DrvDataBuffer_hpp_ -#include +#include #include namespace Drv { diff --git a/Drv/Ip/IpSocket.cpp b/Drv/Ip/IpSocket.cpp index f5cf42d2b6..f7cfb7ecea 100644 --- a/Drv/Ip/IpSocket.cpp +++ b/Drv/Ip/IpSocket.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/Drv/Ip/IpSocket.hpp b/Drv/Ip/IpSocket.hpp index 870ea2e2fe..fe2f57993f 100644 --- a/Drv/Ip/IpSocket.hpp +++ b/Drv/Ip/IpSocket.hpp @@ -12,7 +12,7 @@ #ifndef DRV_IP_IPHELPER_HPP_ #define DRV_IP_IPHELPER_HPP_ -#include +#include #include #include diff --git a/Drv/Ip/TcpClientSocket.cpp b/Drv/Ip/TcpClientSocket.cpp index 9699b0a6c1..99f7d5017c 100644 --- a/Drv/Ip/TcpClientSocket.cpp +++ b/Drv/Ip/TcpClientSocket.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #ifdef TGT_OS_TYPE_VXWORKS #include diff --git a/Drv/Ip/TcpClientSocket.hpp b/Drv/Ip/TcpClientSocket.hpp index 079be73718..ebe1aa53b2 100644 --- a/Drv/Ip/TcpClientSocket.hpp +++ b/Drv/Ip/TcpClientSocket.hpp @@ -12,7 +12,7 @@ #ifndef DRV_TCPCLIENT_TCPHELPER_HPP_ #define DRV_TCPCLIENT_TCPHELPER_HPP_ -#include +#include #include #include diff --git a/Drv/Ip/TcpServerSocket.cpp b/Drv/Ip/TcpServerSocket.cpp index 10cc355350..ac4be73401 100644 --- a/Drv/Ip/TcpServerSocket.cpp +++ b/Drv/Ip/TcpServerSocket.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include #include -#include +#include #ifdef TGT_OS_TYPE_VXWORKS diff --git a/Drv/Ip/TcpServerSocket.hpp b/Drv/Ip/TcpServerSocket.hpp index 94ea98d3a2..9410d040d2 100644 --- a/Drv/Ip/TcpServerSocket.hpp +++ b/Drv/Ip/TcpServerSocket.hpp @@ -12,7 +12,7 @@ #ifndef DRV_TCPSERVER_TCPHELPER_HPP_ #define DRV_TCPSERVER_TCPHELPER_HPP_ -#include +#include #include #include diff --git a/Drv/Ip/UdpSocket.cpp b/Drv/Ip/UdpSocket.cpp index a748667fc9..6996e52b4b 100644 --- a/Drv/Ip/UdpSocket.cpp +++ b/Drv/Ip/UdpSocket.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #ifdef TGT_OS_TYPE_VXWORKS diff --git a/Drv/Ip/UdpSocket.hpp b/Drv/Ip/UdpSocket.hpp index afdec15378..c73126bd5c 100644 --- a/Drv/Ip/UdpSocket.hpp +++ b/Drv/Ip/UdpSocket.hpp @@ -12,7 +12,7 @@ #ifndef DRV_IP_UDPSOCKET_HPP_ #define DRV_IP_UDPSOCKET_HPP_ -#include +#include #include #include diff --git a/Drv/Ip/test/ut/PortSelector.hpp b/Drv/Ip/test/ut/PortSelector.hpp index fa7f6ef73b..07a1a5de5a 100644 --- a/Drv/Ip/test/ut/PortSelector.hpp +++ b/Drv/Ip/test/ut/PortSelector.hpp @@ -1,7 +1,7 @@ // // Created by mstarch on 12/10/20. // -#include +#include #ifndef DRV_TEST_PORTSELECTOR_HPP #define DRV_TEST_PORTSELECTOR_HPP diff --git a/Drv/Ip/test/ut/SocketTestHelper.hpp b/Drv/Ip/test/ut/SocketTestHelper.hpp index ec02921b63..71f6f12b84 100644 --- a/Drv/Ip/test/ut/SocketTestHelper.hpp +++ b/Drv/Ip/test/ut/SocketTestHelper.hpp @@ -1,7 +1,7 @@ // // Created by mstarch on 12/10/20. // -#include +#include #include #include diff --git a/Drv/LinuxGpioDriver/LinuxGpioDriverComponentImpl.cpp b/Drv/LinuxGpioDriver/LinuxGpioDriverComponentImpl.cpp index ca87395036..3b4eec017f 100644 --- a/Drv/LinuxGpioDriver/LinuxGpioDriverComponentImpl.cpp +++ b/Drv/LinuxGpioDriver/LinuxGpioDriverComponentImpl.cpp @@ -12,7 +12,7 @@ #include -#include +#include #include // TODO make proper static constants for these diff --git a/Drv/LinuxGpioDriver/LinuxGpioDriverComponentImplCommon.cpp b/Drv/LinuxGpioDriver/LinuxGpioDriverComponentImplCommon.cpp index 0df4643e2a..3fc402d806 100644 --- a/Drv/LinuxGpioDriver/LinuxGpioDriverComponentImplCommon.cpp +++ b/Drv/LinuxGpioDriver/LinuxGpioDriverComponentImplCommon.cpp @@ -12,7 +12,7 @@ #include -#include +#include namespace Drv { diff --git a/Drv/LinuxGpioDriver/LinuxGpioDriverComponentImplStub.cpp b/Drv/LinuxGpioDriver/LinuxGpioDriverComponentImplStub.cpp index d439cf095f..761b36dab7 100644 --- a/Drv/LinuxGpioDriver/LinuxGpioDriverComponentImplStub.cpp +++ b/Drv/LinuxGpioDriver/LinuxGpioDriverComponentImplStub.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Drv { diff --git a/Drv/LinuxI2cDriver/LinuxI2cDriver.cpp b/Drv/LinuxI2cDriver/LinuxI2cDriver.cpp index 49af977849..9afb610d75 100644 --- a/Drv/LinuxI2cDriver/LinuxI2cDriver.cpp +++ b/Drv/LinuxI2cDriver/LinuxI2cDriver.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include "Fw/Types/Assert.hpp" -#include "Fw/Types/BasicTypes.hpp" +#include #include #include diff --git a/Drv/LinuxI2cDriver/LinuxI2cDriverStub.cpp b/Drv/LinuxI2cDriver/LinuxI2cDriverStub.cpp index 780491ae6d..b3346aed89 100644 --- a/Drv/LinuxI2cDriver/LinuxI2cDriverStub.cpp +++ b/Drv/LinuxI2cDriver/LinuxI2cDriverStub.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include "Fw/Types/Assert.hpp" -#include "Fw/Types/BasicTypes.hpp" +#include #include #define DEBUG_PRINT 0 diff --git a/Drv/LinuxSpiDriver/LinuxSpiDriverComponentImpl.cpp b/Drv/LinuxSpiDriver/LinuxSpiDriverComponentImpl.cpp index c84567ccae..0090095d5e 100644 --- a/Drv/LinuxSpiDriver/LinuxSpiDriverComponentImpl.cpp +++ b/Drv/LinuxSpiDriver/LinuxSpiDriverComponentImpl.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include -#include "Fw/Types/BasicTypes.hpp" +#include #include #include diff --git a/Drv/LinuxSpiDriver/LinuxSpiDriverComponentImplCommon.cpp b/Drv/LinuxSpiDriver/LinuxSpiDriverComponentImplCommon.cpp index 9de8bbd5e8..7a8b03f451 100644 --- a/Drv/LinuxSpiDriver/LinuxSpiDriverComponentImplCommon.cpp +++ b/Drv/LinuxSpiDriver/LinuxSpiDriverComponentImplCommon.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Drv { diff --git a/Drv/LinuxSpiDriver/LinuxSpiDriverComponentImplStub.cpp b/Drv/LinuxSpiDriver/LinuxSpiDriverComponentImplStub.cpp index ab030c8ca2..3b3ebe0aa6 100644 --- a/Drv/LinuxSpiDriver/LinuxSpiDriverComponentImplStub.cpp +++ b/Drv/LinuxSpiDriver/LinuxSpiDriverComponentImplStub.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Drv { diff --git a/Drv/TcpClient/TcpClientComponentImpl.cpp b/Drv/TcpClient/TcpClientComponentImpl.cpp index 8b75d881bd..05aec9270b 100644 --- a/Drv/TcpClient/TcpClientComponentImpl.cpp +++ b/Drv/TcpClient/TcpClientComponentImpl.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include -#include "Fw/Types/BasicTypes.hpp" +#include #include "Fw/Types/Assert.hpp" diff --git a/Drv/TcpServer/TcpServerComponentImpl.cpp b/Drv/TcpServer/TcpServerComponentImpl.cpp index f8115b26e9..86f65abd70 100644 --- a/Drv/TcpServer/TcpServerComponentImpl.cpp +++ b/Drv/TcpServer/TcpServerComponentImpl.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include -#include "Fw/Types/BasicTypes.hpp" +#include #include "Fw/Types/Assert.hpp" namespace Drv { diff --git a/Drv/Udp/UdpComponentImpl.cpp b/Drv/Udp/UdpComponentImpl.cpp index 6072098e1e..e45cd9fd87 100644 --- a/Drv/Udp/UdpComponentImpl.cpp +++ b/Drv/Udp/UdpComponentImpl.cpp @@ -12,7 +12,7 @@ #include #include -#include "Fw/Types/BasicTypes.hpp" +#include #include "Fw/Types/Assert.hpp" diff --git a/Fw/Buffer/Buffer.cpp b/Fw/Buffer/Buffer.cpp index e1a2890d00..010c2dc963 100644 --- a/Fw/Buffer/Buffer.cpp +++ b/Fw/Buffer/Buffer.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include #include -#include +#include #if FW_SERIALIZABLE_TO_STRING #include diff --git a/Fw/Buffer/Buffer.hpp b/Fw/Buffer/Buffer.hpp index 1ac3bc11d8..50d021216b 100644 --- a/Fw/Buffer/Buffer.hpp +++ b/Fw/Buffer/Buffer.hpp @@ -12,7 +12,7 @@ #ifndef BUFFER_HPP_ #define BUFFER_HPP_ -#include +#include #include #if FW_SERIALIZABLE_TO_STRING #include diff --git a/Fw/Buffer/test/ut/TestBuffer.cpp b/Fw/Buffer/test/ut/TestBuffer.cpp index e0bbb514d4..fd2d11aaf5 100644 --- a/Fw/Buffer/test/ut/TestBuffer.cpp +++ b/Fw/Buffer/test/ut/TestBuffer.cpp @@ -2,7 +2,7 @@ // Created by mstarch on 11/13/20. // #include "Fw/Buffer/Buffer.hpp" -#include "Fw/Types/BasicTypes.hpp" +#include #include diff --git a/Fw/Cfg/ConfigCheck.cpp b/Fw/Cfg/ConfigCheck.cpp index 43350e05cf..da218bcccf 100644 --- a/Fw/Cfg/ConfigCheck.cpp +++ b/Fw/Cfg/ConfigCheck.cpp @@ -11,7 +11,6 @@ */ #include -#include // Check that command/telemetry strings are not larger than an argument buffer diff --git a/Fw/Cmd/CmdArgBuffer.hpp b/Fw/Cmd/CmdArgBuffer.hpp index 8e72f220bc..4744c6124c 100644 --- a/Fw/Cmd/CmdArgBuffer.hpp +++ b/Fw/Cmd/CmdArgBuffer.hpp @@ -12,9 +12,8 @@ #ifndef FW_CMD_ARG_BUFFER_HPP #define FW_CMD_ARG_BUFFER_HPP -#include -#include #include +#include #include namespace Fw { diff --git a/Fw/Cmd/CmdString.hpp b/Fw/Cmd/CmdString.hpp index d9d283f188..4e3a9dfe7d 100644 --- a/Fw/Cmd/CmdString.hpp +++ b/Fw/Cmd/CmdString.hpp @@ -1,9 +1,8 @@ #ifndef FW_CMD_STRING_TYPE_HPP #define FW_CMD_STRING_TYPE_HPP -#include -#include #include +#include #include namespace Fw { diff --git a/Fw/Com/ComBuffer.hpp b/Fw/Com/ComBuffer.hpp index dc52506566..a9d552a630 100644 --- a/Fw/Com/ComBuffer.hpp +++ b/Fw/Com/ComBuffer.hpp @@ -13,7 +13,6 @@ #define FW_COM_BUFFER_HPP #include -#include #include namespace Fw { diff --git a/Fw/FilePacket/FilePacket.hpp b/Fw/FilePacket/FilePacket.hpp index 8f6cf995dc..09b58cffca 100644 --- a/Fw/FilePacket/FilePacket.hpp +++ b/Fw/FilePacket/FilePacket.hpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include diff --git a/Fw/Log/LogBuffer.hpp b/Fw/Log/LogBuffer.hpp index e33fed20a6..8e310f8f3c 100644 --- a/Fw/Log/LogBuffer.hpp +++ b/Fw/Log/LogBuffer.hpp @@ -13,7 +13,6 @@ #define FW_LOG_BUFFER_HPP #include -#include #include #include diff --git a/Fw/Log/LogString.hpp b/Fw/Log/LogString.hpp index 2c3e4e14be..533e2ddf24 100644 --- a/Fw/Log/LogString.hpp +++ b/Fw/Log/LogString.hpp @@ -1,9 +1,8 @@ #ifndef FW_LOG_STRING_TYPE_HPP #define FW_LOG_STRING_TYPE_HPP -#include -#include #include +#include #include namespace Fw { diff --git a/Fw/Log/TextLogString.hpp b/Fw/Log/TextLogString.hpp index 43c0c602b8..e25f7273f2 100644 --- a/Fw/Log/TextLogString.hpp +++ b/Fw/Log/TextLogString.hpp @@ -1,9 +1,8 @@ #ifndef FW_TEXT_LOG_STRING_TYPE_HPP #define FW_TEXT_LOG_STRING_TYPE_HPP -#include -#include #include +#include #include namespace Fw { diff --git a/Fw/Logger/LogAssert.cpp b/Fw/Logger/LogAssert.cpp index 488b17e6b9..4eca41f9b0 100644 --- a/Fw/Logger/LogAssert.cpp +++ b/Fw/Logger/LogAssert.cpp @@ -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) { diff --git a/Fw/Logger/LogAssert.hpp b/Fw/Logger/LogAssert.hpp index 03401e4786..6927b06d90 100644 --- a/Fw/Logger/LogAssert.hpp +++ b/Fw/Logger/LogAssert.hpp @@ -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(); diff --git a/Fw/Logger/Logger.hpp b/Fw/Logger/Logger.hpp index bca6b273ce..981612b09c 100644 --- a/Fw/Logger/Logger.hpp +++ b/Fw/Logger/Logger.hpp @@ -9,7 +9,7 @@ #ifndef _Fw_Logger_hpp_ #define _Fw_Logger_hpp_ -#include +#include namespace Fw { class Logger { diff --git a/Fw/Logger/test/ut/FakeLogger.hpp b/Fw/Logger/test/ut/FakeLogger.hpp index 439b374a97..125023d4b9 100644 --- a/Fw/Logger/test/ut/FakeLogger.hpp +++ b/Fw/Logger/test/ut/FakeLogger.hpp @@ -7,7 +7,7 @@ * @author mstarch */ -#include +#include #include #ifndef FPRIME_FAKELOGGER_HPP diff --git a/Fw/Logger/test/ut/LoggerRules.hpp b/Fw/Logger/test/ut/LoggerRules.hpp index 0b8405264d..a0f34a4948 100644 --- a/Fw/Logger/test/ut/LoggerRules.hpp +++ b/Fw/Logger/test/ut/LoggerRules.hpp @@ -15,7 +15,7 @@ #ifndef FPRIME_LOGGERRULES_HPP #define FPRIME_LOGGERRULES_HPP -#include +#include #include #include #include diff --git a/Fw/Obj/ObjBase.hpp b/Fw/Obj/ObjBase.hpp index 629fbeb740..ac06088d83 100644 --- a/Fw/Obj/ObjBase.hpp +++ b/Fw/Obj/ObjBase.hpp @@ -13,7 +13,6 @@ #ifndef FW_OBJ_BASE_HPP #define FW_OBJ_BASE_HPP -#include #include namespace Fw { diff --git a/Fw/Obj/SimpleObjRegistry.hpp b/Fw/Obj/SimpleObjRegistry.hpp index b0cd805f86..4d700b698e 100644 --- a/Fw/Obj/SimpleObjRegistry.hpp +++ b/Fw/Obj/SimpleObjRegistry.hpp @@ -21,7 +21,6 @@ #include #include -#include #if FW_OBJECT_REGISTRATION == 1 diff --git a/Fw/Port/InputPortBase.cpp b/Fw/Port/InputPortBase.cpp index 40168bce71..b82aedcf94 100644 --- a/Fw/Port/InputPortBase.cpp +++ b/Fw/Port/InputPortBase.cpp @@ -1,8 +1,6 @@ #include - #include #include -#include #include namespace Fw { diff --git a/Fw/Port/InputPortBase.hpp b/Fw/Port/InputPortBase.hpp index 1752d47177..5499c7c610 100644 --- a/Fw/Port/InputPortBase.hpp +++ b/Fw/Port/InputPortBase.hpp @@ -2,9 +2,7 @@ #define FW_INPUT_PORT_BASE_HPP #include - #include -#include #include #include #include diff --git a/Fw/Port/OutputPortBase.cpp b/Fw/Port/OutputPortBase.cpp index 44e67034d3..0ac06fd3ae 100644 --- a/Fw/Port/OutputPortBase.cpp +++ b/Fw/Port/OutputPortBase.cpp @@ -1,7 +1,5 @@ #include - #include -#include #include #include #include diff --git a/Fw/Port/OutputPortBase.hpp b/Fw/Port/OutputPortBase.hpp index 1a8d75f154..c64e11fc14 100644 --- a/Fw/Port/OutputPortBase.hpp +++ b/Fw/Port/OutputPortBase.hpp @@ -2,9 +2,7 @@ #define FW_OUTPUT_PORT_BASE_HPP #include - #include -#include #include #include diff --git a/Fw/Port/PortBase.cpp b/Fw/Port/PortBase.cpp index 6d775be222..34b51322a2 100644 --- a/Fw/Port/PortBase.cpp +++ b/Fw/Port/PortBase.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include "Fw/Types/Assert.hpp" diff --git a/Fw/Port/PortBase.hpp b/Fw/Port/PortBase.hpp index 4573d7589b..e9b9a6b8e8 100644 --- a/Fw/Port/PortBase.hpp +++ b/Fw/Port/PortBase.hpp @@ -2,7 +2,7 @@ #define FW_PORT_BASE_HPP #include -#include +#include #include #if FW_PORT_TRACING == 1 diff --git a/Fw/Prm/PrmBuffer.hpp b/Fw/Prm/PrmBuffer.hpp index 29739fa846..51b21c94cc 100644 --- a/Fw/Prm/PrmBuffer.hpp +++ b/Fw/Prm/PrmBuffer.hpp @@ -13,7 +13,6 @@ #define FW_PRM_BUFFER_HPP #include -#include #include #include diff --git a/Fw/Prm/PrmString.hpp b/Fw/Prm/PrmString.hpp index deb4fdac48..8972c49a7a 100644 --- a/Fw/Prm/PrmString.hpp +++ b/Fw/Prm/PrmString.hpp @@ -1,9 +1,8 @@ #ifndef FW_PRM_STRING_TYPE_HPP #define FW_PRM_STRING_TYPE_HPP -#include -#include #include +#include #include namespace Fw { diff --git a/Fw/SerializableFile/test/ut/Test.cpp b/Fw/SerializableFile/test/ut/Test.cpp index 38d407adda..eb569ede48 100644 --- a/Fw/SerializableFile/test/ut/Test.cpp +++ b/Fw/SerializableFile/test/ut/Test.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/Fw/Test/String.hpp b/Fw/Test/String.hpp index 3d293d50b2..ddc525bcd2 100644 --- a/Fw/Test/String.hpp +++ b/Fw/Test/String.hpp @@ -1,7 +1,7 @@ #ifndef TEST_STRING_TYPE_HPP #define TEST_STRING_TYPE_HPP -#include +#include #include #include diff --git a/Fw/Test/UnitTestAssert.cpp b/Fw/Test/UnitTestAssert.cpp index 81ba878087..95c343e3fb 100644 --- a/Fw/Test/UnitTestAssert.cpp +++ b/Fw/Test/UnitTestAssert.cpp @@ -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; diff --git a/Fw/Test/UnitTestAssert.hpp b/Fw/Test/UnitTestAssert.hpp index 71e7d77266..4aed203847 100644 --- a/Fw/Test/UnitTestAssert.hpp +++ b/Fw/Test/UnitTestAssert.hpp @@ -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; diff --git a/Fw/Time/Time.cpp b/Fw/Time/Time.cpp index d75f506e17..422e46ede4 100644 --- a/Fw/Time/Time.cpp +++ b/Fw/Time/Time.cpp @@ -1,5 +1,5 @@ #include -#include +#include namespace Fw { const Time ZERO_TIME = Time(); diff --git a/Fw/Time/Time.hpp b/Fw/Time/Time.hpp index 249f389137..60591fc1fe 100644 --- a/Fw/Time/Time.hpp +++ b/Fw/Time/Time.hpp @@ -1,10 +1,9 @@ #ifndef FW_TIME_HPP #define FW_TIME_HPP -#include +#include #include #include -#include namespace Fw { class Time: public Serializable { diff --git a/Fw/Tlm/TlmBuffer.hpp b/Fw/Tlm/TlmBuffer.hpp index 9fc9cf6d8c..4de7a67867 100644 --- a/Fw/Tlm/TlmBuffer.hpp +++ b/Fw/Tlm/TlmBuffer.hpp @@ -12,7 +12,6 @@ #define FW_TLM_BUFFER_HPP #include -#include #include #include diff --git a/Fw/Tlm/TlmString.hpp b/Fw/Tlm/TlmString.hpp index 10977deb0b..e9a1a988b8 100644 --- a/Fw/Tlm/TlmString.hpp +++ b/Fw/Tlm/TlmString.hpp @@ -1,9 +1,8 @@ #ifndef FW_TLM_STRING_TYPE_HPP #define FW_TLM_STRING_TYPE_HPP -#include -#include #include +#include #include namespace Fw { diff --git a/Fw/Trap/TrapHandler.hpp b/Fw/Trap/TrapHandler.hpp index 09ee8bf60e..004b1f0acd 100644 --- a/Fw/Trap/TrapHandler.hpp +++ b/Fw/Trap/TrapHandler.hpp @@ -1,7 +1,6 @@ #ifndef FW_TRAP_HPP #define FW_TRAP_HPP #include -#include namespace Fw { /** diff --git a/Fw/Types/Assert.cpp b/Fw/Types/Assert.cpp index af6deb0327..fe7ac60dba 100644 --- a/Fw/Types/Assert.cpp +++ b/Fw/Types/Assert.cpp @@ -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( diff --git a/Fw/Types/Assert.hpp b/Fw/Types/Assert.hpp index 2ccea32f04..5d3780aacd 100644 --- a/Fw/Types/Assert.hpp +++ b/Fw/Types/Assert.hpp @@ -2,7 +2,6 @@ #define FW_ASSERT_HPP #include -#include #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 diff --git a/Fw/Types/BasicTypes.hpp b/Fw/Types/BasicTypes.hpp index 7b01d0e9d5..c6c25323ba 100644 --- a/Fw/Types/BasicTypes.hpp +++ b/Fw/Types/BasicTypes.hpp @@ -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 -#include // This header will be found be include paths by target. This hides different header files for each target. +#include #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 diff --git a/Fw/Types/ByteArray.hpp b/Fw/Types/ByteArray.hpp index 701bab4395..206dfba66c 100644 --- a/Fw/Types/ByteArray.hpp +++ b/Fw/Types/ByteArray.hpp @@ -13,7 +13,7 @@ #ifndef Fw_ByteArray_HPP #define Fw_ByteArray_HPP -#include "Fw/Types/BasicTypes.hpp" +#include namespace Fw { diff --git a/Fw/Types/CAssert.hpp b/Fw/Types/CAssert.hpp index 83392cfa66..93ef16871f 100644 --- a/Fw/Types/CAssert.hpp +++ b/Fw/Types/CAssert.hpp @@ -9,7 +9,6 @@ #define FWCASSERT_HPP_ #include -#include #if FW_ASSERT_LEVEL == FW_NO_ASSERT diff --git a/Fw/Types/CMakeLists.txt b/Fw/Types/CMakeLists.txt index b8d9b020ba..f784ab85d1 100644 --- a/Fw/Types/CMakeLists.txt +++ b/Fw/Types/CMakeLists.txt @@ -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" diff --git a/Fw/Types/ConstByteArray.hpp b/Fw/Types/ConstByteArray.hpp index 84e13bf33c..d1673d1568 100644 --- a/Fw/Types/ConstByteArray.hpp +++ b/Fw/Types/ConstByteArray.hpp @@ -13,7 +13,7 @@ #ifndef Fw_ConstByteArray_HPP #define Fw_ConstByteArray_HPP -#include "Fw/Types/BasicTypes.hpp" +#include namespace Fw { diff --git a/Fw/Types/EightyCharString.hpp b/Fw/Types/EightyCharString.hpp index f6ad97d5d1..48d4d893d9 100644 --- a/Fw/Types/EightyCharString.hpp +++ b/Fw/Types/EightyCharString.hpp @@ -1,7 +1,7 @@ #ifndef FW_EIGHTY_CHAR_STRING_TYPE_HPP #define FW_EIGHTY_CHAR_STRING_TYPE_HPP -#include +#include #include #include diff --git a/Fw/Types/GTest/Bytes.hpp b/Fw/Types/GTest/Bytes.hpp index 481989e783..0bc64b4273 100644 --- a/Fw/Types/GTest/Bytes.hpp +++ b/Fw/Types/GTest/Bytes.hpp @@ -14,7 +14,7 @@ #define Fw_GTest_Bytes_HPP #include -#include +#include namespace Fw { diff --git a/Fw/Types/InternalInterfaceString.hpp b/Fw/Types/InternalInterfaceString.hpp index 87505c5ff0..f8b9628100 100644 --- a/Fw/Types/InternalInterfaceString.hpp +++ b/Fw/Types/InternalInterfaceString.hpp @@ -1,10 +1,9 @@ #ifndef FW_INTERNAL_INTERFACE_STRING_TYPE_HPP #define FW_INTERNAL_INTERFACE_STRING_TYPE_HPP -#include +#include #include #include -#include namespace Fw { diff --git a/Fw/Types/Linux/StandardTypes.hpp b/Fw/Types/Linux/StandardTypes.hpp deleted file mode 100644 index 256a908d27..0000000000 --- a/Fw/Types/Linux/StandardTypes.hpp +++ /dev/null @@ -1,2 +0,0 @@ -#include -#include diff --git a/Fw/Types/MemAllocator.hpp b/Fw/Types/MemAllocator.hpp index 0d3fbac60d..521300f3a5 100644 --- a/Fw/Types/MemAllocator.hpp +++ b/Fw/Types/MemAllocator.hpp @@ -16,7 +16,7 @@ #ifndef TYPES_MEMALLOCATOR_HPP_ #define TYPES_MEMALLOCATOR_HPP_ -#include +#include /*! * diff --git a/Fw/Types/PolyType.cpp b/Fw/Types/PolyType.cpp index 0a5492b956..d0fb11a573 100644 --- a/Fw/Types/PolyType.cpp +++ b/Fw/Types/PolyType.cpp @@ -2,7 +2,6 @@ #include #include #define __STDC_FORMAT_MACROS -#include namespace Fw { @@ -411,7 +410,7 @@ namespace Fw { valIsEqual = false; break; default: - FW_ASSERT(0,static_cast(this->m_dataType)); + FW_ASSERT(0,static_cast(this->m_dataType)); return false; // for compiler } return valIsEqual; @@ -474,7 +473,7 @@ namespace Fw { result = false; break; default: - FW_ASSERT(0,static_cast(this->m_dataType)); + FW_ASSERT(0,static_cast(this->m_dataType)); return false; // for compiler } return result; diff --git a/Fw/Types/PolyType.hpp b/Fw/Types/PolyType.hpp index 29d616c928..8d16d97367 100644 --- a/Fw/Types/PolyType.hpp +++ b/Fw/Types/PolyType.hpp @@ -1,10 +1,9 @@ #ifndef FW_POLY_TYPE_HPP #define FW_POLY_TYPE_HPP -#include +#include #include #include -#include #include namespace Fw { diff --git a/Fw/Types/SerialBuffer.hpp b/Fw/Types/SerialBuffer.hpp index 97b935f904..f10b245f9d 100644 --- a/Fw/Types/SerialBuffer.hpp +++ b/Fw/Types/SerialBuffer.hpp @@ -13,7 +13,7 @@ #ifndef Fw_SerialBuffer_HPP #define Fw_SerialBuffer_HPP -#include "Fw/Types/BasicTypes.hpp" +#include #include "Fw/Types/Serializable.hpp" namespace Fw { diff --git a/Fw/Types/Serializable.cpp b/Fw/Types/Serializable.cpp index d2afac76b9..ac0087fc9b 100644 --- a/Fw/Types/Serializable.cpp +++ b/Fw/Types/Serializable.cpp @@ -3,7 +3,7 @@ #include #include #include - +#include #ifdef BUILD_UT #include #include diff --git a/Fw/Types/Serializable.hpp b/Fw/Types/Serializable.hpp index 3a099d2fd6..ca48511925 100644 --- a/Fw/Types/Serializable.hpp +++ b/Fw/Types/Serializable.hpp @@ -5,7 +5,7 @@ #include #endif -#include +#include namespace Fw { diff --git a/Fw/Types/String.hpp b/Fw/Types/String.hpp index b9b60064d1..4c829f63a6 100644 --- a/Fw/Types/String.hpp +++ b/Fw/Types/String.hpp @@ -1,7 +1,7 @@ #ifndef FW_FIXED_LENGTH_STRING_TYPE_HPP #define FW_FIXED_LENGTH_STRING_TYPE_HPP -#include +#include #include #include diff --git a/Fw/Types/StringType.hpp b/Fw/Types/StringType.hpp index f411df79d2..4264e3fc96 100644 --- a/Fw/Types/StringType.hpp +++ b/Fw/Types/StringType.hpp @@ -13,7 +13,7 @@ #ifndef FW_STRING_TYPE_HPP #define FW_STRING_TYPE_HPP -#include +#include #include #ifdef BUILD_UT #include diff --git a/Fw/Types/StringUtils.hpp b/Fw/Types/StringUtils.hpp index d0aaba021a..26ecc8fceb 100644 --- a/Fw/Types/StringUtils.hpp +++ b/Fw/Types/StringUtils.hpp @@ -1,6 +1,6 @@ #ifndef FW_STRINGUTILS_HPP #define FW_STRINGUTILS_HPP -#include "Fw/Types/BasicTypes.hpp" +#include namespace Fw { namespace StringUtils { diff --git a/Fw/Types/VxWorks/StandardTypes.hpp b/Fw/Types/VxWorks/StandardTypes.hpp deleted file mode 100644 index ce32a75345..0000000000 --- a/Fw/Types/VxWorks/StandardTypes.hpp +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef VXWORKS_STD_TYPES_H -#define VXWORKS_STD_TYPES_H - -#include -#include - -// Covert VxWorks OK and ERROR macros to enums -enum { - VXWORKS_OK = OK, - VXWORKS_ERROR = ERROR -}; -#undef OK -#undef ERROR -enum { - OK = VXWORKS_OK, - ERROR = VXWORKS_ERROR -}; - -#endif diff --git a/Fw/Types/default/DefaultTypes.hpp b/Fw/Types/default/DefaultTypes.hpp new file mode 100644 index 0000000000..7815fda0f3 --- /dev/null +++ b/Fw/Types/default/DefaultTypes.hpp @@ -0,0 +1,97 @@ +/** + * \brief DefaultTypes.hpp provides fallback defaults for the platform types + * + * This fill contains default implementations for types typically defined in + * PlatformTypes.hpp. These default implementations are based on x86_64 Linux + * but are often appropriate for most systems. + */ +#include +/** +* Default implementation for deprecated (see note) + */ +#ifndef PLATFORM_INT_TYPE_DEFINED +typedef int PlatformIntType; +extern const PlatformIntType PlatformIntType_MIN; +extern const PlatformIntType PlatformIntType_MAX; +#define PLATFORM_INT_TYPE_DEFINED +#define PRI_PlatformIntType "d" +#endif + + +/** +* Default implementation for deprecated (see note) + */ +#ifndef PLATFORM_UINT_TYPE_DEFINED +typedef unsigned int PlatformUIntType; +extern const PlatformUIntType PlatformUIntType_MIN; +extern const PlatformUIntType PlatformUIntType_MAX; +#define PLATFORM_UINT_TYPE_DEFINED +#define PRI_PlatformUIntType "ud" +#endif + +/** +* Default implementation for ports indices +*/ +#ifndef PLATFORM_INDEX_TYPE_DEFINED +typedef PlatformIntType PlatformIndexType; +extern const PlatformIndexType PlatformIndexType_MIN; +extern const PlatformIndexType PlatformIndexType_MAX; +#define PLATFORM_INDEX_TYPE_DEFINED +#define PRI_PlatformIndexType PRI_PlatformIntType +#endif + +/** +* Default implementation for sizes +*/ +#ifndef PLATFORM_SIZE_TYPE_DEFINED +typedef PlatformUIntType PlatformSizeType; +extern const PlatformSizeType PlatformSizeType_MIN; +extern const PlatformSizeType PlatformSizeType_MAX; +#define PLATFORM_SIZE_TYPE_DEFINED +#define PRI_PlatformSizeType PRI_PlatformUIntType +#endif + +/** +* Default implementation for argument to fw_assert +*/ +#ifndef PLATFORM_ASSERT_ARG_TYPE_DEFINED +typedef PlatformIntType PlatformAssertArgType; +extern const PlatformAssertArgType PlatformAssertArgType_MIN; +extern const PlatformAssertArgType PlatformAssertArgType_MAX; +#define PLATFORM_ASSERT_ARG_TYPE_DEFINED +#define PRI_PlatformAssertArgType PRI_PlatformIntType +#endif + +/** +* Default implementation for pointers stored as integers +*/ +#ifndef PLATFORM_POINTER_CAST_TYPE_DEFINED + // Check for __SIZEOF_POINTER__ or cause error + #ifndef __SIZEOF_POINTER__ + #error "Compiler does not support __SIZEOF_POINTER__, cannot use default for PlatformPointerCastType" + #endif + + // Pointer sizes are determined by size of compiler + #if __SIZEOF_POINTER__ == 8 + typedef uint64_t PlatformPointerCastType; + extern const PlatformPointerCastType PlatformPointerCastType_MIN; + extern const PlatformPointerCastType PlatformPointerCastType_MAX; + #define PRI_PlatformPointerCastType PRIx64 + #elif __SIZEOF_POINTER__ == 4 + typedef uint32_t PlatformPointerCastType; + extern const PlatformPointerCastType PlatformPointerCastType_MIN; + extern const PlatformPointerCastType PlatformPointerCastType_MAX; + #define PRI_PlatformPointerCastType PRIx32 + #elif __SIZEOF_POINTER__ == 2 + typedef uint16_t PlatformPointerCastType; + extern const PlatformPointerCastType PlatformPointerCastType_MIN; + extern const PlatformPointerCastType PlatformPointerCastType_MAX; + #define PRI_PlatformPointerCastType PRIx16 + #else + typedef uint8_t PlatformPointerCastType; + extern const PlatformPointerCastType PlatformPointerCastType_MIN; + extern const PlatformPointerCastType PlatformPointerCastType_MAX; + #define PRI_PlatformPointerCastType PRIx8 + #endif + #define PLATFORM_POINTER_CAST_TYPE_DEFINED +#endif diff --git a/Fw/Types/test/ut/TypesTest.cpp b/Fw/Types/test/ut/TypesTest.cpp index f60a1da0f6..f0d96211ea 100644 --- a/Fw/Types/test/ut/TypesTest.cpp +++ b/Fw/Types/test/ut/TypesTest.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -727,12 +727,12 @@ void AssertTest() { 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 ) { this->m_file = file; this->m_lineNo = lineNo; @@ -762,27 +762,27 @@ void AssertTest() { return this->m_numArgs; } - AssertArg getArg1() { + FwAssertArgType getArg1() { return this->m_arg1; } - AssertArg getArg2() { + FwAssertArgType getArg2() { return this->m_arg2; } - AssertArg getArg3() { + FwAssertArgType getArg3() { return this->m_arg3; } - AssertArg getArg4() { + FwAssertArgType getArg4() { return this->m_arg4; } - AssertArg getArg5() { + FwAssertArgType getArg5() { return this->m_arg5; } - AssertArg getArg6() { + FwAssertArgType getArg6() { return this->m_arg6; } @@ -798,12 +798,12 @@ void AssertTest() { FILE_NAME_ARG m_file = nullptr; NATIVE_UINT_TYPE m_lineNo = 0; NATIVE_UINT_TYPE m_numArgs = 0; - AssertArg m_arg1 = 0; - AssertArg m_arg2 = 0; - AssertArg m_arg3 = 0; - AssertArg m_arg4 = 0; - AssertArg m_arg5 = 0; - AssertArg m_arg6 = 0; + FwAssertArgType m_arg1 = 0; + FwAssertArgType m_arg2 = 0; + FwAssertArgType m_arg3 = 0; + FwAssertArgType m_arg4 = 0; + FwAssertArgType m_arg5 = 0; + FwAssertArgType m_arg6 = 0; bool m_asserted = false; }; diff --git a/Os/Baremetal/File.cpp b/Os/Baremetal/File.cpp index b516c227b1..fed6dee7b3 100644 --- a/Os/Baremetal/File.cpp +++ b/Os/Baremetal/File.cpp @@ -1,5 +1,4 @@ #include -#include #include #include diff --git a/Os/Baremetal/FileSystem.cpp b/Os/Baremetal/FileSystem.cpp index c2b87d0070..00ba4b9a83 100644 --- a/Os/Baremetal/FileSystem.cpp +++ b/Os/Baremetal/FileSystem.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include diff --git a/Os/Baremetal/Queue.cpp b/Os/Baremetal/Queue.cpp index fca6b74767..bfec97ae1f 100644 --- a/Os/Baremetal/Queue.cpp +++ b/Os/Baremetal/Queue.cpp @@ -5,7 +5,7 @@ // safety is implemented as this intended for baremetal devices. // Based on Os/Pthreads/Queue.cpp from @dinkel // ====================================================================== -#include +#include #include #include #include diff --git a/Os/Baremetal/TaskRunner/TaskRunner.cpp b/Os/Baremetal/TaskRunner/TaskRunner.cpp index 1b0b2b8610..d60eb97ee0 100644 --- a/Os/Baremetal/TaskRunner/TaskRunner.cpp +++ b/Os/Baremetal/TaskRunner/TaskRunner.cpp @@ -5,7 +5,7 @@ * Author: lestarch */ #include -#include +#include #include #include namespace Os { diff --git a/Os/Directory.hpp b/Os/Directory.hpp index 6d47e277f9..2aec3cf1ce 100644 --- a/Os/Directory.hpp +++ b/Os/Directory.hpp @@ -2,7 +2,6 @@ #define _Directory_hpp_ #include -#include namespace Os { diff --git a/Os/Event.hpp b/Os/Event.hpp index 3f28c22223..e8e41b8a46 100644 --- a/Os/Event.hpp +++ b/Os/Event.hpp @@ -7,7 +7,7 @@ #ifndef EVENT_HPP #define EVENT_HPP -#include +#include #include namespace Os { diff --git a/Os/File.hpp b/Os/File.hpp index 29b2752be4..f0082209fa 100644 --- a/Os/File.hpp +++ b/Os/File.hpp @@ -2,7 +2,6 @@ #define _File_hpp_ #include -#include namespace Os { diff --git a/Os/FileCommon.cpp b/Os/FileCommon.cpp index 6391c7f75e..47189248e9 100644 --- a/Os/FileCommon.cpp +++ b/Os/FileCommon.cpp @@ -1,5 +1,4 @@ #include -#include #include #include diff --git a/Os/FileSystem.hpp b/Os/FileSystem.hpp index c287a532ef..d6b6473359 100644 --- a/Os/FileSystem.hpp +++ b/Os/FileSystem.hpp @@ -2,7 +2,6 @@ #define _FileSystem_hpp_ #include -#include #include #define FILE_SYSTEM_CHUNK_SIZE (256u) diff --git a/Os/InterruptLock.hpp b/Os/InterruptLock.hpp index f39dc21e49..924a41e82e 100644 --- a/Os/InterruptLock.hpp +++ b/Os/InterruptLock.hpp @@ -1,7 +1,7 @@ #ifndef _InterruptLock_hpp_ #define _InterruptLock_hpp_ -#include +#include namespace Os { class InterruptLock { diff --git a/Os/IntervalTimer.hpp b/Os/IntervalTimer.hpp index 180fab068a..a606590408 100644 --- a/Os/IntervalTimer.hpp +++ b/Os/IntervalTimer.hpp @@ -7,7 +7,7 @@ #ifndef _IntervalTimer_hpp_ #define _IntervalTimer_hpp_ -#include +#include namespace Os { class IntervalTimer { diff --git a/Os/Linux/Directory.cpp b/Os/Linux/Directory.cpp index a554e1a9d5..6794e56e40 100644 --- a/Os/Linux/Directory.cpp +++ b/Os/Linux/Directory.cpp @@ -1,5 +1,4 @@ #include -#include #include #include diff --git a/Os/Linux/File.cpp b/Os/Linux/File.cpp index 48115784e9..8f63964957 100644 --- a/Os/Linux/File.cpp +++ b/Os/Linux/File.cpp @@ -1,5 +1,4 @@ #include -#include #include #include diff --git a/Os/Linux/FileSystem.cpp b/Os/Linux/FileSystem.cpp index 8cf9935bd0..df72e226a7 100644 --- a/Os/Linux/FileSystem.cpp +++ b/Os/Linux/FileSystem.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include diff --git a/Os/LocklessQueue.hpp b/Os/LocklessQueue.hpp index 9bc686a69d..2eb8f6044b 100644 --- a/Os/LocklessQueue.hpp +++ b/Os/LocklessQueue.hpp @@ -1,7 +1,7 @@ #ifndef _LOCKLESS_QUEUE_H_ #define _LOCKLESS_QUEUE_H_ -#include +#include #include #ifndef BUILD_DARWIN // Allow compiling #include diff --git a/Os/Log.hpp b/Os/Log.hpp index 38e36933a8..0690b19cd4 100644 --- a/Os/Log.hpp +++ b/Os/Log.hpp @@ -6,7 +6,7 @@ #ifndef _Log_hpp_ #define _Log_hpp_ -#include +#include #include namespace Os { diff --git a/Os/Mem.hpp b/Os/Mem.hpp index 05207d899b..2ef49c81a2 100644 --- a/Os/Mem.hpp +++ b/Os/Mem.hpp @@ -1,7 +1,7 @@ #ifndef _Mem_hpp_ #define _Mem_hpp_ -#include +#include #include #include diff --git a/Os/Mutex.hpp b/Os/Mutex.hpp index 692daf7ae6..9fc6507ff9 100644 --- a/Os/Mutex.hpp +++ b/Os/Mutex.hpp @@ -1,7 +1,7 @@ #ifndef _Mutex_hpp_ #define _Mutex_hpp_ -#include +#include namespace Os { diff --git a/Os/Pthreads/BufferQueue.hpp b/Os/Pthreads/BufferQueue.hpp index 222a3dff5e..78b3c73d0c 100644 --- a/Os/Pthreads/BufferQueue.hpp +++ b/Os/Pthreads/BufferQueue.hpp @@ -13,7 +13,7 @@ #ifndef OS_PTHREADS_BUFFER_QUEUE_HPP #define OS_PTHREADS_BUFFER_QUEUE_HPP -#include +#include // This is a generic buffer queue interface. namespace Os { diff --git a/Os/Pthreads/MaxHeap/MaxHeap.cpp b/Os/Pthreads/MaxHeap/MaxHeap.cpp index 5a6dc4e3c6..baa18a8071 100644 --- a/Os/Pthreads/MaxHeap/MaxHeap.cpp +++ b/Os/Pthreads/MaxHeap/MaxHeap.cpp @@ -15,7 +15,7 @@ // ====================================================================== #include "Os/Pthreads/MaxHeap/MaxHeap.hpp" -#include "Fw/Types/BasicTypes.hpp" +#include #include "Fw/Types/Assert.hpp" #include diff --git a/Os/Pthreads/MaxHeap/MaxHeap.hpp b/Os/Pthreads/MaxHeap/MaxHeap.hpp index c897347d77..22066c6d17 100644 --- a/Os/Pthreads/MaxHeap/MaxHeap.hpp +++ b/Os/Pthreads/MaxHeap/MaxHeap.hpp @@ -13,7 +13,7 @@ #ifndef OS_PTHREADS_MAX_HEAP_HPP #define OS_PTHREADS_MAX_HEAP_HPP -#include "Fw/Types/BasicTypes.hpp" +#include namespace Os { diff --git a/Os/Queue.hpp b/Os/Queue.hpp index ab98e2436a..56c7804042 100644 --- a/Os/Queue.hpp +++ b/Os/Queue.hpp @@ -12,7 +12,7 @@ #ifndef _Queue_hpp_ #define _Queue_hpp_ -#include +#include #include #include #include diff --git a/Os/QueueString.hpp b/Os/QueueString.hpp index 16f2f0b6d4..8b590f5ced 100644 --- a/Os/QueueString.hpp +++ b/Os/QueueString.hpp @@ -1,9 +1,8 @@ #ifndef OS_QUEUE_STRING_TYPE_HPP #define OS_QUEUE_STRING_TYPE_HPP -#include -#include #include +#include namespace Os { diff --git a/Os/Stubs/Linux/FileStub.cpp b/Os/Stubs/Linux/FileStub.cpp index 90c8cd4599..8b589cded7 100644 --- a/Os/Stubs/Linux/FileStub.cpp +++ b/Os/Stubs/Linux/FileStub.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include diff --git a/Os/SystemResources.hpp b/Os/SystemResources.hpp index 36f7bc7527..a1825762c6 100644 --- a/Os/SystemResources.hpp +++ b/Os/SystemResources.hpp @@ -12,7 +12,7 @@ #ifndef _SystemResources_hpp_ #define _SystemResources_hpp_ -#include +#include namespace Os { namespace SystemResources { diff --git a/Os/Task.hpp b/Os/Task.hpp index 2b403cf251..5e9d865195 100644 --- a/Os/Task.hpp +++ b/Os/Task.hpp @@ -2,7 +2,6 @@ #define _Task_hpp_ #include -#include #include #include diff --git a/Os/TaskLock.hpp b/Os/TaskLock.hpp index 957cfa690e..c044206c97 100644 --- a/Os/TaskLock.hpp +++ b/Os/TaskLock.hpp @@ -7,7 +7,7 @@ #ifndef _TaskLock_hpp_ #define _TaskLock_hpp_ -#include +#include namespace Os { class TaskLock { diff --git a/Os/TaskString.hpp b/Os/TaskString.hpp index 9b0befdc7d..1a100ed3ce 100644 --- a/Os/TaskString.hpp +++ b/Os/TaskString.hpp @@ -1,9 +1,8 @@ #ifndef OS_TASK_STRING_TYPE_HPP #define OS_TASK_STRING_TYPE_HPP -#include -#include #include +#include namespace Os { diff --git a/Os/ValidatedFile.hpp b/Os/ValidatedFile.hpp index 0f30cd811c..69d19feed7 100644 --- a/Os/ValidatedFile.hpp +++ b/Os/ValidatedFile.hpp @@ -14,7 +14,7 @@ #define OS_ValidatedFile_HPP #include "Fw/Types/String.hpp" -#include "Fw/Types/BasicTypes.hpp" +#include #include "Os/ValidateFile.hpp" namespace Os { diff --git a/Os/WatchdogTimer.hpp b/Os/WatchdogTimer.hpp index 7593b7f2b0..ac409ba862 100644 --- a/Os/WatchdogTimer.hpp +++ b/Os/WatchdogTimer.hpp @@ -1,7 +1,7 @@ #ifndef _WatchdogTimer_hpp_ #define _WatchdogTimer_hpp_ -#include +#include namespace Os { class WatchdogTimer { diff --git a/RPI/RpiDemo/RpiDemoComponentImpl.cpp b/RPI/RpiDemo/RpiDemoComponentImpl.cpp index 618c27dfb2..fefec210f6 100644 --- a/RPI/RpiDemo/RpiDemoComponentImpl.cpp +++ b/RPI/RpiDemo/RpiDemoComponentImpl.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include -#include "Fw/Types/BasicTypes.hpp" +#include #include namespace RPI { diff --git a/Ref/PingReceiver/PingReceiverComponentImpl.cpp b/Ref/PingReceiver/PingReceiverComponentImpl.cpp index 6b5ca46d0f..a4c77f7338 100644 --- a/Ref/PingReceiver/PingReceiverComponentImpl.cpp +++ b/Ref/PingReceiver/PingReceiverComponentImpl.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Ref { diff --git a/Ref/RecvBuffApp/RecvBuffComponentImpl.cpp b/Ref/RecvBuffApp/RecvBuffComponentImpl.cpp index 5abe54d39e..120960814e 100644 --- a/Ref/RecvBuffApp/RecvBuffComponentImpl.cpp +++ b/Ref/RecvBuffApp/RecvBuffComponentImpl.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/Ref/SendBuffApp/SendBuffComponentImpl.cpp b/Ref/SendBuffApp/SendBuffComponentImpl.cpp index 5e7dd37d63..8d8865a6dc 100644 --- a/Ref/SendBuffApp/SendBuffComponentImpl.cpp +++ b/Ref/SendBuffApp/SendBuffComponentImpl.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/Ref/Top/FppConstantsAc.hpp b/Ref/Top/FppConstantsAc.hpp index 8d665860da..436a4edefd 100644 --- a/Ref/Top/FppConstantsAc.hpp +++ b/Ref/Top/FppConstantsAc.hpp @@ -12,7 +12,7 @@ #ifndef Ref_Top_FppConstantsAc_HPP #define Ref_Top_FppConstantsAc_HPP -#include "Fw/Types/BasicTypes.hpp" +#include namespace Ref { diff --git a/Svc/ActiveRateGroup/ActiveRateGroup.cpp b/Svc/ActiveRateGroup/ActiveRateGroup.cpp index 42a9b82b42..772b8ecca6 100644 --- a/Svc/ActiveRateGroup/ActiveRateGroup.cpp +++ b/Svc/ActiveRateGroup/ActiveRateGroup.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/Svc/ActiveRateGroup/ActiveRateGroupImpl.cpp b/Svc/ActiveRateGroup/ActiveRateGroupImpl.cpp index 2cbea4117b..75d9d96eb7 100644 --- a/Svc/ActiveRateGroup/ActiveRateGroupImpl.cpp +++ b/Svc/ActiveRateGroup/ActiveRateGroupImpl.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/Svc/ActiveTextLogger/ActiveTextLoggerImpl.cpp b/Svc/ActiveTextLogger/ActiveTextLoggerImpl.cpp index dd6fbd1fdf..5daa9318e0 100644 --- a/Svc/ActiveTextLogger/ActiveTextLoggerImpl.cpp +++ b/Svc/ActiveTextLogger/ActiveTextLoggerImpl.cpp @@ -94,7 +94,7 @@ namespace Svc { (void) snprintf(textStr, FW_INTERNAL_INTERFACE_STRING_MAX_SIZE, - "EVENT: (%d) (%04d-%02d-%02dT%02d:%02d:%02d.%03u) %s: %s\n", + "EVENT: (%" PRI_FwEventIdType ") (%04d-%02d-%02dT%02d:%02d:%02d.%03" PRIu32 ") %s: %s\n", id, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min,tm.tm_sec,timeTag.getUSeconds(), severityString,text.toChar()); @@ -103,8 +103,8 @@ namespace Svc { (void) snprintf(textStr, FW_INTERNAL_INTERFACE_STRING_MAX_SIZE, - "EVENT: (%d) (%d:%d,%d) %s: %s\n", - id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severityString,text.toChar()); + "EVENT: (%" PRI_FwEventIdType ") (%" PRI_FwTimeBaseStoreType ":%" PRId32 ",%" PRId32 ") %s: %s\n", + id, static_cast(timeTag.getTimeBase()),timeTag.getSeconds(),timeTag.getUSeconds(),severityString,text.toChar()); } // Call internal interface so that everything else is done on component thread, diff --git a/Svc/ActiveTextLogger/LogFile.cpp b/Svc/ActiveTextLogger/LogFile.cpp index 0282e378bf..38d8e12028 100644 --- a/Svc/ActiveTextLogger/LogFile.cpp +++ b/Svc/ActiveTextLogger/LogFile.cpp @@ -119,7 +119,7 @@ namespace Svc { } NATIVE_INT_TYPE stat = snprintf(fileNameFinal,Fw::String::STRING_SIZE, - "%s%d",fileName,suffix); + "%s%" PRIu32,fileName,suffix); // If there was error, then just fail: if (stat <= 0) { diff --git a/Svc/AssertFatalAdapter/AssertFatalAdapterComponentImpl.cpp b/Svc/AssertFatalAdapter/AssertFatalAdapterComponentImpl.cpp index ff44a64432..eecf4bf7e0 100644 --- a/Svc/AssertFatalAdapter/AssertFatalAdapterComponentImpl.cpp +++ b/Svc/AssertFatalAdapter/AssertFatalAdapterComponentImpl.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include #include #include #include @@ -24,12 +24,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 ); @@ -72,12 +72,12 @@ namespace Svc { 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 (m_compPtr) { @@ -108,12 +108,12 @@ namespace Svc { 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 ) { diff --git a/Svc/AssertFatalAdapter/AssertFatalAdapterComponentImpl.hpp b/Svc/AssertFatalAdapter/AssertFatalAdapterComponentImpl.hpp index 4de9058e1b..61b3f65541 100644 --- a/Svc/AssertFatalAdapter/AssertFatalAdapterComponentImpl.hpp +++ b/Svc/AssertFatalAdapter/AssertFatalAdapterComponentImpl.hpp @@ -48,12 +48,12 @@ namespace Svc { 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 ); private: @@ -68,12 +68,12 @@ namespace Svc { 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 ); // Prevent actual assert since FATAL handler will deal with it diff --git a/Svc/BufferAccumulator/ArrayFIFOBuffer.cpp b/Svc/BufferAccumulator/ArrayFIFOBuffer.cpp index 0ef60c8f57..6df0c1a493 100644 --- a/Svc/BufferAccumulator/ArrayFIFOBuffer.cpp +++ b/Svc/BufferAccumulator/ArrayFIFOBuffer.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include "Svc/BufferAccumulator/BufferAccumulator.hpp" -#include "Fw/Types/BasicTypes.hpp" +#include #include "Fw/Types/Assert.hpp" diff --git a/Svc/BufferAccumulator/BufferAccumulator.cpp b/Svc/BufferAccumulator/BufferAccumulator.cpp index 5399518370..ea997b025a 100644 --- a/Svc/BufferAccumulator/BufferAccumulator.cpp +++ b/Svc/BufferAccumulator/BufferAccumulator.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include "Svc/BufferAccumulator/BufferAccumulator.hpp" -#include "Fw/Types/BasicTypes.hpp" +#include namespace Svc { diff --git a/Svc/BufferAccumulator/test/ut/Tester.cpp b/Svc/BufferAccumulator/test/ut/Tester.cpp index 068cb3484d..da253ea686 100644 --- a/Svc/BufferAccumulator/test/ut/Tester.cpp +++ b/Svc/BufferAccumulator/test/ut/Tester.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include "Tester.hpp" -#include "Fw/Types/BasicTypes.hpp" +#include #include "Fw/Types/MallocAllocator.hpp" #define INSTANCE 0 diff --git a/Svc/BufferManager/BufferManagerComponentImpl.cpp b/Svc/BufferManager/BufferManagerComponentImpl.cpp index a1904fbe3c..a256f8c301 100644 --- a/Svc/BufferManager/BufferManagerComponentImpl.cpp +++ b/Svc/BufferManager/BufferManagerComponentImpl.cpp @@ -12,7 +12,7 @@ #include -#include +#include #include #include #include diff --git a/Svc/ComLogger/ComLogger.cpp b/Svc/ComLogger/ComLogger.cpp index dcd94cd244..2d10362a0d 100644 --- a/Svc/ComLogger/ComLogger.cpp +++ b/Svc/ComLogger/ComLogger.cpp @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------- #include -#include +#include #include #include #include @@ -147,16 +147,16 @@ namespace Svc { // Create filename: Fw::Time timestamp = getTime(); memset(this->fileName, 0, sizeof(this->fileName)); - bytesCopied = snprintf(this->fileName, sizeof(this->fileName), "%s_%d_%d_%06d.com", - this->filePrefix, static_cast(timestamp.getTimeBase()), timestamp.getSeconds(), timestamp.getUSeconds()); + bytesCopied = snprintf(this->fileName, sizeof(this->fileName), "%s_%" PRI_FwTimeBaseStoreType "_%" PRIu32 "_%06" PRIu32 ".com", + this->filePrefix, static_cast(timestamp.getTimeBase()), timestamp.getSeconds(), timestamp.getUSeconds()); // "A return value of size or more means that the output was truncated" // See here: http://linux.die.net/man/3/snprintf FW_ASSERT( bytesCopied < sizeof(this->fileName) ); // Create sha filename: - bytesCopied = snprintf(this->hashFileName, sizeof(this->hashFileName), "%s_%d_%d_%06d.com%s", - this->filePrefix, static_cast(timestamp.getTimeBase()), timestamp.getSeconds(), timestamp.getUSeconds(), Utils::Hash::getFileExtensionString()); + bytesCopied = snprintf(this->hashFileName, sizeof(this->hashFileName), "%s_%" PRI_FwTimeBaseStoreType "_%" PRIu32 "_%06" PRIu32 ".com%s", + this->filePrefix, static_cast(timestamp.getTimeBase()), timestamp.getSeconds(), timestamp.getUSeconds(), Utils::Hash::getFileExtensionString()); FW_ASSERT( bytesCopied < sizeof(this->hashFileName) ); Os::File::Status ret = file.open(this->fileName, Os::File::OPEN_WRITE); diff --git a/Svc/ComLogger/ComLogger.hpp b/Svc/ComLogger/ComLogger.hpp index 1f0afc99ba..248efebd47 100644 --- a/Svc/ComLogger/ComLogger.hpp +++ b/Svc/ComLogger/ComLogger.hpp @@ -24,6 +24,13 @@ #define COMLOGGER_PATH_MAX 255 #endif +// some limits.h don't have NAME_MAX +#ifdef NAME_MAX +#define COMLOGGER_NAME_MAX NAME_MAX +#else +#define COMLOGGER_NAME_MAX 255 +#endif + namespace Svc { class ComLogger : @@ -81,7 +88,7 @@ namespace Svc { // ---------------------------------------------------------------------- // The maximum size of a filename enum { - MAX_FILENAME_SIZE = NAME_MAX, // as defined in limits.h + MAX_FILENAME_SIZE = COMLOGGER_NAME_MAX, MAX_PATH_SIZE = COMLOGGER_PATH_MAX }; diff --git a/Svc/ComSplitter/ComSplitter.cpp b/Svc/ComSplitter/ComSplitter.cpp index 7a8af5c816..963eb71504 100644 --- a/Svc/ComSplitter/ComSplitter.cpp +++ b/Svc/ComSplitter/ComSplitter.cpp @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------- #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Svc { diff --git a/Svc/Deframer/Deframer.cpp b/Svc/Deframer/Deframer.cpp index 5d9f1686d3..00a259a8c3 100644 --- a/Svc/Deframer/Deframer.cpp +++ b/Svc/Deframer/Deframer.cpp @@ -14,7 +14,7 @@ #include "Fw/Com/ComPacket.hpp" #include "Fw/Logger/Logger.hpp" -#include "Fw/Types/BasicTypes.hpp" +#include #include "Svc/Deframer/Deframer.hpp" namespace Svc { diff --git a/Svc/Deframer/test/ut-fprime-protocol/GenerateFrames.hpp b/Svc/Deframer/test/ut-fprime-protocol/GenerateFrames.hpp index f1e6e1a41a..1e2487388b 100644 --- a/Svc/Deframer/test/ut-fprime-protocol/GenerateFrames.hpp +++ b/Svc/Deframer/test/ut-fprime-protocol/GenerateFrames.hpp @@ -7,7 +7,7 @@ #ifndef SVC_GENERATE_FRAMES_HPP #define SVC_GENERATE_FRAMES_HPP -#include "Fw/Types/BasicTypes.hpp" +#include #include "Fw/Types/StringType.hpp" #include "STest/STest/Pick/Pick.hpp" #include "STest/STest/Rule/Rule.hpp" diff --git a/Svc/Deframer/test/ut-fprime-protocol/SendBuffer.hpp b/Svc/Deframer/test/ut-fprime-protocol/SendBuffer.hpp index d642366917..0f21758709 100644 --- a/Svc/Deframer/test/ut-fprime-protocol/SendBuffer.hpp +++ b/Svc/Deframer/test/ut-fprime-protocol/SendBuffer.hpp @@ -7,7 +7,7 @@ #ifndef SVC_SEND_BUFFER_HPP #define SVC_SEND_BUFFER_HPP -#include "Fw/Types/BasicTypes.hpp" +#include #include "Fw/Types/StringType.hpp" #include "STest/STest/Pick/Pick.hpp" #include "STest/STest/Rule/Rule.hpp" diff --git a/Svc/FatalHandler/FatalHandlerComponentBaremetalImpl.cpp b/Svc/FatalHandler/FatalHandlerComponentBaremetalImpl.cpp index de7dbbef27..e62f4535ec 100644 --- a/Svc/FatalHandler/FatalHandlerComponentBaremetalImpl.cpp +++ b/Svc/FatalHandler/FatalHandlerComponentBaremetalImpl.cpp @@ -7,7 +7,7 @@ #include #include #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Svc { diff --git a/Svc/FatalHandler/FatalHandlerComponentCommonImpl.cpp b/Svc/FatalHandler/FatalHandlerComponentCommonImpl.cpp index be76416c7b..42bd6ec9e4 100644 --- a/Svc/FatalHandler/FatalHandlerComponentCommonImpl.cpp +++ b/Svc/FatalHandler/FatalHandlerComponentCommonImpl.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Svc { diff --git a/Svc/FatalHandler/FatalHandlerComponentLinuxImpl.cpp b/Svc/FatalHandler/FatalHandlerComponentLinuxImpl.cpp index 9cb3a02d63..ff566bb731 100644 --- a/Svc/FatalHandler/FatalHandlerComponentLinuxImpl.cpp +++ b/Svc/FatalHandler/FatalHandlerComponentLinuxImpl.cpp @@ -14,7 +14,7 @@ #include #include #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Svc { diff --git a/Svc/FatalHandler/FatalHandlerComponentVxWorksImpl.cpp b/Svc/FatalHandler/FatalHandlerComponentVxWorksImpl.cpp index 86f4a17922..25a8e689b1 100644 --- a/Svc/FatalHandler/FatalHandlerComponentVxWorksImpl.cpp +++ b/Svc/FatalHandler/FatalHandlerComponentVxWorksImpl.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include -#include "Fw/Types/BasicTypes.hpp" +#include #include #include diff --git a/Svc/FileDownlink/File.cpp b/Svc/FileDownlink/File.cpp index bb701afaf8..34cead16b6 100644 --- a/Svc/FileDownlink/File.cpp +++ b/Svc/FileDownlink/File.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include namespace Svc { diff --git a/Svc/FileDownlink/FileDownlink.cpp b/Svc/FileDownlink/FileDownlink.cpp index ce1fff0121..40080d320a 100644 --- a/Svc/FileDownlink/FileDownlink.cpp +++ b/Svc/FileDownlink/FileDownlink.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include #include diff --git a/Svc/FileManager/FileManager.cpp b/Svc/FileManager/FileManager.cpp index 9fb0564bef..6000fce879 100644 --- a/Svc/FileManager/FileManager.cpp +++ b/Svc/FileManager/FileManager.cpp @@ -15,7 +15,7 @@ #include "Svc/FileManager/FileManager.hpp" #include "Fw/Types/Assert.hpp" -#include "Fw/Types/BasicTypes.hpp" +#include namespace Svc { diff --git a/Svc/FileUplink/FileUplink.cpp b/Svc/FileUplink/FileUplink.cpp index ca3aecc7a6..bff997fc6d 100644 --- a/Svc/FileUplink/FileUplink.cpp +++ b/Svc/FileUplink/FileUplink.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include namespace Svc { diff --git a/Svc/Framer/Framer.cpp b/Svc/Framer/Framer.cpp index 71e13dfb4c..873ff0f20a 100644 --- a/Svc/Framer/Framer.cpp +++ b/Svc/Framer/Framer.cpp @@ -12,7 +12,7 @@ #include #include "Fw/Logger/Logger.hpp" -#include "Fw/Types/BasicTypes.hpp" +#include #include "Utils/Hash/Hash.hpp" namespace Svc { diff --git a/Svc/GenericHub/GenericHubComponentImpl.cpp b/Svc/GenericHub/GenericHubComponentImpl.cpp index 3757abf20c..0b6623fd12 100644 --- a/Svc/GenericHub/GenericHubComponentImpl.cpp +++ b/Svc/GenericHub/GenericHubComponentImpl.cpp @@ -13,7 +13,7 @@ #include #include "Fw/Logger/Logger.hpp" #include "Fw/Types/Assert.hpp" -#include "Fw/Types/BasicTypes.hpp" +#include // Required port serialization or the hub cannot work static_assert(FW_PORT_SERIALIZATION, "FW_PORT_SERIALIZATION must be enabled to use GenericHub"); diff --git a/Svc/GenericRepeater/GenericRepeaterComponentImpl.cpp b/Svc/GenericRepeater/GenericRepeaterComponentImpl.cpp index e4c4d0d39d..7c1b710faf 100644 --- a/Svc/GenericRepeater/GenericRepeaterComponentImpl.cpp +++ b/Svc/GenericRepeater/GenericRepeaterComponentImpl.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Svc { diff --git a/Svc/GroundInterface/GroundInterface.cpp b/Svc/GroundInterface/GroundInterface.cpp index 0fe5b1343e..b400fc3476 100644 --- a/Svc/GroundInterface/GroundInterface.cpp +++ b/Svc/GroundInterface/GroundInterface.cpp @@ -6,7 +6,7 @@ #include #include -#include "Fw/Types/BasicTypes.hpp" +#include #include namespace Svc { diff --git a/Svc/GroundInterface/test/ut/DeframerRules.hpp b/Svc/GroundInterface/test/ut/DeframerRules.hpp index 647e5dd7bf..09d1f72cbf 100644 --- a/Svc/GroundInterface/test/ut/DeframerRules.hpp +++ b/Svc/GroundInterface/test/ut/DeframerRules.hpp @@ -15,7 +15,7 @@ #ifndef FPRIME_SVC_GROUND_INTERFACE_HPP #define FPRIME_SVC_GROUND_INTERFACE_HPP -#include +#include #include #include #include diff --git a/Svc/GroundInterface/test/ut/GroundInterfaceRules.hpp b/Svc/GroundInterface/test/ut/GroundInterfaceRules.hpp index ed3029691e..2808d677cb 100644 --- a/Svc/GroundInterface/test/ut/GroundInterfaceRules.hpp +++ b/Svc/GroundInterface/test/ut/GroundInterfaceRules.hpp @@ -15,7 +15,7 @@ #ifndef FPRIME_SVC_GROUND_INTERFACE_HPP #define FPRIME_SVC_GROUND_INTERFACE_HPP -#include +#include #include #include #include diff --git a/Svc/Health/HealthComponentImpl.cpp b/Svc/Health/HealthComponentImpl.cpp index 22dec74b72..c2400244e5 100644 --- a/Svc/Health/HealthComponentImpl.cpp +++ b/Svc/Health/HealthComponentImpl.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include -#include "Fw/Types/BasicTypes.hpp" +#include #include namespace Svc { diff --git a/Svc/Health/Stub/HealthComponentStubChecks.cpp b/Svc/Health/Stub/HealthComponentStubChecks.cpp index 6510e8141e..051ba4e591 100644 --- a/Svc/Health/Stub/HealthComponentStubChecks.cpp +++ b/Svc/Health/Stub/HealthComponentStubChecks.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include -#include "Fw/Types/BasicTypes.hpp" +#include #include #include diff --git a/Svc/Health/VxWorks/HealthComponentVxWorksChecks.cpp b/Svc/Health/VxWorks/HealthComponentVxWorksChecks.cpp index 6510e8141e..051ba4e591 100644 --- a/Svc/Health/VxWorks/HealthComponentVxWorksChecks.cpp +++ b/Svc/Health/VxWorks/HealthComponentVxWorksChecks.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include -#include "Fw/Types/BasicTypes.hpp" +#include #include #include diff --git a/Svc/LinuxTimer/LinuxTimerComponentImplCommon.cpp b/Svc/LinuxTimer/LinuxTimerComponentImplCommon.cpp index 2f78012335..ec9158262b 100644 --- a/Svc/LinuxTimer/LinuxTimerComponentImplCommon.cpp +++ b/Svc/LinuxTimer/LinuxTimerComponentImplCommon.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Svc { diff --git a/Svc/LinuxTimer/LinuxTimerComponentImplTaskDelay.cpp b/Svc/LinuxTimer/LinuxTimerComponentImplTaskDelay.cpp index 2278b2aba3..c0cc750674 100644 --- a/Svc/LinuxTimer/LinuxTimerComponentImplTaskDelay.cpp +++ b/Svc/LinuxTimer/LinuxTimerComponentImplTaskDelay.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include #include namespace Svc { diff --git a/Svc/LinuxTimer/LinuxTimerComponentImplTimerFd.cpp b/Svc/LinuxTimer/LinuxTimerComponentImplTimerFd.cpp index f113b17135..acf3b58efa 100644 --- a/Svc/LinuxTimer/LinuxTimerComponentImplTimerFd.cpp +++ b/Svc/LinuxTimer/LinuxTimerComponentImplTimerFd.cpp @@ -12,7 +12,7 @@ #include #include -#include "Fw/Types/BasicTypes.hpp" +#include #include #include #include diff --git a/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImplCommon.cpp b/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImplCommon.cpp index ac49b26cbf..bb27536235 100644 --- a/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImplCommon.cpp +++ b/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImplCommon.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include @@ -43,8 +43,8 @@ namespace Svc { severityString = "SEVERITY ERROR"; break; } - Fw::Logger::logMsg("EVENT: (%d) (%d:%d,%d) %s: %s\n", - id, timeTag.getTimeBase(), timeTag.getSeconds(), timeTag.getUSeconds(), - reinterpret_cast(severityString), reinterpret_cast(text.toChar())); + Fw::Logger::logMsg("EVENT: (%" PRI_FwEventIdType ") (%" PRI_FwTimeBaseStoreType ":%" PRIu32 ",%" PRIu32 ") %s: %s\n", + id, static_cast(timeTag.getTimeBase()), timeTag.getSeconds(), timeTag.getUSeconds(), + reinterpret_cast(severityString), reinterpret_cast(text.toChar())); } } diff --git a/Svc/PolyDb/PolyDbImpl.cpp b/Svc/PolyDb/PolyDbImpl.cpp index 03310344a0..48e4e4c1e3 100644 --- a/Svc/PolyDb/PolyDbImpl.cpp +++ b/Svc/PolyDb/PolyDbImpl.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include namespace Svc { PolyDbImpl::PolyDbImpl(const char* name) : PolyDbComponentBase(name) { diff --git a/Svc/RateGroupDriver/RateGroupDriver.cpp b/Svc/RateGroupDriver/RateGroupDriver.cpp index f3bfe29a70..082a10f0eb 100644 --- a/Svc/RateGroupDriver/RateGroupDriver.cpp +++ b/Svc/RateGroupDriver/RateGroupDriver.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/Svc/RateGroupDriver/RateGroupDriver.hpp b/Svc/RateGroupDriver/RateGroupDriver.hpp index 3320d99257..57a3b18062 100644 --- a/Svc/RateGroupDriver/RateGroupDriver.hpp +++ b/Svc/RateGroupDriver/RateGroupDriver.hpp @@ -19,7 +19,7 @@ #define SVC_RATEGROUPDRIVER_HPP #include -#include +#include namespace Svc { diff --git a/Svc/StaticMemory/StaticMemoryComponentImpl.cpp b/Svc/StaticMemory/StaticMemoryComponentImpl.cpp index cdf48881b3..a50b8de30b 100644 --- a/Svc/StaticMemory/StaticMemoryComponentImpl.cpp +++ b/Svc/StaticMemory/StaticMemoryComponentImpl.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include -#include "Fw/Types/BasicTypes.hpp" +#include #include "Fw/Types/Assert.hpp" namespace Svc { diff --git a/Svc/SystemResources/SystemResources.cpp b/Svc/SystemResources/SystemResources.cpp index 9e34edf5d0..c187348a10 100644 --- a/Svc/SystemResources/SystemResources.cpp +++ b/Svc/SystemResources/SystemResources.cpp @@ -13,7 +13,7 @@ #include //isnan() #include #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Svc { diff --git a/Svc/TlmChan/TlmChanImpl.cpp b/Svc/TlmChan/TlmChanImpl.cpp index 69f16727ae..874bcd41be 100644 --- a/Svc/TlmChan/TlmChanImpl.cpp +++ b/Svc/TlmChan/TlmChanImpl.cpp @@ -11,7 +11,7 @@ */ #include #include -#include +#include #include #include diff --git a/Svc/TlmChan/TlmChanImplGet.cpp b/Svc/TlmChan/TlmChanImplGet.cpp index a5f54c7bce..fa630af75a 100644 --- a/Svc/TlmChan/TlmChanImplGet.cpp +++ b/Svc/TlmChan/TlmChanImplGet.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include diff --git a/Svc/TlmChan/TlmChanImplRecv.cpp b/Svc/TlmChan/TlmChanImplRecv.cpp index 4ea477b8ef..0aa2c91110 100644 --- a/Svc/TlmChan/TlmChanImplRecv.cpp +++ b/Svc/TlmChan/TlmChanImplRecv.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include diff --git a/Svc/TlmChan/TlmChanImplTask.cpp b/Svc/TlmChan/TlmChanImplTask.cpp index d44b9a1488..9415994ee0 100644 --- a/Svc/TlmChan/TlmChanImplTask.cpp +++ b/Svc/TlmChan/TlmChanImplTask.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/Svc/TlmPacketizer/TlmPacketizer.cpp b/Svc/TlmPacketizer/TlmPacketizer.cpp index 32731b2b24..9235394af8 100644 --- a/Svc/TlmPacketizer/TlmPacketizer.cpp +++ b/Svc/TlmPacketizer/TlmPacketizer.cpp @@ -9,7 +9,7 @@ // acknowledged. #include -#include +#include #include namespace Svc { diff --git a/Svc/TlmPacketizer/TlmPacketizerComponentImplCfg.hpp b/Svc/TlmPacketizer/TlmPacketizerComponentImplCfg.hpp index 0e7405c2cc..bae4d1e91e 100644 --- a/Svc/TlmPacketizer/TlmPacketizerComponentImplCfg.hpp +++ b/Svc/TlmPacketizer/TlmPacketizerComponentImplCfg.hpp @@ -14,7 +14,7 @@ #ifndef SVC_TLMPACKETIZER_TLMPACKETIZERCOMPONENTIMPLCFG_HPP_ #define SVC_TLMPACKETIZER_TLMPACKETIZERCOMPONENTIMPLCFG_HPP_ -#include +#include namespace Svc { static const NATIVE_UINT_TYPE MAX_PACKETIZER_PACKETS = 200; diff --git a/Svc/UdpReceiver/UdpReceiverComponentImpl.cpp b/Svc/UdpReceiver/UdpReceiverComponentImpl.cpp index 4b6181a537..8c9885b3de 100644 --- a/Svc/UdpReceiver/UdpReceiverComponentImpl.cpp +++ b/Svc/UdpReceiver/UdpReceiverComponentImpl.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include #include #include #include diff --git a/Svc/UdpSender/UdpSenderComponentImpl.cpp b/Svc/UdpSender/UdpSenderComponentImpl.cpp index 0271e2a928..9daa282562 100644 --- a/Svc/UdpSender/UdpSenderComponentImpl.cpp +++ b/Svc/UdpSender/UdpSenderComponentImpl.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include #include #include #include diff --git a/Utils/CRCChecker.hpp b/Utils/CRCChecker.hpp index 8d277af931..d15c23e2e9 100644 --- a/Utils/CRCChecker.hpp +++ b/Utils/CRCChecker.hpp @@ -12,7 +12,7 @@ #ifndef CRC_CHECKER_HPP #define CRC_CHECKER_HPP -#include +#include namespace Utils { diff --git a/Utils/Hash/HashBuffer.hpp b/Utils/Hash/HashBuffer.hpp index 71712081f9..eeee42da2a 100644 --- a/Utils/Hash/HashBuffer.hpp +++ b/Utils/Hash/HashBuffer.hpp @@ -13,7 +13,7 @@ #ifndef UTILS_HASH_BUFFER_HPP #define UTILS_HASH_BUFFER_HPP -#include +#include #include #include #include diff --git a/Utils/LockGuard.hpp b/Utils/LockGuard.hpp index b7e54c72ef..5b632101e3 100644 --- a/Utils/LockGuard.hpp +++ b/Utils/LockGuard.hpp @@ -12,7 +12,7 @@ #ifndef LockGuard_HPP #define LockGuard_HPP -#include +#include #include namespace Utils { diff --git a/Utils/RateLimiter.hpp b/Utils/RateLimiter.hpp index 58979fdcbd..8705bada36 100644 --- a/Utils/RateLimiter.hpp +++ b/Utils/RateLimiter.hpp @@ -13,7 +13,7 @@ #ifndef RateLimiter_HPP #define RateLimiter_HPP -#include +#include #include namespace Utils { diff --git a/Utils/TokenBucket.hpp b/Utils/TokenBucket.hpp index c4f171106d..845e279724 100644 --- a/Utils/TokenBucket.hpp +++ b/Utils/TokenBucket.hpp @@ -14,7 +14,7 @@ #ifndef TokenBucket_HPP #define TokenBucket_HPP -#include +#include #include #define MAX_TOKEN_BUCKET_TOKENS 1000 diff --git a/Utils/Types/CircularBuffer.cpp b/Utils/Types/CircularBuffer.cpp index 31d5fb34d7..594f55ca04 100644 --- a/Utils/Types/CircularBuffer.cpp +++ b/Utils/Types/CircularBuffer.cpp @@ -12,7 +12,7 @@ * Revised March 2022 * Author: bocchino */ -#include +#include #include #include diff --git a/Utils/Types/CircularBuffer.hpp b/Utils/Types/CircularBuffer.hpp index f62b7eca14..38720e839e 100644 --- a/Utils/Types/CircularBuffer.hpp +++ b/Utils/Types/CircularBuffer.hpp @@ -18,7 +18,6 @@ #define TYPES_CIRCULAR_BUFFER_HPP #include -#include #include //#define CIRCULAR_DEBUG diff --git a/Utils/Types/test/ut/CircularBuffer/CircularRules.hpp b/Utils/Types/test/ut/CircularBuffer/CircularRules.hpp index d24966098b..0d4484057b 100644 --- a/Utils/Types/test/ut/CircularBuffer/CircularRules.hpp +++ b/Utils/Types/test/ut/CircularBuffer/CircularRules.hpp @@ -19,7 +19,7 @@ #ifndef FPRIME_GROUNDINTERFACERULES_HPP #define FPRIME_GROUNDINTERFACERULES_HPP -#include +#include #include #include #include diff --git a/Utils/Types/test/ut/CircularBuffer/CircularState.hpp b/Utils/Types/test/ut/CircularBuffer/CircularState.hpp index b2c7b48723..535c29b569 100644 --- a/Utils/Types/test/ut/CircularBuffer/CircularState.hpp +++ b/Utils/Types/test/ut/CircularBuffer/CircularState.hpp @@ -7,7 +7,7 @@ * @author mstarch */ -#include +#include #include #ifndef FPRIME_CIRCULARSTATE_HPP diff --git a/Utils/test/ut/LockGuardTester.hpp b/Utils/test/ut/LockGuardTester.hpp index 009b236352..3d647897b7 100644 --- a/Utils/test/ut/LockGuardTester.hpp +++ b/Utils/test/ut/LockGuardTester.hpp @@ -15,7 +15,7 @@ #define LOCKGUARDTESTER_HPP #include "Utils/LockGuard.hpp" -#include +#include #include "gtest/gtest.h" namespace Utils { diff --git a/Utils/test/ut/RateLimiterTester.hpp b/Utils/test/ut/RateLimiterTester.hpp index c686cbefcb..90fef081ef 100644 --- a/Utils/test/ut/RateLimiterTester.hpp +++ b/Utils/test/ut/RateLimiterTester.hpp @@ -15,7 +15,7 @@ #define RATELIMITERTESTER_HPP #include "Utils/RateLimiter.hpp" -#include +#include #include "gtest/gtest.h" namespace Utils { diff --git a/Utils/test/ut/TokenBucketTester.hpp b/Utils/test/ut/TokenBucketTester.hpp index a8dfaffacb..9b6d162083 100644 --- a/Utils/test/ut/TokenBucketTester.hpp +++ b/Utils/test/ut/TokenBucketTester.hpp @@ -15,7 +15,7 @@ #define TOKENBUCKETTESTER_HPP #include "Utils/TokenBucket.hpp" -#include +#include #include "gtest/gtest.h" namespace Utils { diff --git a/ci/tests/RPI.bash b/ci/tests/RPI.bash index e52387532d..2f9af2c9ca 100755 --- a/ci/tests/RPI.bash +++ b/ci/tests/RPI.bash @@ -43,4 +43,4 @@ done # Test Completed echo -e "${GREEN}CI test ${FPUTIL_DEPLOYS} RPI SUCCESSFUL${NOCOLOR}" -archive_logs \ No newline at end of file +archive_logs diff --git a/cmake/platform/Darwin.cmake b/cmake/platform/Darwin.cmake index b8bbf56494..35a6a8c4da 100644 --- a/cmake/platform/Darwin.cmake +++ b/cmake/platform/Darwin.cmake @@ -19,5 +19,5 @@ if (NOT DEFINED FPRIME_USE_BAREMETAL_SCHEDULER) FIND_PACKAGE ( Threads REQUIRED ) endif() -# Add linux include path which is compatible with Darwin for StandardTypes.hpp -include_directories(SYSTEM "${FPRIME_FRAMEWORK_PATH}/Fw/Types/Linux") +# Add linux include path which is compatible with Darwin for PlatformTypes.hpp +include_directories(SYSTEM "${CMAKE_CURRENT_LIST_DIR}/types") diff --git a/cmake/platform/Linux.cmake b/cmake/platform/Linux.cmake index d8e71e19ea..89beac4d55 100644 --- a/cmake/platform/Linux.cmake +++ b/cmake/platform/Linux.cmake @@ -15,4 +15,5 @@ add_definitions(-DTGT_OS_TYPE_LINUX) set(FPRIME_USE_POSIX ON) # Add Linux specific headers into the system -include_directories(SYSTEM "${FPRIME_FRAMEWORK_PATH}/Fw/Types/Linux") +include_directories(SYSTEM "${CMAKE_CURRENT_LIST_DIR}/types") + diff --git a/cmake/platform/platform.cmake.template b/cmake/platform/platform.cmake.template index d38e04898c..c3c3b5087a 100644 --- a/cmake/platform/platform.cmake.template +++ b/cmake/platform/platform.cmake.template @@ -3,7 +3,7 @@ # # This file acts as a template for the fprime platform files used by the CMake system. # These files specify build flags, compiler directives, and must specify an include -# directory for system includes like "StandardTypes.hpp". +# directory for system includes like "PlatformTypes.hpp". # # Follow all the steps in this template to create a platform file. Ensure # to remove the platform-failsafe (step 1) and fill in all tags. @@ -29,7 +29,7 @@ # F prime platform files are used to set F prime specific settings. This allows the user to control # some aspects of the F prime build at the top-level. This means setting global include directories # compiler definitions for the platform, threading libraries, etc. The bare-minimum platform file -# should specify an include directory for "StandardTypes.hpp" and a threading library if using +# should specify an include directory for "PlatformTypes.hpp" and a threading library if using # active components with OS supported threads. This can be done with the following lines: # # ``` @@ -67,7 +67,7 @@ if (NOT DEFINED FPRIME_USE_BAREMETAL_SCHEDULER) FIND_PACKAGE ( Threads REQUIRED ) endif() -# STEP 5: Specify a directory containing the "StandardTypes.hpp" headers, as well +# STEP 5: Specify a directory containing the "PlatformTypes.hpp" headers, as well # as other system headers. Other global headers can be placed here. # Note: Typically, the Linux directory is a good default, as it grabs # standard types from . diff --git a/cmake/platform/types/PlatformTypes.hpp b/cmake/platform/types/PlatformTypes.hpp new file mode 100644 index 0000000000..4c4b3a5bd9 --- /dev/null +++ b/cmake/platform/types/PlatformTypes.hpp @@ -0,0 +1,129 @@ +/** + * \brief PlatformTypes.hpp for Linux/Darwin systems + * + * PlatformTypes.hpp is typically published by platform developers to define + * the standard available arithmetic types for use in fprime. This standard + * types header is designed to support standard Linux/Darwin distributions + * running on x86, x86_64 machines and using the standard gcc/clang compilers + * shipped with the operating system. + * + * As part of these definitions, we include min and max constants for each + * type. Implementors must define these constants in a C++ struct for two + * reasons: + * + * 1. static constants in structs do not incur storage when referred to + * in a static context without the need for optimization in gcc + * + * 2. static constants in structs can be inherited via private inheritance + * allowing the definitions to be available to descendant functions + * + * In C++ fprime code, users may then refer to FpLimits::PlatformIntType_MIN + * without referring to this header directly. + */ +#ifndef PLATFORM_TYPES_HPP_ +#define PLATFORM_TYPES_HPP_ +#include + +// Section 0: C Standard Types +// fprime depends on the existence of intN_t and uintN_t C standard ints and +// the mix/max values for those types. Platform developers must either: +// 1. define these types and definitions +// 2. include headers that define these types +// +// In addition, support for various type widths can be turned on/off with the +// switches in this section to control which of the C standard types are +// available in the system. fprime consumes this information and produces the +// UN, IN, and FN types we see in fprime code. +#include +#include +#include + +#define FW_HAS_64_BIT 1 //!< Architecture supports 64 bit integers +#define FW_HAS_32_BIT 1 //!< Architecture supports 32 bit integers +#define FW_HAS_16_BIT 1 //!< Architecture supports 16 bit integers +#define FW_HAS_F64 1 //!< Architecture supports 64 bit floating point numbers + +// Section 1: Logical Types +// fprime requires platform implementors to define logical types for their +// system. The list of logical types can be found in the document: +// docs/Design/numerical-types.md with the names of the form "Platform*" + +typedef int PlatformIntType; +#define PRI_PlatformIntType "d" + +typedef unsigned int PlatformUIntType; +#define PRI_PlatformUIntType "ud" + +typedef PlatformIntType PlatformIndexType; +#define PRI_PlatformIndexType PRI_PlatformIntType + +typedef PlatformUIntType PlatformSizeType; +#define PRI_PlatformSizeType PRI_PlatformUIntType + +typedef PlatformIntType PlatformAssertArgType; +#define PRI_PlatformAssertArgType PRI_PlatformIntType + +// Linux/Darwin definitions for pointer have various sizes across platforms +// and since these definitions need to be consistent we must ask the size. +#ifndef PLATFORM_POINTER_CAST_TYPE_DEFINED + // Check for __SIZEOF_POINTER__ or cause error + #ifndef __SIZEOF_POINTER__ + #error "Compiler does not support __SIZEOF_POINTER__, cannot use Linux/Darwin types" + #endif + + // Pointer sizes are determined by size of compiler + #if __SIZEOF_POINTER__ == 8 + typedef uint64_t PlatformPointerCastType; + #define PRI_PlatformPointerCastType PRIx64 + #elif __SIZEOF_POINTER__ == 4 + typedef uint32_t PlatformPointerCastType; + #define PRI_PlatformPointerCastType PRIx32 + #elif __SIZEOF_POINTER__ == 2 + typedef uint16_t PlatformPointerCastType; + #define PRI_PlatformPointerCastType PRIx16 + #else + typedef uint8_t PlatformPointerCastType; + #define PRI_PlatformPointerCastType PRIx8 + #endif +#endif +/** + * PlatformLimits: + * + * PlatformLimits define the min and max values for the constructs defined + * within this file. These must be defined as `static const` members to + * ensure that unnecessary storage is not allocated. + */ +struct PlatformLimits { + static const PlatformIntType PlatformIntType_MIN = std::numeric_limits::min(); + static const PlatformIntType PlatformIntType_MAX = std::numeric_limits::max(); + + static const PlatformUIntType PlatformUIntType_MIN = std::numeric_limits::min(); + static const PlatformUIntType PlatformUIntType_MAX = std::numeric_limits::max(); + + static const PlatformIndexType PlatformIndexType_MIN = PlatformIntType_MIN; + static const PlatformIndexType PlatformIndexType_MAX = PlatformIntType_MAX; + + static const PlatformSizeType PlatformSizeType_MIN = PlatformUIntType_MIN; + static const PlatformSizeType PlatformSizeType_MAX = PlatformUIntType_MAX; + + static const PlatformAssertArgType PlatformAssertArgType_MIN = PlatformIntType_MIN; + static const PlatformAssertArgType PlatformAssertArgType_MAX = PlatformIntType_MAX; + + // Pointer sizes are determined by size of compiler + #if __SIZEOF_POINTER__ == 8 + static const PlatformPointerCastType PlatformPointerCastType_MIN = std::numeric_limits::min(); + static const PlatformPointerCastType PlatformPointerCastType_MAX = std::numeric_limits::max(); + #elif __SIZEOF_POINTER__ == 4 + static const PlatformPointerCastType PlatformPointerCastType_MIN = std::numeric_limits::min(); + static const PlatformPointerCastType PlatformPointerCastType_MAX = std::numeric_limits::max(); + #elif __SIZEOF_POINTER__ == 2 + static const PlatformPointerCastType PlatformPointerCastType_MIN = std::numeric_limits::min(); + static const PlatformPointerCastType PlatformPointerCastType_MAX = std::numeric_limits::max(); + #elif __SIZEOF_POINTER__ == 1 + static const PlatformPointerCastType PlatformPointerCastType_MIN = std::numeric_limits::min(); + static const PlatformPointerCastType PlatformPointerCastType_MAX = std::numeric_limits::max(); + #else + #error "Unsupported pointer size" + #endif +}; +#endif //PLATFORM_TYPES_HPP_ diff --git a/config/BufferManagerComponentImplCfg.hpp b/config/BufferManagerComponentImplCfg.hpp index 08f271e46e..c3b4277953 100644 --- a/config/BufferManagerComponentImplCfg.hpp +++ b/config/BufferManagerComponentImplCfg.hpp @@ -1,7 +1,7 @@ #ifndef __BUFFERMANAGERCOMPONENTIMPLCFG_HPP__ #define __BUFFERMANAGERCOMPONENTIMPLCFG_HPP__ -#include +#include namespace Svc { static const NATIVE_UINT_TYPE BUFFERMGR_MAX_NUM_BINS = 10; diff --git a/config/DeframerCfg.hpp b/config/DeframerCfg.hpp index 7f3badc89d..64eed47649 100644 --- a/config/DeframerCfg.hpp +++ b/config/DeframerCfg.hpp @@ -7,7 +7,7 @@ #ifndef SVC_DEFRAMER_CFG_HPP #define SVC_DEFRAMER_CFG_HPP -#include +#include namespace Svc { namespace DeframerCfg { diff --git a/config/FileDownlinkCfg.hpp b/config/FileDownlinkCfg.hpp index 8c39633395..113e6e10e1 100644 --- a/config/FileDownlinkCfg.hpp +++ b/config/FileDownlinkCfg.hpp @@ -6,7 +6,7 @@ #ifndef SVC_FILEDOWNLINK_FILEDOWNLINKCFG_HPP_ #define SVC_FILEDOWNLINK_FILEDOWNLINKCFG_HPP_ -#include +#include namespace Svc { // If this is set to true, the run handler will look to diff --git a/config/FpConfig.hpp b/config/FpConfig.hpp index 3224a25264..12b10ecb30 100644 --- a/config/FpConfig.hpp +++ b/config/FpConfig.hpp @@ -11,30 +11,106 @@ */ #ifndef _FW_CONFIG_HPP_ #define _FW_CONFIG_HPP_ +#include -// To enable various facilities, set the below to 0 or 1. If it is set in compiler flags, -// these defaults will be overridden +typedef PlatformIndexType FwIndexType; +#define PRI_FwIndexType PRI_PlatformIndexType -// Available types +typedef PlatformSizeType FwSizeType; +#define PRI_FwSizeType PRI_PlatformSizeType -#ifndef FW_HAS_64_BIT -#define FW_HAS_64_BIT 1 //!< Architecture supports 64 bit integers -#endif +typedef PlatformAssertArgType FwAssertArgType; +#define PRI_FwAssertArgType PRI_PlatformAssertArgType -#ifndef FW_HAS_32_BIT -#define FW_HAS_32_BIT 1 //!< Architecture supports 32 bit integers -#endif -#ifndef FW_HAS_16_BIT -#define FW_HAS_16_BIT 1 //!< Architecture supports 16 bit integers -#endif +typedef PlatformIntType FwNativeIntType; +#define PRI_FwNativeIntType PRI_PlatformIntType -#ifndef FW_HAS_F64 -#define FW_HAS_F64 1 //!< Architecture supports 64 bit floating point numbers -#endif +typedef PlatformUIntType FwNativeUIntType; +#define PRI_FwNativeUIntType PRI_PlatformUIntType + +typedef U16 FwBuffSizeType; +#define PRI_FwBuffSizeType PRIu16 + +typedef I32 FwEnumStoreType; +#define PRI_FwEnumStoreType PRId32 + +// Define enumeration for Time base types +enum TimeBase { + TB_NONE, //!< No time base has been established + TB_PROC_TIME, //!< Indicates time is processor cycle time. Not tied to external time + TB_WORKSTATION_TIME, //!< Time as reported on workstation where software is running. For testing. + TB_DONT_CARE = 0xFFFF //!< Don't care value for sequences. If FwTimeBaseStoreType is changed, value should be changed +}; +#define FW_CONTEXT_DONT_CARE 0xFF //!< Don't care value for time contexts in sequences + +typedef U16 FwTimeBaseStoreType; +#define PRI_FwTimeBaseStoreType PRIu16 + +typedef U8 FwTimeContextStoreType; +#define PRI_FwTimeContextStoreType PRIu8 + +typedef U32 FwPacketDescriptorType; +#define PRI_FwPacketDescriptorType PRIu32 + +typedef U32 FwOpcodeType; +#define PRI_FwOpcodeType PRIu32 + +typedef U32 FwChanIdType; +#define PRI_FwChanIdType PRIu32 + +typedef U32 FwEventIdType; +#define PRI_FwEventIdType PRIu32 + +typedef U32 FwPrmIdType; +#define PRI_FwPrmIdType PRIu32 + +typedef U16 FwTlmPacketizeIdType; +#define PRI_FwTlmPacketizeIdType PRIu16 + +/** + * FpLimits: + * + * Sets the limit constants for the types defined int this file. Constants are + * defined as `static const` to ensure that storage is not allocated. This class + * inherits from BasicLimits and transitively from PlatformLimits such that it + * includes the limits included within those files. + * + **/ +struct FpLimits : BasicLimits { + static const FwIndexType FwIndexType_MIN = PlatformIndexType_MIN; + static const FwIndexType FwIndexType_MAX = PlatformIndexType_MAX; + static const FwSizeType FwSizeType_MIN = PlatformSizeType_MIN; + static const FwSizeType FwSizeType_MAX = PlatformSizeType_MAX; + static const FwAssertArgType FwAssertArgType_MIN = PlatformAssertArgType_MIN; + static const FwAssertArgType FwAssertArgType_MAX = PlatformAssertArgType_MAX; + static const FwNativeIntType FwNativeIntType_MIN = PlatformIntType_MIN; + static const FwNativeIntType FwNativeIntType_MAX = PlatformIntType_MAX; + static const FwNativeUIntType FwNativeUIntType_MIN = PlatformUIntType_MIN; + static const FwNativeUIntType FwNativeUIntType_MAX = PlatformUIntType_MAX; + static const FwBuffSizeType FwBuffSizeType_MIN = U16_MIN; + static const FwBuffSizeType FwBuffSizeType_MAX = U16_MAX; + static const FwEnumStoreType FwEnumStoreType_MIN = I32_MIN; + static const FwEnumStoreType FwEnumStoreType_MAX = I32_MAX; + static const FwTimeBaseStoreType FwTimeBaseStoreType_MIN = U16_MIN; + static const FwTimeBaseStoreType FwTimeBaseStoreType_MAX = U16_MAX; + static const FwTimeContextStoreType FwTimeContextStoreType_MIN = U8_MIN; + static const FwTimeContextStoreType FwTimeContextStoreType_MAX = U8_MAX; + static const FwPacketDescriptorType FwPacketDescriptorType_MIN = U32_MIN; + static const FwPacketDescriptorType FwPacketDescriptorType_MAX = U32_MAX; + static const FwOpcodeType FwOpcodeType_MIN = U32_MIN; + static const FwOpcodeType FwOpcodeType_MAX = U32_MAX; + static const FwChanIdType FwChanIdType_MIN = U32_MIN; + static const FwChanIdType FwChanIdType_MAX = U32_MAX; + static const FwEventIdType FwEventIdType_MIN = U32_MIN; + static const FwEventIdType FwEventIdType_MAX = U32_MAX; + static const FwPrmIdType FwPrmIdType_MIN = U32_MIN; + static const FwPrmIdType FwPrmIdType_MAX = U32_MAX; + static const FwTlmPacketizeIdType FwTlmPacketizeIdType_MIN = U16_MIN; + static const FwTlmPacketizeIdType FwTlmPacketizeIdType_MAX = U16_MAX; +}; // Boolean values for serialization - #ifndef FW_SERIALIZE_TRUE_VALUE #define FW_SERIALIZE_TRUE_VALUE (0xFF) //!< Value encoded during serialization for boolean true #endif @@ -43,48 +119,6 @@ #define FW_SERIALIZE_FALSE_VALUE (0x00) //!< Value encoded during serialization for boolean false #endif -#ifndef AssertArg -#define AssertArg U32 -#endif - -// typedefs for various serialization items -// *** NOTE *** Changes here MUST match GSE in order to decode the values correctly - -#ifndef FwPacketDescriptorType -#define FwPacketDescriptorType U32 //!< Type representation for a packet descriptor -#endif - -#ifndef FwOpcodeType -#define FwOpcodeType U32 //!< Type representation for a command opcode -#endif - -#ifndef FwChanIdType -#define FwChanIdType U32 //!< Type representation for a channel id -#endif - -#ifndef FwEventIdType -#define FwEventIdType U32 //!< Type representation for an event id -#endif - -#ifndef FwPrmIdType -#define FwPrmIdType U32 //!< Type representation for a parameter id -#endif - -#ifndef FwTlmPacketizeIdType -#define FwTlmPacketizeIdType U16 //!< Packetized telemetry packet id -#endif - -// How big the size of a buffer (or string) representation is -#ifndef FwBuffSizeType -#define FwBuffSizeType U16 //!< Type representation for storing a buffer or string size -#endif - -// How many bits are used to store an enumeration defined in XML during serialization. -#ifndef FwEnumStoreType -#define FwEnumStoreType I32 //!< Type representation for an enumeration value -#endif - -// Object facilities // Allow objects to have names. Allocates storage for each instance #ifndef FW_OBJECT_NAMES @@ -320,24 +354,6 @@ #define FW_AMPCS_COMPATIBLE 0 //!< Whether or not JPL AMPCS ground system support is enabled. #endif -// Define enumeration for Time base types -enum TimeBase { - TB_NONE, //!< No time base has been established - TB_PROC_TIME, //!< Indicates time is processor cycle time. Not tied to external time - TB_WORKSTATION_TIME, //!< Time as reported on workstation where software is running. For testing. - TB_DONT_CARE = 0xFFFF //!< Don't care value for sequences. If FwTimeBaseStoreType is changed, value should be changed -}; - -// How many bits are used to store the time base -#ifndef FwTimeBaseStoreType -#define FwTimeBaseStoreType U16 //!< Storage conversion for time base in scripts/ground interface -#endif - -#ifndef FwTimeContextStoreType -#define FwTimeContextStoreType U8 //!< Storage conversion for time context in scripts/ground interface -#define FW_CONTEXT_DONT_CARE 0xFF //!< Don't care value for time contexts in sequences -#endif - // These settings configure whether or not the timebase and context values for the Fw::Time // class are used. Some systems may not use or need those fields diff --git a/config/UdpReceiverComponentImplCfg.hpp b/config/UdpReceiverComponentImplCfg.hpp index c32d8e8e78..f09ee10e07 100644 --- a/config/UdpReceiverComponentImplCfg.hpp +++ b/config/UdpReceiverComponentImplCfg.hpp @@ -8,7 +8,7 @@ #ifndef SVC_UDPRECEIVER_UDPRECEIVERCOMPONENTIMPLCFG_HPP_ #define SVC_UDPRECEIVER_UDPRECEIVERCOMPONENTIMPLCFG_HPP_ -#include "Fw/Types/BasicTypes.hpp" +#include namespace Svc { const static NATIVE_UINT_TYPE UDP_RECEIVER_MSG_SIZE = 256; diff --git a/config/UdpSenderComponentImplCfg.hpp b/config/UdpSenderComponentImplCfg.hpp index a39be283dc..3ed3660e06 100644 --- a/config/UdpSenderComponentImplCfg.hpp +++ b/config/UdpSenderComponentImplCfg.hpp @@ -8,7 +8,7 @@ #ifndef SVC_UDPSENDER_UDPSENDERCOMPONENTIMPLCFG_HPP_ #define SVC_UDPSENDER_UDPSENDERCOMPONENTIMPLCFG_HPP_ -#include "Fw/Types/BasicTypes.hpp" +#include namespace Svc { static const NATIVE_UINT_TYPE UDP_SENDER_MSG_SIZE = 256; diff --git a/docs/Design/numerical-types.md b/docs/Design/numerical-types.md index 3ff26d721e..f486b05b40 100644 --- a/docs/Design/numerical-types.md +++ b/docs/Design/numerical-types.md @@ -29,7 +29,7 @@ their compiler does not support. | F32 | float | n/a | | F64 | double | FW_HAS_F64 | -Platform developers should include `stdint.h` or equivalent in their `StandardTypes.hpp` file provided alongside their +Platform developers should include `stdint.h` or equivalent in their `PlatformTypes.hpp` file provided alongside their platform. If for some reason that header does not exist or does not define all types, then developers must define all "Equivalent" definitions above. @@ -41,6 +41,8 @@ U32 value = 10; printf("My value: %" PRId32, value); // Uses string constant concatenation ``` +Minimum and maximum limits are provided by `FpLimits` of the form `FpLimits::_MIN` and `FpLimits::_MAX`. + ## F´ Logical Integer Type Design @@ -57,37 +59,45 @@ projects need to be able to control these sizes when operating across multiple p ### Platform Configured Types -Platform developers should define the following logical types in the `StandardTypes.hpp` header provided alongside -their CMake platform and toolchain files. Each must also define a compiler directive to indicate the type was defined. -If the type is not specified as seen through the compiler directive the `DefaultTypes.hpp` header will fill in a default -definition. Each also defines a format specifier for use with the `printf` family of functions. Additionally, each -defines a pair of constants of the form `_MIN` and `_MAX` to define the minimum and maximum values. +Platform developers must define the following logical types in the `PlatformTypes.hpp` header provided alongside +their CMake platform and toolchain files. Each type also defines a format specifier for use with the `printf` family of +functions. Additionally, each defines a pair of static constants of the form `_MIN` and `_MAX` as limits to +the range of these values. All limits must be defined as public static constants or public static constant expressions +within a struct called `PlatformLimits`. For simplicity, structs are used to ensure all definitions are public. -| Platform Logical Type | Compiler Directive | Default | Format Specifier | Notes | -|-------------------------|------------------------------------|------------------|-----------------------|-----------------------------| -| PlatformIndexType | PLATFORM_INDEX_TYPE_DEFINED | PlatformIntType | PRI_PlatformIndexType | Ports indices | -| PlatformSizeType | PLATFORM_SIZE_TYPE_DEFINED | PlatformUIntType | PRI_PlatformSizeType | Sizes | -| PlatformPointerCastType | PLATFORM_POINTER_CAST_TYPE_DEFINED | PlatformIntType | PRI_PointerCastType | Pointers stored as integers | -| PlatformAssertArgType | PLATFORM_ASSERT_ARG_TYPE_DEFINED | PlatformIntType | PRI_AssertArgType | Argument to FW_ASSERT | -| PlatformIntType | PLATFORM_INT_TYPE_DEFINED | int | PRI_PlatformIntType | Deprecated (see note) | -| PlatformUIntType | PLATFORM_UINT_TYPE_DEFINED | unsigned int | PRI_PlatformUIntType | Deprecated (see note) | +| Platform Logical Type | Format Specifier | Notes | +|-------------------------|-----------------------------|-----------------------------| +| PlatformIndexType | PRI_PlatformIndexType | Ports indices | +| PlatformSizeType | PRI_PlatformSizeType | Sizes | +| PlatformPointerCastType | PRI_PlatformPointerCastType | Pointers stored as integers | +| PlatformAssertArgType | PRI_PlatformAssertArgType | Argument to FW_ASSERT | +| PlatformIntType | PRI_PlatformIntType | Deprecated (see note) | +| PlatformUIntType | PRI_PlatformUIntType | Deprecated (see note) | -A complete definition of a type as a platform should supply within `StandardTypes.hpp` is shown below. Notice the type -is defined along with a compiler directive announcing it is defined, and a format specifier. +A complete definition of each type for a given platform must be supplied within `PlatformTypes.hpp` as shown in the +example below. Notice the type is defined along with a format specifier and static constants are set in the +`PlatformLimits` struct. ```c++ typedef int32_t PlatformIndexType; -const PlatformIndexType PlatformIndexType_MIN = 0; -const PlatformIndexType PlatformIndexType_MAX = INT32_MAX; -#define PLATFORM_INDEX_TYPE_DEFINED #define PRI_PlatformIndexType PRId32 +... + +struct PlatformLimits { + ... + static const PlatformIndexType PlatformIndexType_MIN = 0; + static const PlatformIndexType PlatformIndexType_MAX = INT32_MAX; + ... +}; ``` -In order to print these types, developers can use the following example as a basis: +In order to print these types, developers can use the following example as a basis for using the PRI_* macros. This +example also shows the use of the type's minimum limit. ```c++ PlatformIndexType index = 3; -printf("Index: %" PRI_PlatformIndexType " is the index", index); // Uses string constant concatenation +// Print the above index type, and the minimum value supported by the same type +printf("Index %" PRI_PlatformIndexType " is bound by %" PRI_PlatformIndexType, index, FpLimits::PlatformIndexType_MIN); ``` **Note:** in order for F´ to compile without warnings it is necessary that each of the platform types are elements in @@ -95,23 +105,27 @@ the set of integers supplied by the C standard int header. i.e. each type is an `int64_t` or unsigned equivalents. On some compilers `int` and `unsigned int` are not members of that set and on those platforms it is imperative that both `PlatformIntType` and `PlatformUIntType` be set to some fixed size type instead. +Additionally, types are defined as public static const expressions within a struct for two reasons. First, it allows the +use of strongly typed constants without allocating storage for the constant nor requiring compiler optimization to +remove storage. Second, it allows inheritance such that all constants from `PlatformLimits`, `BasicLimits`, and +`FpLimits` (described below) are available through `FpLimits`. This implementation implies that one should never take +the address of one of these constants. + ### Configurable Integer Types Project may configure the framework types that the framework and components use for implementation through -`FpConfig.hpp`. The default configuration uses the above platform types where applicable. `_MIN` and `_MAX` -to define the minimum and maximum values. +`FpConfig.hpp`. The default configuration as supplied with F´uses the above platform types where applicable. +`_MIN` and `_MAX` limit constants are to be defined publicly within the `FpLimits` struct. The `FpLimits` +struct inherit from `BasicLimits` using private inheritance as shown in the example at the bottom of this section. -| Framework Type | Logical Usage | Default | Format Specifier | Notes | -|------------------------|----------------------------|-----------------------|----------------------|------------| -| FwIndexType | Port indices | PlatformIndexType | PRI_FwIndexType | | -| FwSizeType | Sizes | PlatformSizeType | PRI_FwSizeType | | -| FwAssertArg | Arguments to asserts | PlatformAssertArgType | PRI_FwAssertArgType | | -| FwNativeIntType | `int` | PlatformIntType | PRI_FwNativeIntType | Deprecated | -| FwNativeUIntType | `unsigned int` | PlatformUIntType | PRI_FwNativeUIntType | Deprecated | +| Framework Type | Logical Usage | Default | Format Specifier | Notes | +|-----------------|----------------------|-----------------------|---------------------|-------| +| FwIndexType | Port indices | PlatformIndexType | PRI_FwIndexType | | +| FwSizeType | Sizes | PlatformSizeType | PRI_FwSizeType | | +| FwAssertArgType | Arguments to asserts | PlatformAssertArgType | PRI_FwAssertArgType | | There is also a set of framework types that are used across F´ deployments and specifically interact with ground data -systems. `_MIN` and `_MAX` to define the minimum and maximum values. These GDS types are based on -configurable platform independent fixed-widths as shown below: +systems. These GDS types have defaults based on configurable platform independent fixed-widths as shown below: | GDS Type | Logical Usage | Default | Format Specifier | |------------------------|----------------------------|-----------------------|----------------------------| @@ -126,11 +140,18 @@ configurable platform independent fixed-widths as shown below: | FwPrmIdType | F´ parameter ids | U32 | PRI_FwPrmIdType | | FwTlmPacketizeIdType | F´ telemetry packet ids | U16 | PRI_FwTlmPacketizeIdType | -A complete definition of a framework/GDS type in `FpConfig.hpp` would look like: +All defaults can be overridden via project specific configuration supplying a custom `FpConfig.hpp`. A complete +definition of a framework/GDS type in `FpConfig.hpp` would look like: ```c++ +#include +... typedef uint32_t FwSizeType; -const FwSizeType PlatformIndexType_MIN = 0; -const FwSizeType PlatformIndexType_MAX = UINT32_MAX; #define PRI_FwSizeType PRIu32 +... + +struct FpLimits : BasicLimits { + const FwSizeType PlatformIndexType_MIN = 0; + const FwSizeType PlatformIndexType_MAX = UINT32_MAX; +}; ``` diff --git a/docs/Tutorials/GpsTutorial/Tutorial.md b/docs/Tutorials/GpsTutorial/Tutorial.md index bb63a1c940..210746a3a9 100644 --- a/docs/Tutorials/GpsTutorial/Tutorial.md +++ b/docs/Tutorials/GpsTutorial/Tutorial.md @@ -460,7 +460,7 @@ is not to demonstrate how to write each line of code, the steps above are called // ====================================================================== #include -#include "Fw/Types/BasicTypes.hpp" +#include #include "Fw/Logger/Logger.hpp" #include diff --git a/docs/Tutorials/MathComponent/MathReceiver/MathReceiver.cpp b/docs/Tutorials/MathComponent/MathReceiver/MathReceiver.cpp index 3e312eb09e..50340b3b5e 100644 --- a/docs/Tutorials/MathComponent/MathReceiver/MathReceiver.cpp +++ b/docs/Tutorials/MathComponent/MathReceiver/MathReceiver.cpp @@ -11,7 +11,7 @@ // ====================================================================== #include "Fw/Types/Assert.hpp" -#include "Fw/Types/BasicTypes.hpp" +#include #include "Ref/MathReceiver/MathReceiver.hpp" namespace Ref { diff --git a/docs/Tutorials/MathComponent/MathSender/MathSender.cpp b/docs/Tutorials/MathComponent/MathSender/MathSender.cpp index e74f498309..ad839ed6d2 100644 --- a/docs/Tutorials/MathComponent/MathSender/MathSender.cpp +++ b/docs/Tutorials/MathComponent/MathSender/MathSender.cpp @@ -12,7 +12,7 @@ #include -#include "Fw/Types/BasicTypes.hpp" +#include namespace Ref { diff --git a/docs/UsersGuide/cmake/cmake-platforms.md b/docs/UsersGuide/cmake/cmake-platforms.md index 6d8247f7ca..39622c08d5 100644 --- a/docs/UsersGuide/cmake/cmake-platforms.md +++ b/docs/UsersGuide/cmake/cmake-platforms.md @@ -4,7 +4,7 @@ Users can create platform-specific build files for the purposes of tailoring fpr for given platform targets. Any CMake toolchain file should work, but it will require a platform file created here to add target specific configuration using the name "${CMAKE_SYSTEM_NAME}.cmake". -At minimum this file can be blank, but more commonly included paths for "StandardTypes.hpp" to support. +At minimum this file can be blank, but more commonly included paths for "PlatformTypes.hpp" to support. Build flags, and other includes can be added in to support different compile time options. In addition, these files can define CMake option flags specific to the build.