diff --git a/FppTestProject/FppTest/component/active/test/ut/ActiveTestTester.hpp b/FppTestProject/FppTest/component/active/test/ut/ActiveTestTester.hpp index e3fbbcbc19a..b42d41877b7 100644 --- a/FppTestProject/FppTest/component/active/test/ut/ActiveTestTester.hpp +++ b/FppTestProject/FppTest/component/active/test/ut/ActiveTestTester.hpp @@ -143,11 +143,11 @@ class ActiveTestTester : public ActiveTestGTestBase { FppTest::Types::AliasStringArrayType arrayStringAliasReturnVal; // Buffers from serial output ports; - U8 primitiveData[InputPrimitiveArgsPort::SERIALIZED_SIZE]; - U8 stringData[InputStringArgsPort::SERIALIZED_SIZE]; - U8 enumData[InputEnumArgsPort::SERIALIZED_SIZE]; - U8 arrayData[InputArrayArgsPort::SERIALIZED_SIZE]; - U8 structData[InputStructArgsPort::SERIALIZED_SIZE]; + U8 primitiveData[PrimitiveArgsPortBuffer::CAPACITY]; + U8 stringData[StringArgsPortBuffer::CAPACITY]; + U8 enumData[EnumArgsPortBuffer::CAPACITY]; + U8 arrayData[ArrayArgsPortBuffer::CAPACITY]; + U8 structData[StructArgsPortBuffer::CAPACITY]; U8 serialData[SERIAL_ARGS_BUFFER_CAPACITY]; Fw::SerialBuffer primitiveBuf; diff --git a/FppTestProject/FppTest/component/passive/test/ut/PassiveTestTester.hpp b/FppTestProject/FppTest/component/passive/test/ut/PassiveTestTester.hpp index 1ec7ee5c212..0bed7c6a98c 100644 --- a/FppTestProject/FppTest/component/passive/test/ut/PassiveTestTester.hpp +++ b/FppTestProject/FppTest/component/passive/test/ut/PassiveTestTester.hpp @@ -126,11 +126,11 @@ class PassiveTestTester : public PassiveTestGTestBase { FppTest::Types::AliasStringArrayType arrayStringAliasReturnVal; // Buffers from serial output ports; - U8 primitiveData[InputPrimitiveArgsPort::SERIALIZED_SIZE]; - U8 stringData[InputStringArgsPort::SERIALIZED_SIZE]; - U8 enumData[InputEnumArgsPort::SERIALIZED_SIZE]; - U8 arrayData[InputArrayArgsPort::SERIALIZED_SIZE]; - U8 structData[InputStructArgsPort::SERIALIZED_SIZE]; + U8 primitiveData[PrimitiveArgsPortBuffer::CAPACITY]; + U8 stringData[StringArgsPortBuffer::CAPACITY]; + U8 enumData[EnumArgsPortBuffer::CAPACITY]; + U8 arrayData[ArrayArgsPortBuffer::CAPACITY]; + U8 structData[StructArgsPortBuffer::CAPACITY]; U8 serialData[SERIAL_ARGS_BUFFER_CAPACITY]; Fw::SerialBuffer primitiveBuf; diff --git a/FppTestProject/FppTest/component/queued/test/ut/QueuedTestTester.hpp b/FppTestProject/FppTest/component/queued/test/ut/QueuedTestTester.hpp index 6004859880f..a6aaccb2954 100644 --- a/FppTestProject/FppTest/component/queued/test/ut/QueuedTestTester.hpp +++ b/FppTestProject/FppTest/component/queued/test/ut/QueuedTestTester.hpp @@ -143,11 +143,11 @@ class QueuedTestTester : public QueuedTestGTestBase { FppTest::Types::AliasStringArrayType arrayStringAliasReturnVal; // Buffers from serial output ports; - U8 primitiveData[InputPrimitiveArgsPort::SERIALIZED_SIZE]; - U8 stringData[InputStringArgsPort::SERIALIZED_SIZE]; - U8 enumData[InputEnumArgsPort::SERIALIZED_SIZE]; - U8 arrayData[InputArrayArgsPort::SERIALIZED_SIZE]; - U8 structData[InputStructArgsPort::SERIALIZED_SIZE]; + U8 primitiveData[PrimitiveArgsPortBuffer::CAPACITY]; + U8 stringData[StringArgsPortBuffer::CAPACITY]; + U8 enumData[EnumArgsPortBuffer::CAPACITY]; + U8 arrayData[ArrayArgsPortBuffer::CAPACITY]; + U8 structData[StructArgsPortBuffer::CAPACITY]; U8 serialData[SERIAL_ARGS_BUFFER_CAPACITY]; Fw::SerialBuffer primitiveBuf; diff --git a/FppTestProject/FppTest/component/tests/PortTests.hpp b/FppTestProject/FppTest/component/tests/PortTests.hpp index 5adc5bbd967..f5e6b5c1c32 100644 --- a/FppTestProject/FppTest/component/tests/PortTests.hpp +++ b/FppTestProject/FppTest/component/tests/PortTests.hpp @@ -370,7 +370,7 @@ this->checkSerializeStatusBufferEmpty(); \ \ /* Check successful serialization */ \ - U8 data[InputPrimitiveArgsPort::SERIALIZED_SIZE]; \ + U8 data[PrimitiveArgsPortBuffer::CAPACITY]; \ Fw::SerialBuffer buf(data, sizeof(data)); \ \ status = buf.serializeFrom(port.args.val1); \ @@ -452,7 +452,7 @@ this->checkSerializeStatusBufferEmpty(); \ \ /* Check successful serialization */ \ - U8 data[InputStringArgsPort::SERIALIZED_SIZE]; \ + U8 data[StringArgsPortBuffer::CAPACITY]; \ Fw::SerialBuffer buf(data, sizeof(data)); \ \ status = buf.serializeFrom(port.args.val1); \ @@ -497,7 +497,7 @@ this->checkSerializeStatusBufferEmpty(); \ \ /* Check successful serialization */ \ - U8 data[InputEnumArgsPort::SERIALIZED_SIZE]; \ + U8 data[EnumArgsPortBuffer::CAPACITY]; \ Fw::SerialBuffer buf(data, sizeof(data)); \ \ status = buf.serializeFrom(port.args.val1); \ @@ -541,7 +541,7 @@ \ this->checkSerializeStatusBufferEmpty(); \ \ - U8 data[InputArrayArgsPort::SERIALIZED_SIZE]; \ + U8 data[ArrayArgsPortBuffer::CAPACITY]; \ Fw::SerialBuffer buf(data, sizeof(data)); \ \ status = buf.serializeFrom(port.args.val1); \ @@ -591,7 +591,7 @@ \ this->checkSerializeStatusBufferEmpty(); \ \ - U8 data[InputStructArgsPort::SERIALIZED_SIZE]; \ + U8 data[StructArgsPortBuffer::CAPACITY]; \ Fw::SerialBuffer buf(data, sizeof(data)); \ \ status = buf.serializeFrom(port.args.val1); \ diff --git a/Ref/Main.cpp b/Ref/Main.cpp index 7ead81b1af7..e16206c76ff 100644 --- a/Ref/Main.cpp +++ b/Ref/Main.cpp @@ -14,10 +14,12 @@ #include // Used for command line argument processing #include -// Used for printf functions +// Used for atoi #include // Used to get the Os::Console #include +// Used for logging to the console +#include /** * \brief print commandline help message @@ -27,7 +29,7 @@ * @param app: name of application */ void print_usage(const char* app) { - (void)printf("Usage: ./%s [options]\n-a\thostname/IP address\n-p\tport_number\n", app); + Fw::Logger::log("Usage: ./%s [options]\n-a\thostname/IP address\n-p\tport_number\n", app); } /** @@ -87,12 +89,12 @@ int main(int argc, char* argv[]) { // Setup program shutdown via Ctrl-C signal(SIGINT, signalHandler); signal(SIGTERM, signalHandler); - (void)printf("Hit Ctrl-C to quit\n"); + Fw::Logger::log("Hit Ctrl-C to quit\n"); // Setup, cycle, and teardown topology Ref::setupTopology(inputs); Ref::startRateGroups(Fw::TimeInterval(1, 0)); // Program loop cycling rate groups at 1Hz Ref::teardownTopology(inputs); - (void)printf("Exiting...\n"); + Fw::Logger::log("Exiting...\n"); return 0; } diff --git a/default/config/FpConfig.h b/default/config/FpConfig.h index eb9c803ca36..1e5ef864a2d 100644 --- a/default/config/FpConfig.h +++ b/default/config/FpConfig.h @@ -21,9 +21,18 @@ extern "C" { // Configuration switches // ---------------------------------------------------------------------- -// Direct port calls (TODO) +// Enable strict assertions +#ifndef FW_STRICT_ASSERTIONS +#define FW_STRICT_ASSERTIONS (1) //!< Indicates whether strict assertions are used (more checking, more instructions) +#endif + +// Enable direct port calls #ifndef FW_DIRECT_PORT_CALLS -#define FW_DIRECT_PORT_CALLS 0 +#ifdef BUILD_UT +#define FW_DIRECT_PORT_CALLS (0) //!< Indirect port calls are required for unit tests +#else +#define FW_DIRECT_PORT_CALLS (1) //!< Indicates whether direct port calls are used (saves space and time) +#endif #endif // Allow objects to have names. Allocates storage for each instance diff --git a/requirements.txt b/requirements.txt index 6bfd7e24a1c..cb77d73b622 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,7 +19,7 @@ Flask-Compress==1.15 Flask-RESTful==0.3.10 fprime-fpl-layout==1.0.4 fprime-fpl-write-pic==1.0.4 -fprime-fpp==3.2.0 +fprime-fpp==3.3.0a1 fprime-gds==4.2.0 fprime-tools==4.2.0 fprime-visual==1.0.2