From d84784035a23b6901da633780e5ee2fb6c7264bd Mon Sep 17 00:00:00 2001 From: M Starch Date: Thu, 8 Aug 2024 08:35:16 -0700 Subject: [PATCH 01/11] Updating spec to include 'hook' overflow option --- docs/spec/Lexical-Elements.adoc | 1 + docs/spec/Specifiers/Port-Instance-Specifiers.adoc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/spec/Lexical-Elements.adoc b/docs/spec/Lexical-Elements.adoc index 81514c364..8f1234414 100644 --- a/docs/spec/Lexical-Elements.adoc +++ b/docs/spec/Lexical-Elements.adoc @@ -70,6 +70,7 @@ get guarded health high +hook id import include diff --git a/docs/spec/Specifiers/Port-Instance-Specifiers.adoc b/docs/spec/Specifiers/Port-Instance-Specifiers.adoc index f6b64e82b..7f211a0d0 100644 --- a/docs/spec/Specifiers/Port-Instance-Specifiers.adoc +++ b/docs/spec/Specifiers/Port-Instance-Specifiers.adoc @@ -54,6 +54,8 @@ _queue-full-behavior_ is one of the following: . `drop` +. `hook` + _special-port-input-kind_ is one of the following: . `async` @@ -150,6 +152,8 @@ space on the queue for the message. .. `drop` means that the message is dropped. +.. `hook` means that the message is passed to a user-supplied hook function. + + This specifier is valid only for `async input` ports. If no specifier appears, then the default behavior is `assert`. From b4171df68bc48b215f5de4fff8035461d1feca45 Mon Sep 17 00:00:00 2001 From: M Starch Date: Thu, 8 Aug 2024 08:40:31 -0700 Subject: [PATCH 02/11] Adding 'hook' overflow option to syntax --- compiler/lib/src/main/scala/syntax/Lexer.scala | 1 + compiler/lib/src/main/scala/syntax/Parser.scala | 3 +++ compiler/lib/src/main/scala/syntax/Token.scala | 1 + 3 files changed, 5 insertions(+) diff --git a/compiler/lib/src/main/scala/syntax/Lexer.scala b/compiler/lib/src/main/scala/syntax/Lexer.scala index 404382a42..5002f6dbc 100644 --- a/compiler/lib/src/main/scala/syntax/Lexer.scala +++ b/compiler/lib/src/main/scala/syntax/Lexer.scala @@ -276,6 +276,7 @@ object Lexer extends RegexParsers { ("guarded", (u: Unit) => Token.GUARDED()), ("health", (u: Unit) => Token.HEALTH()), ("high", (u: Unit) => Token.HIGH()), + ("hook", (u: Unit) => Token.HOOK()), ("id", (u: Unit) => Token.ID()), ("import", (u: Unit) => Token.IMPORT()), ("include", (u: Unit) => Token.INCLUDE()), diff --git a/compiler/lib/src/main/scala/syntax/Parser.scala b/compiler/lib/src/main/scala/syntax/Parser.scala index 80fa24d5c..136495a86 100644 --- a/compiler/lib/src/main/scala/syntax/Parser.scala +++ b/compiler/lib/src/main/scala/syntax/Parser.scala @@ -349,6 +349,7 @@ object Parser extends Parsers { assert ^^ { case _ => Ast.QueueFull.Assert } | block ^^ { case _ => Ast.QueueFull.Block } | drop ^^ { case _ => Ast.QueueFull.Drop } | + hook ^^ { case _ => Ast.QueueFull.Hook } | failure("queue full expected") } @@ -776,6 +777,8 @@ object Parser extends Parsers { private def high = accept("high", { case t : Token.HIGH => t }) + private def hook = accept("hook", { case t : Token.HOOK => t }) + private def id = accept("id", { case t : Token.ID => t }) private def ident: Parser[Ast.Ident] = diff --git a/compiler/lib/src/main/scala/syntax/Token.scala b/compiler/lib/src/main/scala/syntax/Token.scala index f126f5c36..fd735b5eb 100644 --- a/compiler/lib/src/main/scala/syntax/Token.scala +++ b/compiler/lib/src/main/scala/syntax/Token.scala @@ -41,6 +41,7 @@ object Token { final case class GUARDED() extends Token final case class HEALTH() extends Token final case class HIGH() extends Token + final case class HOOK() extends Token final case class I16() extends Token final case class I32() extends Token final case class I64() extends Token From f663a452dfcb281f2693b2824590bd00d00c4bfb Mon Sep 17 00:00:00 2001 From: M Starch Date: Thu, 8 Aug 2024 08:41:20 -0700 Subject: [PATCH 03/11] Adding 'hook' overflow option to ast --- compiler/lib/src/main/scala/ast/Ast.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/lib/src/main/scala/ast/Ast.scala b/compiler/lib/src/main/scala/ast/Ast.scala index 9a191d760..26768d018 100644 --- a/compiler/lib/src/main/scala/ast/Ast.scala +++ b/compiler/lib/src/main/scala/ast/Ast.scala @@ -299,6 +299,9 @@ object Ast { case object Drop extends QueueFull { override def toString = "drop" } + case object Hook extends QueueFull { + override def toString = "hook" + } } /** Command specifier */ From 6c7d9b4dcbadec93c6484559cbb84c0e1ba5b1b5 Mon Sep 17 00:00:00 2001 From: M Starch Date: Thu, 8 Aug 2024 08:56:27 -0700 Subject: [PATCH 04/11] Adding 'hook' overflow test --- .../fpp-to-cpp/test/component/active.fpp | 10 + .../base/ActiveOverflowComponentAc.ref.cpp | 2615 ++++++++++++++++ .../base/ActiveOverflowComponentAc.ref.hpp | 1040 +++++++ .../base/QueuedOverflowComponentAc.ref.cpp | 2620 +++++++++++++++++ .../base/QueuedOverflowComponentAc.ref.hpp | 1040 +++++++ .../fpp-to-cpp/test/component/base/run.sh | 2 + .../test/component/base/update-ref.sh | 2 + .../component/include/overflow_commands.fppi | 7 + .../include/overflow_internal_ports.fppi | 6 + .../include/overflow_product_ports.fppi | 5 + .../include/overflow_serial_ports.fppi | 2 + .../include/overflow_typed_ports.fppi | 11 + .../fpp-to-cpp/test/component/queued.fpp | 10 + 13 files changed, 7370 insertions(+) create mode 100644 compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.cpp create mode 100644 compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.hpp create mode 100644 compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.cpp create mode 100644 compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.hpp create mode 100644 compiler/tools/fpp-to-cpp/test/component/include/overflow_commands.fppi create mode 100644 compiler/tools/fpp-to-cpp/test/component/include/overflow_internal_ports.fppi create mode 100644 compiler/tools/fpp-to-cpp/test/component/include/overflow_product_ports.fppi create mode 100644 compiler/tools/fpp-to-cpp/test/component/include/overflow_serial_ports.fppi create mode 100644 compiler/tools/fpp-to-cpp/test/component/include/overflow_typed_ports.fppi diff --git a/compiler/tools/fpp-to-cpp/test/component/active.fpp b/compiler/tools/fpp-to-cpp/test/component/active.fpp index 9fa8185b5..0c9580244 100644 --- a/compiler/tools/fpp-to-cpp/test/component/active.fpp +++ b/compiler/tools/fpp-to-cpp/test/component/active.fpp @@ -20,6 +20,16 @@ module M { } +@ An active component with overflow behavior +active component ActiveOverflow { + include "include/special_ports.fppi" + include "include/overflow_commands.fppi" + include "include/overflow_typed_ports.fppi" + include "include/overflow_product_ports.fppi" + include "include/overflow_serial_ports.fppi" + include "include/overflow_internal_ports.fppi" +} + @ An active component with serial ports active component ActiveSerial { diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.cpp new file mode 100644 index 000000000..5f31eb41c --- /dev/null +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.cpp @@ -0,0 +1,2615 @@ +// ====================================================================== +// \title ActiveOverflowComponentAc.cpp +// \author Generated by fpp-to-cpp +// \brief cpp file for ActiveOverflow component base class +// ====================================================================== + +#include "Fw/Types/Assert.hpp" +#include "Fw/Types/ExternalString.hpp" +#if FW_ENABLE_TEXT_LOGGING +#include "Fw/Types/String.hpp" +#endif +#include "base/ActiveOverflowComponentAc.hpp" + +namespace { + enum MsgTypeEnum { + ACTIVEOVERFLOW_COMPONENT_EXIT = Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT, + PRODUCTRECVINHOOK_DPRESPONSE, + ASSERTASYNC_TYPED, + BLOCKASYNC_TYPED, + DROPASYNC_TYPED, + HOOKASYNC_TYPED, + SERIALASYNCHOOK_SERIAL, + CMD_CMD_HOOK, + CMD_CMD_PARAMS_PRIORITY_HOOK, + INT_IF_INTERNALHOOKDROP, + }; + + // Get the max size by constructing a union of the async input, command, and + // internal port serialization sizes + union BuffUnion { + BYTE productRecvInHookPortSize[Fw::InputDpResponsePort::SERIALIZED_SIZE]; + BYTE assertAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; + BYTE blockAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; + BYTE dropAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; + BYTE hookAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; + BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE]; + }; + + // Define a message buffer class large enough to handle all the + // asynchronous inputs to the component + class ComponentIpcSerializableBuffer : + public Fw::SerializeBufferBase + { + + public: + + enum { + // Max. message size = size of data + message id + port + SERIALIZATION_SIZE = + sizeof(BuffUnion) + + sizeof(FwEnumStoreType) + + sizeof(FwIndexType) + }; + + Fw::Serializable::SizeType getBuffCapacity() const { + return sizeof(m_buff); + } + + U8* getBuffAddr() { + return m_buff; + } + + const U8* getBuffAddr() const { + return m_buff; + } + + private: + // Should be the max of all the input ports serialized sizes... + U8 m_buff[SERIALIZATION_SIZE]; + + }; +} + +// ---------------------------------------------------------------------- +// Component initialization +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + init( + FwQueueSizeType queueDepth, + FwSizeType msgSize, + FwEnumStoreType instance + ) +{ + // Initialize base class + Fw::ActiveComponentBase::init(instance); + + // Connect input port cmdIn + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_cmdIn_InputPorts()); + port++ + ) { + this->m_cmdIn_InputPort[port].init(); + this->m_cmdIn_InputPort[port].addCallComp( + this, + m_p_cmdIn_in + ); + this->m_cmdIn_InputPort[port].setPortNum(port); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_cmdIn_InputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_cmdIn_InputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect input port productRecvInHook + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_productRecvInHook_InputPorts()); + port++ + ) { + this->m_productRecvInHook_InputPort[port].init(); + this->m_productRecvInHook_InputPort[port].addCallComp( + this, + m_p_productRecvInHook_in + ); + this->m_productRecvInHook_InputPort[port].setPortNum(port); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_productRecvInHook_InputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_productRecvInHook_InputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect input port assertAsync + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_assertAsync_InputPorts()); + port++ + ) { + this->m_assertAsync_InputPort[port].init(); + this->m_assertAsync_InputPort[port].addCallComp( + this, + m_p_assertAsync_in + ); + this->m_assertAsync_InputPort[port].setPortNum(port); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_assertAsync_InputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_assertAsync_InputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect input port blockAsync + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_blockAsync_InputPorts()); + port++ + ) { + this->m_blockAsync_InputPort[port].init(); + this->m_blockAsync_InputPort[port].addCallComp( + this, + m_p_blockAsync_in + ); + this->m_blockAsync_InputPort[port].setPortNum(port); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_blockAsync_InputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_blockAsync_InputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect input port dropAsync + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_dropAsync_InputPorts()); + port++ + ) { + this->m_dropAsync_InputPort[port].init(); + this->m_dropAsync_InputPort[port].addCallComp( + this, + m_p_dropAsync_in + ); + this->m_dropAsync_InputPort[port].setPortNum(port); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_dropAsync_InputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_dropAsync_InputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect input port hookAsync + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_hookAsync_InputPorts()); + port++ + ) { + this->m_hookAsync_InputPort[port].init(); + this->m_hookAsync_InputPort[port].addCallComp( + this, + m_p_hookAsync_in + ); + this->m_hookAsync_InputPort[port].setPortNum(port); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_hookAsync_InputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_hookAsync_InputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect input port serialAsyncHook + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_serialAsyncHook_InputPorts()); + port++ + ) { + this->m_serialAsyncHook_InputPort[port].init(); + this->m_serialAsyncHook_InputPort[port].addCallComp( + this, + m_p_serialAsyncHook_in + ); + this->m_serialAsyncHook_InputPort[port].setPortNum(port); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_serialAsyncHook_InputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_serialAsyncHook_InputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect output port cmdRegOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_cmdRegOut_OutputPorts()); + port++ + ) { + this->m_cmdRegOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_cmdRegOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_cmdRegOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect output port cmdResponseOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_cmdResponseOut_OutputPorts()); + port++ + ) { + this->m_cmdResponseOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_cmdResponseOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_cmdResponseOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect output port eventOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_eventOut_OutputPorts()); + port++ + ) { + this->m_eventOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_eventOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_eventOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect output port prmGetOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_prmGetOut_OutputPorts()); + port++ + ) { + this->m_prmGetOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_prmGetOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_prmGetOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect output port prmSetOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_prmSetOut_OutputPorts()); + port++ + ) { + this->m_prmSetOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_prmSetOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_prmSetOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } + +#if FW_ENABLE_TEXT_LOGGING == 1 + // Connect output port textEventOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_textEventOut_OutputPorts()); + port++ + ) { + this->m_textEventOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_textEventOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_textEventOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } +#endif + + // Connect output port timeGetOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_timeGetOut_OutputPorts()); + port++ + ) { + this->m_timeGetOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_timeGetOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_timeGetOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect output port tlmOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_tlmOut_OutputPorts()); + port++ + ) { + this->m_tlmOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_tlmOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_tlmOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } + + // Passed-in size added to port number and message type enumeration sizes. + this->m_msgSize = FW_MAX( + msgSize + + static_cast(sizeof(FwIndexType)) + + static_cast(sizeof(FwEnumStoreType)), + static_cast(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE) + ); + + Os::Queue::QueueStatus qStat = this->createQueue(queueDepth, this->m_msgSize); + FW_ASSERT( + Os::Queue::QUEUE_OK == qStat, + static_cast(qStat) + ); +} + +// ---------------------------------------------------------------------- +// Getters for special input ports +// ---------------------------------------------------------------------- + +Fw::InputCmdPort* ActiveOverflowComponentBase :: + get_cmdIn_InputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_cmdIn_InputPorts(), + static_cast(portNum) + ); + + return &this->m_cmdIn_InputPort[portNum]; +} + +Fw::InputDpResponsePort* ActiveOverflowComponentBase :: + get_productRecvInHook_InputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_productRecvInHook_InputPorts(), + static_cast(portNum) + ); + + return &this->m_productRecvInHook_InputPort[portNum]; +} + +// ---------------------------------------------------------------------- +// Getters for typed input ports +// ---------------------------------------------------------------------- + +Ports::InputTypedPort* ActiveOverflowComponentBase :: + get_assertAsync_InputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_assertAsync_InputPorts(), + static_cast(portNum) + ); + + return &this->m_assertAsync_InputPort[portNum]; +} + +Ports::InputTypedPort* ActiveOverflowComponentBase :: + get_blockAsync_InputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_blockAsync_InputPorts(), + static_cast(portNum) + ); + + return &this->m_blockAsync_InputPort[portNum]; +} + +Ports::InputTypedPort* ActiveOverflowComponentBase :: + get_dropAsync_InputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_dropAsync_InputPorts(), + static_cast(portNum) + ); + + return &this->m_dropAsync_InputPort[portNum]; +} + +Ports::InputTypedPort* ActiveOverflowComponentBase :: + get_hookAsync_InputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_hookAsync_InputPorts(), + static_cast(portNum) + ); + + return &this->m_hookAsync_InputPort[portNum]; +} + +// ---------------------------------------------------------------------- +// Getters for serial input ports +// ---------------------------------------------------------------------- + +Fw::InputSerializePort* ActiveOverflowComponentBase :: + get_serialAsyncHook_InputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_serialAsyncHook_InputPorts(), + static_cast(portNum) + ); + + return &this->m_serialAsyncHook_InputPort[portNum]; +} + +// ---------------------------------------------------------------------- +// Connect input ports to special output ports +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + set_cmdRegOut_OutputPort( + FwIndexType portNum, + Fw::InputCmdRegPort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_cmdRegOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_cmdRegOut_OutputPort[portNum].addCallPort(port); +} + +void ActiveOverflowComponentBase :: + set_cmdResponseOut_OutputPort( + FwIndexType portNum, + Fw::InputCmdResponsePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_cmdResponseOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port); +} + +void ActiveOverflowComponentBase :: + set_eventOut_OutputPort( + FwIndexType portNum, + Fw::InputLogPort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_eventOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_eventOut_OutputPort[portNum].addCallPort(port); +} + +void ActiveOverflowComponentBase :: + set_prmGetOut_OutputPort( + FwIndexType portNum, + Fw::InputPrmGetPort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_prmGetOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_prmGetOut_OutputPort[portNum].addCallPort(port); +} + +void ActiveOverflowComponentBase :: + set_prmSetOut_OutputPort( + FwIndexType portNum, + Fw::InputPrmSetPort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_prmSetOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_prmSetOut_OutputPort[portNum].addCallPort(port); +} + +#if FW_ENABLE_TEXT_LOGGING == 1 + +void ActiveOverflowComponentBase :: + set_textEventOut_OutputPort( + FwIndexType portNum, + Fw::InputLogTextPort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_textEventOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_textEventOut_OutputPort[portNum].addCallPort(port); +} + +#endif + +void ActiveOverflowComponentBase :: + set_timeGetOut_OutputPort( + FwIndexType portNum, + Fw::InputTimePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_timeGetOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_timeGetOut_OutputPort[portNum].addCallPort(port); +} + +void ActiveOverflowComponentBase :: + set_tlmOut_OutputPort( + FwIndexType portNum, + Fw::InputTlmPort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_tlmOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_tlmOut_OutputPort[portNum].addCallPort(port); +} + +#if FW_PORT_SERIALIZATION + +// ---------------------------------------------------------------------- +// Connect serial input ports to special output ports +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + set_cmdRegOut_OutputPort( + FwIndexType portNum, + Fw::InputSerializePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_cmdRegOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port); +} + +void ActiveOverflowComponentBase :: + set_cmdResponseOut_OutputPort( + FwIndexType portNum, + Fw::InputSerializePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_cmdResponseOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port); +} + +void ActiveOverflowComponentBase :: + set_eventOut_OutputPort( + FwIndexType portNum, + Fw::InputSerializePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_eventOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_eventOut_OutputPort[portNum].registerSerialPort(port); +} + +void ActiveOverflowComponentBase :: + set_prmSetOut_OutputPort( + FwIndexType portNum, + Fw::InputSerializePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_prmSetOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_prmSetOut_OutputPort[portNum].registerSerialPort(port); +} + +#if FW_ENABLE_TEXT_LOGGING == 1 + +void ActiveOverflowComponentBase :: + set_textEventOut_OutputPort( + FwIndexType portNum, + Fw::InputSerializePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_textEventOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_textEventOut_OutputPort[portNum].registerSerialPort(port); +} + +#endif + +void ActiveOverflowComponentBase :: + set_timeGetOut_OutputPort( + FwIndexType portNum, + Fw::InputSerializePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_timeGetOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_timeGetOut_OutputPort[portNum].registerSerialPort(port); +} + +void ActiveOverflowComponentBase :: + set_tlmOut_OutputPort( + FwIndexType portNum, + Fw::InputSerializePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_tlmOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_tlmOut_OutputPort[portNum].registerSerialPort(port); +} + +#endif + +// ---------------------------------------------------------------------- +// Command registration +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + regCommands() +{ + FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected()); + + this->m_cmdRegOut_OutputPort[0].invoke( + this->getIdBase() + OPCODE_CMD_HOOK + ); + + this->m_cmdRegOut_OutputPort[0].invoke( + this->getIdBase() + OPCODE_CMD_PARAMS_PRIORITY_HOOK + ); +} + +// ---------------------------------------------------------------------- +// Component construction and destruction +// ---------------------------------------------------------------------- + +ActiveOverflowComponentBase :: + ActiveOverflowComponentBase(const char* compName) : + Fw::ActiveComponentBase(compName) +{ + +} + +ActiveOverflowComponentBase :: + ~ActiveOverflowComponentBase() +{ + +} + +// ---------------------------------------------------------------------- +// Getters for numbers of special input ports +// ---------------------------------------------------------------------- + +FwIndexType ActiveOverflowComponentBase :: + getNum_cmdIn_InputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_cmdIn_InputPort)); +} + +FwIndexType ActiveOverflowComponentBase :: + getNum_productRecvInHook_InputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_productRecvInHook_InputPort)); +} + +// ---------------------------------------------------------------------- +// Getters for numbers of typed input ports +// ---------------------------------------------------------------------- + +FwIndexType ActiveOverflowComponentBase :: + getNum_assertAsync_InputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_assertAsync_InputPort)); +} + +FwIndexType ActiveOverflowComponentBase :: + getNum_blockAsync_InputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_blockAsync_InputPort)); +} + +FwIndexType ActiveOverflowComponentBase :: + getNum_dropAsync_InputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_dropAsync_InputPort)); +} + +FwIndexType ActiveOverflowComponentBase :: + getNum_hookAsync_InputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_hookAsync_InputPort)); +} + +// ---------------------------------------------------------------------- +// Getters for numbers of serial input ports +// ---------------------------------------------------------------------- + +FwIndexType ActiveOverflowComponentBase :: + getNum_serialAsyncHook_InputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_serialAsyncHook_InputPort)); +} + +// ---------------------------------------------------------------------- +// Getters for numbers of special output ports +// ---------------------------------------------------------------------- + +FwIndexType ActiveOverflowComponentBase :: + getNum_cmdRegOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_cmdRegOut_OutputPort)); +} + +FwIndexType ActiveOverflowComponentBase :: + getNum_cmdResponseOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_cmdResponseOut_OutputPort)); +} + +FwIndexType ActiveOverflowComponentBase :: + getNum_eventOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_eventOut_OutputPort)); +} + +FwIndexType ActiveOverflowComponentBase :: + getNum_prmGetOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_prmGetOut_OutputPort)); +} + +FwIndexType ActiveOverflowComponentBase :: + getNum_prmSetOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_prmSetOut_OutputPort)); +} + +#if FW_ENABLE_TEXT_LOGGING == 1 + +FwIndexType ActiveOverflowComponentBase :: + getNum_textEventOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_textEventOut_OutputPort)); +} + +#endif + +FwIndexType ActiveOverflowComponentBase :: + getNum_timeGetOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_timeGetOut_OutputPort)); +} + +FwIndexType ActiveOverflowComponentBase :: + getNum_tlmOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_tlmOut_OutputPort)); +} + +// ---------------------------------------------------------------------- +// Connection status queries for special output ports +// ---------------------------------------------------------------------- + +bool ActiveOverflowComponentBase :: + isConnected_cmdRegOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_cmdRegOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_cmdRegOut_OutputPort[portNum].isConnected(); +} + +bool ActiveOverflowComponentBase :: + isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_cmdResponseOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_cmdResponseOut_OutputPort[portNum].isConnected(); +} + +bool ActiveOverflowComponentBase :: + isConnected_eventOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_eventOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_eventOut_OutputPort[portNum].isConnected(); +} + +bool ActiveOverflowComponentBase :: + isConnected_prmGetOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_prmGetOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_prmGetOut_OutputPort[portNum].isConnected(); +} + +bool ActiveOverflowComponentBase :: + isConnected_prmSetOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_prmSetOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_prmSetOut_OutputPort[portNum].isConnected(); +} + +#if FW_ENABLE_TEXT_LOGGING == 1 + +bool ActiveOverflowComponentBase :: + isConnected_textEventOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_textEventOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_textEventOut_OutputPort[portNum].isConnected(); +} + +#endif + +bool ActiveOverflowComponentBase :: + isConnected_timeGetOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_timeGetOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_timeGetOut_OutputPort[portNum].isConnected(); +} + +bool ActiveOverflowComponentBase :: + isConnected_tlmOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_tlmOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_tlmOut_OutputPort[portNum].isConnected(); +} + +// ---------------------------------------------------------------------- +// Port handler base-class functions for special input ports +// +// Call these functions directly to bypass the corresponding ports +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + productRecvInHook_handlerBase( + FwIndexType portNum, + FwDpIdType id, + const Fw::Buffer& buffer, + const Fw::Success& status + ) +{ + // Make sure port number is valid + FW_ASSERT( + portNum < this->getNum_productRecvInHook_InputPorts(), + static_cast(portNum) + ); + + // Call pre-message hook + productRecvInHook_preMsgHook( + portNum, + id, + buffer, + status + ); + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize message ID + _status = msg.serialize( + static_cast(PRODUCTRECVINHOOK_DPRESPONSE) + ); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize port number + _status = msg.serialize(portNum); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument id + _status = msg.serialize(id); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument buffer + _status = msg.serialize(buffer); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument status + _status = msg.serialize(status); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +// ---------------------------------------------------------------------- +// Port handler base-class functions for typed input ports +// +// Call these functions directly to bypass the corresponding ports +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + assertAsync_handlerBase( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Make sure port number is valid + FW_ASSERT( + portNum < this->getNum_assertAsync_InputPorts(), + static_cast(portNum) + ); + + // Call pre-message hook + assertAsync_preMsgHook( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize message ID + _status = msg.serialize( + static_cast(ASSERTASYNC_TYPED) + ); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize port number + _status = msg.serialize(portNum); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument u32 + _status = msg.serialize(u32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument f32 + _status = msg.serialize(f32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument b + _status = msg.serialize(b); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument str1 + _status = str1.serialize(msg, 80); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument e + _status = msg.serialize(e); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument a + _status = msg.serialize(a); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument s + _status = msg.serialize(s); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +void ActiveOverflowComponentBase :: + blockAsync_handlerBase( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Make sure port number is valid + FW_ASSERT( + portNum < this->getNum_blockAsync_InputPorts(), + static_cast(portNum) + ); + + // Call pre-message hook + blockAsync_preMsgHook( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize message ID + _status = msg.serialize( + static_cast(BLOCKASYNC_TYPED) + ); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize port number + _status = msg.serialize(portNum); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument u32 + _status = msg.serialize(u32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument f32 + _status = msg.serialize(f32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument b + _status = msg.serialize(b); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument str1 + _status = str1.serialize(msg, 80); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument e + _status = msg.serialize(e); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument a + _status = msg.serialize(a); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument s + _status = msg.serialize(s); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_BLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +void ActiveOverflowComponentBase :: + dropAsync_handlerBase( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Make sure port number is valid + FW_ASSERT( + portNum < this->getNum_dropAsync_InputPorts(), + static_cast(portNum) + ); + + // Call pre-message hook + dropAsync_preMsgHook( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize message ID + _status = msg.serialize( + static_cast(DROPASYNC_TYPED) + ); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize port number + _status = msg.serialize(portNum); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument u32 + _status = msg.serialize(u32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument f32 + _status = msg.serialize(f32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument b + _status = msg.serialize(b); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument str1 + _status = str1.serialize(msg, 80); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument e + _status = msg.serialize(e); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument a + _status = msg.serialize(a); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument s + _status = msg.serialize(s); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + + if (qStatus == Os::Queue::QUEUE_FULL) { + this->incNumMsgDropped(); + return; + } + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +void ActiveOverflowComponentBase :: + hookAsync_handlerBase( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Make sure port number is valid + FW_ASSERT( + portNum < this->getNum_hookAsync_InputPorts(), + static_cast(portNum) + ); + + // Call pre-message hook + hookAsync_preMsgHook( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize message ID + _status = msg.serialize( + static_cast(HOOKASYNC_TYPED) + ); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize port number + _status = msg.serialize(portNum); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument u32 + _status = msg.serialize(u32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument f32 + _status = msg.serialize(f32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument b + _status = msg.serialize(b); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument str1 + _status = str1.serialize(msg, 80); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument e + _status = msg.serialize(e); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument a + _status = msg.serialize(a); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument s + _status = msg.serialize(s); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +// ---------------------------------------------------------------------- +// Port handler base-class functions for serial input ports +// +// Call these functions directly to bypass the corresponding ports +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + serialAsyncHook_handlerBase( + FwIndexType portNum, + Fw::SerializeBufferBase& buffer + ) +{ + // Make sure port number is valid + FW_ASSERT( + portNum < this->getNum_serialAsyncHook_InputPorts(), + static_cast(portNum) + ); + + // Declare buffer for serialAsyncHook + U8 msgBuff[this->m_msgSize]; + Fw::ExternalSerializeBuffer msgSerBuff(msgBuff, this->m_msgSize); + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize message ID + _status = msgSerBuff.serialize( + static_cast(SERIALASYNCHOOK_SERIAL) + ); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize port number + _status = msgSerBuff.serialize(portNum); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument buffer + _status = msgSerBuff.serialize(buffer); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msgSerBuff, 0, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +// ---------------------------------------------------------------------- +// Pre-message hooks for special async input ports +// +// Each of these functions is invoked just before processing a message +// on the corresponding port. By default, they do nothing. You can +// override them to provide specific pre-message behavior. +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + productRecvInHook_preMsgHook( + FwIndexType portNum, + FwDpIdType id, + const Fw::Buffer& buffer, + const Fw::Success& status + ) +{ + // Default: no-op +} + +// ---------------------------------------------------------------------- +// Pre-message hooks for typed async input ports +// +// Each of these functions is invoked just before processing a message +// on the corresponding port. By default, they do nothing. You can +// override them to provide specific pre-message behavior. +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + assertAsync_preMsgHook( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Default: no-op +} + +void ActiveOverflowComponentBase :: + blockAsync_preMsgHook( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Default: no-op +} + +void ActiveOverflowComponentBase :: + dropAsync_preMsgHook( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Default: no-op +} + +void ActiveOverflowComponentBase :: + hookAsync_preMsgHook( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Default: no-op +} + +// ---------------------------------------------------------------------- +// Pre-message hooks for serial async input ports +// +// Each of these functions is invoked just before processing a message +// on the corresponding port. By default, they do nothing. You can +// override them to provide specific pre-message behavior. +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + serialAsyncHook_preMsgHook( + FwIndexType portNum, + Fw::SerializeBufferBase& buffer + ) +{ + // Default: no-op +} + +// ---------------------------------------------------------------------- +// Internal interface base-class functions +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + internalHookDrop_internalInterfaceInvoke() +{ + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize the message ID + _status = msg.serialize(static_cast(INT_IF_INTERNALHOOKDROP)); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + 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) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +// ---------------------------------------------------------------------- +// Command response +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + cmdResponse_out( + FwOpcodeType opCode, + U32 cmdSeq, + Fw::CmdResponse response + ) +{ + FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected()); + this->m_cmdResponseOut_OutputPort[0].invoke(opCode, cmdSeq, response); +} + +// ---------------------------------------------------------------------- +// Command handler base-class functions +// +// Call these functions directly to bypass the command input port +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + CMD_HOOK_cmdHandlerBase( + FwOpcodeType opCode, + U32 cmdSeq, + Fw::CmdArgBuffer& args + ) +{ + // Call pre-message hook + this->CMD_HOOK_preMsgHook(opCode,cmdSeq); + + // Defer deserializing arguments to the message dispatcher + // to avoid deserializing and reserializing just for IPC + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize for IPC + _status = msg.serialize(static_cast(CMD_CMD_HOOK)); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Fake port number to make message dequeue work + FwIndexType port = 0; + + _status = msg.serialize(port); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + _status = msg.serialize(opCode); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + _status = msg.serialize(cmdSeq); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + _status = msg.serialize(args); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +void ActiveOverflowComponentBase :: + CMD_PARAMS_PRIORITY_HOOK_cmdHandlerBase( + FwOpcodeType opCode, + U32 cmdSeq, + Fw::CmdArgBuffer& args + ) +{ + // Call pre-message hook + this->CMD_PARAMS_PRIORITY_HOOK_preMsgHook(opCode,cmdSeq); + + // Defer deserializing arguments to the message dispatcher + // to avoid deserializing and reserializing just for IPC + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize for IPC + _status = msg.serialize(static_cast(CMD_CMD_PARAMS_PRIORITY_HOOK)); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Fake port number to make message dequeue work + FwIndexType port = 0; + + _status = msg.serialize(port); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + _status = msg.serialize(opCode); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + _status = msg.serialize(cmdSeq); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + _status = msg.serialize(args); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 30, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +// ---------------------------------------------------------------------- +// Pre-message hooks for async commands +// +// Each of these functions is invoked just before processing the +// corresponding command. By default they do nothing. You can +// override them to provide specific pre-command behavior. +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + CMD_HOOK_preMsgHook( + FwOpcodeType opCode, + U32 cmdSeq + ) +{ + // Defaults to no-op; can be overridden + (void) opCode; + (void) cmdSeq; +} + +void ActiveOverflowComponentBase :: + CMD_PARAMS_PRIORITY_HOOK_preMsgHook( + FwOpcodeType opCode, + U32 cmdSeq + ) +{ + // Defaults to no-op; can be overridden + (void) opCode; + (void) cmdSeq; +} + +// ---------------------------------------------------------------------- +// Time +// ---------------------------------------------------------------------- + +Fw::Time ActiveOverflowComponentBase :: + getTime() +{ + if (this->m_timeGetOut_OutputPort[0].isConnected()) { + Fw::Time _time; + this->m_timeGetOut_OutputPort[0].invoke(_time); + return _time; + } + else { + return Fw::Time(TB_NONE, 0, 0); + } +} + +// ---------------------------------------------------------------------- +// Message dispatch functions +// ---------------------------------------------------------------------- + +Fw::QueuedComponentBase::MsgDispatchStatus ActiveOverflowComponentBase :: + doDispatch() +{ + U8 msgBuff[this->m_msgSize]; + Fw::ExternalSerializeBuffer msg(msgBuff,this->m_msgSize); + FwQueuePriorityType priority = 0; + + Os::Queue::QueueStatus msgStatus = this->m_queue.receive( + msg, + priority, + Os::Queue::QUEUE_BLOCKING + ); + FW_ASSERT( + msgStatus == Os::Queue::QUEUE_OK, + static_cast(msgStatus) + ); + + // Reset to beginning of buffer + msg.resetDeser(); + + FwEnumStoreType desMsg = 0; + Fw::SerializeStatus deserStatus = msg.deserialize(desMsg); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + MsgTypeEnum msgType = static_cast(desMsg); + + if (msgType == ACTIVEOVERFLOW_COMPONENT_EXIT) { + return MSG_DISPATCH_EXIT; + } + + FwIndexType portNum = 0; + deserStatus = msg.deserialize(portNum); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + switch (msgType) { + // Handle async input port productRecvInHook + case PRODUCTRECVINHOOK_DPRESPONSE: { + // Deserialize argument id + FwDpIdType id; + deserStatus = msg.deserialize(id); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument buffer + Fw::Buffer buffer; + deserStatus = msg.deserialize(buffer); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument status + Fw::Success status; + deserStatus = msg.deserialize(status); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + // Call handler function + this->productRecvInHook_handler( + portNum, + id, + buffer, + status + ); + + break; + } + + // Handle async input port assertAsync + case ASSERTASYNC_TYPED: { + // Deserialize argument u32 + U32 u32; + deserStatus = msg.deserialize(u32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument f32 + F32 f32; + deserStatus = msg.deserialize(f32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument b + bool b; + deserStatus = msg.deserialize(b); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument str1 + char __fprime_ac_str1_buffer[Fw::StringBase::BUFFER_SIZE(80)]; + Fw::ExternalString str1(__fprime_ac_str1_buffer, sizeof __fprime_ac_str1_buffer); + deserStatus = msg.deserialize(str1); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument e + E e; + deserStatus = msg.deserialize(e); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument a + A a; + deserStatus = msg.deserialize(a); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument s + S s; + deserStatus = msg.deserialize(s); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + // Call handler function + this->assertAsync_handler( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + + break; + } + + // Handle async input port blockAsync + case BLOCKASYNC_TYPED: { + // Deserialize argument u32 + U32 u32; + deserStatus = msg.deserialize(u32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument f32 + F32 f32; + deserStatus = msg.deserialize(f32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument b + bool b; + deserStatus = msg.deserialize(b); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument str1 + char __fprime_ac_str1_buffer[Fw::StringBase::BUFFER_SIZE(80)]; + Fw::ExternalString str1(__fprime_ac_str1_buffer, sizeof __fprime_ac_str1_buffer); + deserStatus = msg.deserialize(str1); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument e + E e; + deserStatus = msg.deserialize(e); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument a + A a; + deserStatus = msg.deserialize(a); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument s + S s; + deserStatus = msg.deserialize(s); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + // Call handler function + this->blockAsync_handler( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + + break; + } + + // Handle async input port dropAsync + case DROPASYNC_TYPED: { + // Deserialize argument u32 + U32 u32; + deserStatus = msg.deserialize(u32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument f32 + F32 f32; + deserStatus = msg.deserialize(f32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument b + bool b; + deserStatus = msg.deserialize(b); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument str1 + char __fprime_ac_str1_buffer[Fw::StringBase::BUFFER_SIZE(80)]; + Fw::ExternalString str1(__fprime_ac_str1_buffer, sizeof __fprime_ac_str1_buffer); + deserStatus = msg.deserialize(str1); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument e + E e; + deserStatus = msg.deserialize(e); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument a + A a; + deserStatus = msg.deserialize(a); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument s + S s; + deserStatus = msg.deserialize(s); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + // Call handler function + this->dropAsync_handler( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + + break; + } + + // Handle async input port hookAsync + case HOOKASYNC_TYPED: { + // Deserialize argument u32 + U32 u32; + deserStatus = msg.deserialize(u32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument f32 + F32 f32; + deserStatus = msg.deserialize(f32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument b + bool b; + deserStatus = msg.deserialize(b); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument str1 + char __fprime_ac_str1_buffer[Fw::StringBase::BUFFER_SIZE(80)]; + Fw::ExternalString str1(__fprime_ac_str1_buffer, sizeof __fprime_ac_str1_buffer); + deserStatus = msg.deserialize(str1); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument e + E e; + deserStatus = msg.deserialize(e); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument a + A a; + deserStatus = msg.deserialize(a); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument s + S s; + deserStatus = msg.deserialize(s); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + // Call handler function + this->hookAsync_handler( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + + break; + } + + // Handle async input port serialAsyncHook + case SERIALASYNCHOOK_SERIAL: { + // Deserialize serialized buffer into new buffer + U8 handBuff[this->m_msgSize]; + Fw::ExternalSerializeBuffer serHandBuff(handBuff,this->m_msgSize); + deserStatus = msg.deserialize(serHandBuff); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + this->serialAsyncHook_handler(portNum, serHandBuff); + + break; + } + + // Handle command CMD_HOOK + case CMD_CMD_HOOK: { + // Deserialize opcode + FwOpcodeType opCode = 0; + deserStatus = msg.deserialize(opCode); + FW_ASSERT ( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize command sequence + U32 cmdSeq = 0; + deserStatus = msg.deserialize(cmdSeq); + FW_ASSERT ( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize command argument buffer + Fw::CmdArgBuffer args; + deserStatus = msg.deserialize(args); + FW_ASSERT ( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Reset buffer + args.resetDeser(); + + // Make sure there was no data left over. + // That means the argument buffer size was incorrect. +#if FW_CMD_CHECK_RESIDUAL + if (args.getBuffLeft() != 0) { + if (this->m_cmdResponseOut_OutputPort[0].isConnected()) { + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::FORMAT_ERROR); + } + // Don't crash the task if bad arguments were passed from the ground + break; + } +#endif + + // Call handler function + this->CMD_HOOK_cmdHandler(opCode, cmdSeq); + + break; + } + + // Handle command CMD_PARAMS_PRIORITY_HOOK + case CMD_CMD_PARAMS_PRIORITY_HOOK: { + // Deserialize opcode + FwOpcodeType opCode = 0; + deserStatus = msg.deserialize(opCode); + FW_ASSERT ( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize command sequence + U32 cmdSeq = 0; + deserStatus = msg.deserialize(cmdSeq); + FW_ASSERT ( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize command argument buffer + Fw::CmdArgBuffer args; + deserStatus = msg.deserialize(args); + FW_ASSERT ( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Reset buffer + args.resetDeser(); + + // Deserialize argument u32 + U32 u32; + deserStatus = args.deserialize(u32); + if (deserStatus != Fw::FW_SERIALIZE_OK) { + if (this->m_cmdResponseOut_OutputPort[0].isConnected()) { + this->cmdResponse_out( + opCode, + cmdSeq, + Fw::CmdResponse::FORMAT_ERROR + ); + } + // Don't crash the task if bad arguments were passed from the ground + break; + } + + // Make sure there was no data left over. + // That means the argument buffer size was incorrect. +#if FW_CMD_CHECK_RESIDUAL + if (args.getBuffLeft() != 0) { + if (this->m_cmdResponseOut_OutputPort[0].isConnected()) { + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::FORMAT_ERROR); + } + // Don't crash the task if bad arguments were passed from the ground + break; + } +#endif + + // Call handler function + this->CMD_PARAMS_PRIORITY_HOOK_cmdHandler( + opCode, cmdSeq, + u32 + ); + + break; + } + + // Handle internal interface internalHookDrop + case INT_IF_INTERNALHOOKDROP: { + // Make sure there was no data left over. + // That means the buffer size was incorrect. + FW_ASSERT( + msg.getBuffLeft() == 0, + static_cast(msg.getBuffLeft()) + ); + + // Call handler function + this->internalHookDrop_internalInterfaceHandler(); + + break; + } + + default: + return MSG_DISPATCH_ERROR; + } + + return MSG_DISPATCH_OK; +} + +// ---------------------------------------------------------------------- +// Calls for messages received on special input ports +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + m_p_cmdIn_in( + Fw::PassiveComponentBase* callComp, + FwIndexType portNum, + FwOpcodeType opCode, + U32 cmdSeq, + Fw::CmdArgBuffer& args + ) +{ + FW_ASSERT(callComp); + ActiveOverflowComponentBase* compPtr = static_cast(callComp); + + const U32 idBase = callComp->getIdBase(); + FW_ASSERT(opCode >= idBase, static_cast(opCode), static_cast(idBase)); + + // Select base class function based on opcode + switch (opCode - idBase) { + case OPCODE_CMD_HOOK: { + compPtr->CMD_HOOK_cmdHandlerBase( + opCode, + cmdSeq, + args + ); + break; + } + + case OPCODE_CMD_PARAMS_PRIORITY_HOOK: { + compPtr->CMD_PARAMS_PRIORITY_HOOK_cmdHandlerBase( + opCode, + cmdSeq, + args + ); + break; + } + } +} + +void ActiveOverflowComponentBase :: + m_p_productRecvInHook_in( + Fw::PassiveComponentBase* callComp, + FwIndexType portNum, + FwDpIdType id, + const Fw::Buffer& buffer, + const Fw::Success& status + ) +{ + FW_ASSERT(callComp); + ActiveOverflowComponentBase* compPtr = static_cast(callComp); + compPtr->productRecvInHook_handlerBase( + portNum, + id, + buffer, + status + ); +} + +// ---------------------------------------------------------------------- +// Calls for messages received on typed input ports +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + m_p_assertAsync_in( + Fw::PassiveComponentBase* callComp, + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + FW_ASSERT(callComp); + ActiveOverflowComponentBase* compPtr = static_cast(callComp); + compPtr->assertAsync_handlerBase( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); +} + +void ActiveOverflowComponentBase :: + m_p_blockAsync_in( + Fw::PassiveComponentBase* callComp, + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + FW_ASSERT(callComp); + ActiveOverflowComponentBase* compPtr = static_cast(callComp); + compPtr->blockAsync_handlerBase( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); +} + +void ActiveOverflowComponentBase :: + m_p_dropAsync_in( + Fw::PassiveComponentBase* callComp, + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + FW_ASSERT(callComp); + ActiveOverflowComponentBase* compPtr = static_cast(callComp); + compPtr->dropAsync_handlerBase( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); +} + +void ActiveOverflowComponentBase :: + m_p_hookAsync_in( + Fw::PassiveComponentBase* callComp, + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + FW_ASSERT(callComp); + ActiveOverflowComponentBase* compPtr = static_cast(callComp); + compPtr->hookAsync_handlerBase( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); +} + +// ---------------------------------------------------------------------- +// Calls for messages received on serial input ports +// ---------------------------------------------------------------------- + +#if FW_PORT_SERIALIZATION + +void ActiveOverflowComponentBase :: + m_p_serialAsyncHook_in( + Fw::PassiveComponentBase* callComp, + FwIndexType portNum, + Fw::SerializeBufferBase& buffer + ) +{ + FW_ASSERT(callComp); + ActiveOverflowComponentBase* compPtr = static_cast(callComp); + compPtr->serialAsyncHook_handlerBase( + portNum, + buffer + ); +} + +#endif + +// ---------------------------------------------------------------------- +// Private data product handling functions +// ---------------------------------------------------------------------- + +void ActiveOverflowComponentBase :: + productRecvInHook_handler( + const FwIndexType portNum, + FwDpIdType id, + const Fw::Buffer& buffer, + const Fw::Success& status + ) +{ + (void) portNum; + (void) id; + (void) buffer; + (void) status; + // No data products defined +} diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.hpp new file mode 100644 index 000000000..5b7778395 --- /dev/null +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.hpp @@ -0,0 +1,1040 @@ +// ====================================================================== +// \title ActiveOverflowComponentAc.hpp +// \author Generated by fpp-to-cpp +// \brief hpp file for ActiveOverflow component base class +// ====================================================================== + +#ifndef ActiveOverflowComponentAc_HPP +#define ActiveOverflowComponentAc_HPP + +#include "FpConfig.hpp" +#include "Fw/Cmd/CmdPortAc.hpp" +#include "Fw/Cmd/CmdRegPortAc.hpp" +#include "Fw/Cmd/CmdResponsePortAc.hpp" +#include "Fw/Cmd/CmdString.hpp" +#include "Fw/Comp/ActiveComponentBase.hpp" +#include "Fw/Dp/DpResponsePortAc.hpp" +#include "Fw/Log/LogPortAc.hpp" +#if FW_ENABLE_TEXT_LOGGING == 1 +#include "Fw/Log/LogTextPortAc.hpp" +#endif +#include "Fw/Port/InputSerializePort.hpp" +#include "Fw/Port/OutputSerializePort.hpp" +#include "Fw/Prm/PrmGetPortAc.hpp" +#include "Fw/Prm/PrmSetPortAc.hpp" +#include "Fw/Time/TimePortAc.hpp" +#include "Fw/Tlm/TlmPortAc.hpp" +#include "Fw/Types/InternalInterfaceString.hpp" +#include "TypedPortAc.hpp" + +static_assert( + FW_PORT_SERIALIZATION == 1, + "ActiveOverflow component requires serialization" +); + +//! \class ActiveOverflowComponentBase +//! \brief Auto-generated base for ActiveOverflow component +//! +//! An active component with overflow behavior +class ActiveOverflowComponentBase : + public Fw::ActiveComponentBase +{ + + // ---------------------------------------------------------------------- + // Friend classes + // ---------------------------------------------------------------------- + + //! Friend class for white-box testing + friend class ActiveOverflowComponentBaseFriend; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Constants + // ---------------------------------------------------------------------- + + //! Enumerations for numbers of special input ports + enum { + NUM_CMDIN_INPUT_PORTS = 1, + NUM_PRODUCTRECVINHOOK_INPUT_PORTS = 1, + }; + + //! Enumerations for numbers of typed input ports + enum { + NUM_ASSERTASYNC_INPUT_PORTS = 1, + NUM_BLOCKASYNC_INPUT_PORTS = 1, + NUM_DROPASYNC_INPUT_PORTS = 1, + NUM_HOOKASYNC_INPUT_PORTS = 1, + }; + + //! Enumerations for numbers of serial input ports + enum { + NUM_SERIALASYNCHOOK_INPUT_PORTS = 1, + }; + + //! Enumerations for numbers of special output ports + enum { + NUM_CMDREGOUT_OUTPUT_PORTS = 1, + NUM_CMDRESPONSEOUT_OUTPUT_PORTS = 1, + NUM_EVENTOUT_OUTPUT_PORTS = 1, + NUM_PRMGETOUT_OUTPUT_PORTS = 1, + NUM_PRMSETOUT_OUTPUT_PORTS = 1, + NUM_TEXTEVENTOUT_OUTPUT_PORTS = 1, + NUM_TIMEGETOUT_OUTPUT_PORTS = 1, + NUM_TLMOUT_OUTPUT_PORTS = 1, + }; + + //! Command opcodes + enum { + OPCODE_CMD_HOOK = 0x0, //!< A command with queue full 'hook' behavior + OPCODE_CMD_PARAMS_PRIORITY_HOOK = 0x1, //!< A command with params, priority, and queue full 'hook' behavior + }; + + public: + + // ---------------------------------------------------------------------- + // Component initialization + // ---------------------------------------------------------------------- + + //! Initialize ActiveOverflowComponentBase object + void init( + FwQueueSizeType queueDepth, //!< The queue depth + FwSizeType msgSize, //!< The message size + FwEnumStoreType instance = 0 //!< The instance number + ); + + public: + + // ---------------------------------------------------------------------- + // Getters for special input ports + // ---------------------------------------------------------------------- + + //! Get special input port at index + //! + //! \return cmdIn[portNum] + Fw::InputCmdPort* get_cmdIn_InputPort( + FwIndexType portNum //!< The port number + ); + + //! Get special input port at index + //! + //! \return productRecvInHook[portNum] + Fw::InputDpResponsePort* get_productRecvInHook_InputPort( + FwIndexType portNum //!< The port number + ); + + public: + + // ---------------------------------------------------------------------- + // Getters for typed input ports + // ---------------------------------------------------------------------- + + //! Get typed input port at index + //! + //! \return assertAsync[portNum] + Ports::InputTypedPort* get_assertAsync_InputPort( + FwIndexType portNum //!< The port number + ); + + //! Get typed input port at index + //! + //! \return blockAsync[portNum] + Ports::InputTypedPort* get_blockAsync_InputPort( + FwIndexType portNum //!< The port number + ); + + //! Get typed input port at index + //! + //! \return dropAsync[portNum] + Ports::InputTypedPort* get_dropAsync_InputPort( + FwIndexType portNum //!< The port number + ); + + //! Get typed input port at index + //! + //! \return hookAsync[portNum] + Ports::InputTypedPort* get_hookAsync_InputPort( + FwIndexType portNum //!< The port number + ); + + public: + + // ---------------------------------------------------------------------- + // Getters for serial input ports + // ---------------------------------------------------------------------- + + //! Get serial input port at index + //! + //! \return serialAsyncHook[portNum] + Fw::InputSerializePort* get_serialAsyncHook_InputPort( + FwIndexType portNum //!< The port number + ); + + public: + + // ---------------------------------------------------------------------- + // Connect input ports to special output ports + // ---------------------------------------------------------------------- + + //! Connect port to cmdRegOut[portNum] + void set_cmdRegOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputCmdRegPort* port //!< The input port + ); + + //! Connect port to cmdResponseOut[portNum] + void set_cmdResponseOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputCmdResponsePort* port //!< The input port + ); + + //! Connect port to eventOut[portNum] + void set_eventOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputLogPort* port //!< The input port + ); + + //! Connect port to prmGetOut[portNum] + void set_prmGetOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputPrmGetPort* port //!< The input port + ); + + //! Connect port to prmSetOut[portNum] + void set_prmSetOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputPrmSetPort* port //!< The input port + ); + +#if FW_ENABLE_TEXT_LOGGING == 1 + + //! Connect port to textEventOut[portNum] + void set_textEventOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputLogTextPort* port //!< The input port + ); + +#endif + + //! Connect port to timeGetOut[portNum] + void set_timeGetOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputTimePort* port //!< The input port + ); + + //! Connect port to tlmOut[portNum] + void set_tlmOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputTlmPort* port //!< The input port + ); + +#if FW_PORT_SERIALIZATION + + public: + + // ---------------------------------------------------------------------- + // Connect serial input ports to special output ports + // ---------------------------------------------------------------------- + + //! Connect port to cmdRegOut[portNum] + void set_cmdRegOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputSerializePort* port //!< The port + ); + + //! Connect port to cmdResponseOut[portNum] + void set_cmdResponseOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputSerializePort* port //!< The port + ); + + //! Connect port to eventOut[portNum] + void set_eventOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputSerializePort* port //!< The port + ); + + //! Connect port to prmSetOut[portNum] + void set_prmSetOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputSerializePort* port //!< The port + ); + +#if FW_ENABLE_TEXT_LOGGING == 1 + + //! Connect port to textEventOut[portNum] + void set_textEventOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputSerializePort* port //!< The port + ); + +#endif + + //! Connect port to timeGetOut[portNum] + void set_timeGetOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputSerializePort* port //!< The port + ); + + //! Connect port to tlmOut[portNum] + void set_tlmOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputSerializePort* port //!< The port + ); + +#endif + + public: + + // ---------------------------------------------------------------------- + // Command registration + // ---------------------------------------------------------------------- + + //! \brief Register commands with the Command Dispatcher + //! + //! Connect the dispatcher first + void regCommands(); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Component construction and destruction + // ---------------------------------------------------------------------- + + //! Construct ActiveOverflowComponentBase object + ActiveOverflowComponentBase( + const char* compName = "" //!< The component name + ); + + //! Destroy ActiveOverflowComponentBase object + virtual ~ActiveOverflowComponentBase(); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Getters for numbers of special input ports + // ---------------------------------------------------------------------- + + //! Get the number of cmdIn input ports + //! + //! \return The number of cmdIn input ports + FwIndexType getNum_cmdIn_InputPorts() const; + + //! Get the number of productRecvInHook input ports + //! + //! \return The number of productRecvInHook input ports + FwIndexType getNum_productRecvInHook_InputPorts() const; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Getters for numbers of typed input ports + // ---------------------------------------------------------------------- + + //! Get the number of assertAsync input ports + //! + //! \return The number of assertAsync input ports + FwIndexType getNum_assertAsync_InputPorts() const; + + //! Get the number of blockAsync input ports + //! + //! \return The number of blockAsync input ports + FwIndexType getNum_blockAsync_InputPorts() const; + + //! Get the number of dropAsync input ports + //! + //! \return The number of dropAsync input ports + FwIndexType getNum_dropAsync_InputPorts() const; + + //! Get the number of hookAsync input ports + //! + //! \return The number of hookAsync input ports + FwIndexType getNum_hookAsync_InputPorts() const; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Getters for numbers of serial input ports + // ---------------------------------------------------------------------- + + //! Get the number of serialAsyncHook input ports + //! + //! \return The number of serialAsyncHook input ports + FwIndexType getNum_serialAsyncHook_InputPorts() const; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Getters for numbers of special output ports + // ---------------------------------------------------------------------- + + //! Get the number of cmdRegOut output ports + //! + //! \return The number of cmdRegOut output ports + FwIndexType getNum_cmdRegOut_OutputPorts() const; + + //! Get the number of cmdResponseOut output ports + //! + //! \return The number of cmdResponseOut output ports + FwIndexType getNum_cmdResponseOut_OutputPorts() const; + + //! Get the number of eventOut output ports + //! + //! \return The number of eventOut output ports + FwIndexType getNum_eventOut_OutputPorts() const; + + //! Get the number of prmGetOut output ports + //! + //! \return The number of prmGetOut output ports + FwIndexType getNum_prmGetOut_OutputPorts() const; + + //! Get the number of prmSetOut output ports + //! + //! \return The number of prmSetOut output ports + FwIndexType getNum_prmSetOut_OutputPorts() const; + +#if FW_ENABLE_TEXT_LOGGING == 1 + + //! Get the number of textEventOut output ports + //! + //! \return The number of textEventOut output ports + FwIndexType getNum_textEventOut_OutputPorts() const; + +#endif + + //! Get the number of timeGetOut output ports + //! + //! \return The number of timeGetOut output ports + FwIndexType getNum_timeGetOut_OutputPorts() const; + + //! Get the number of tlmOut output ports + //! + //! \return The number of tlmOut output ports + FwIndexType getNum_tlmOut_OutputPorts() const; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Connection status queries for special output ports + // ---------------------------------------------------------------------- + + //! Check whether port cmdRegOut is connected + //! + //! \return Whether port cmdRegOut is connected + bool isConnected_cmdRegOut_OutputPort( + FwIndexType portNum //!< The port number + ); + + //! Check whether port cmdResponseOut is connected + //! + //! \return Whether port cmdResponseOut is connected + bool isConnected_cmdResponseOut_OutputPort( + FwIndexType portNum //!< The port number + ); + + //! Check whether port eventOut is connected + //! + //! \return Whether port eventOut is connected + bool isConnected_eventOut_OutputPort( + FwIndexType portNum //!< The port number + ); + + //! Check whether port prmGetOut is connected + //! + //! \return Whether port prmGetOut is connected + bool isConnected_prmGetOut_OutputPort( + FwIndexType portNum //!< The port number + ); + + //! Check whether port prmSetOut is connected + //! + //! \return Whether port prmSetOut is connected + bool isConnected_prmSetOut_OutputPort( + FwIndexType portNum //!< The port number + ); + +#if FW_ENABLE_TEXT_LOGGING == 1 + + //! Check whether port textEventOut is connected + //! + //! \return Whether port textEventOut is connected + bool isConnected_textEventOut_OutputPort( + FwIndexType portNum //!< The port number + ); + +#endif + + //! Check whether port timeGetOut is connected + //! + //! \return Whether port timeGetOut is connected + bool isConnected_timeGetOut_OutputPort( + FwIndexType portNum //!< The port number + ); + + //! Check whether port tlmOut is connected + //! + //! \return Whether port tlmOut is connected + bool isConnected_tlmOut_OutputPort( + FwIndexType portNum //!< The port number + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Port handler base-class functions for special input ports + // + // Call these functions directly to bypass the corresponding ports + // ---------------------------------------------------------------------- + + //! Handler base-class function for input port productRecvInHook + void productRecvInHook_handlerBase( + FwIndexType portNum, //!< The port number + FwDpIdType id, //!< The container ID + const Fw::Buffer& buffer, //!< The buffer + const Fw::Success& status //!< The status + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Handlers to implement for typed input ports + // ---------------------------------------------------------------------- + + //! Handler for input port assertAsync + virtual void assertAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) = 0; + + //! Handler for input port blockAsync + virtual void blockAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) = 0; + + //! Handler for input port dropAsync + virtual void dropAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) = 0; + + //! Handler for input port hookAsync + virtual void hookAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) = 0; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Port handler base-class functions for typed input ports + // + // Call these functions directly to bypass the corresponding ports + // ---------------------------------------------------------------------- + + //! Handler base-class function for input port assertAsync + void assertAsync_handlerBase( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Handler base-class function for input port blockAsync + void blockAsync_handlerBase( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Handler base-class function for input port dropAsync + void dropAsync_handlerBase( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Handler base-class function for input port hookAsync + void hookAsync_handlerBase( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Handlers to implement for serial input ports + // ---------------------------------------------------------------------- + + //! Handler for input port serialAsyncHook + virtual void serialAsyncHook_handler( + FwIndexType portNum, //!< The port number + Fw::SerializeBufferBase& buffer //!< The serialization buffer + ) = 0; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Port handler base-class functions for serial input ports + // + // Call these functions directly to bypass the corresponding ports + // ---------------------------------------------------------------------- + + //! Handler base-class function for input port serialAsyncHook + void serialAsyncHook_handlerBase( + FwIndexType portNum, //!< The port number + Fw::SerializeBufferBase& buffer //!< The serialization buffer + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Pre-message hooks for special async input ports + // + // Each of these functions is invoked just before processing a message + // on the corresponding port. By default, they do nothing. You can + // override them to provide specific pre-message behavior. + // ---------------------------------------------------------------------- + + //! Pre-message hook for async input port productRecvInHook + virtual void productRecvInHook_preMsgHook( + FwIndexType portNum, //!< The port number + FwDpIdType id, //!< The container ID + const Fw::Buffer& buffer, //!< The buffer + const Fw::Success& status //!< The status + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Pre-message hooks for typed async input ports + // + // Each of these functions is invoked just before processing a message + // on the corresponding port. By default, they do nothing. You can + // override them to provide specific pre-message behavior. + // ---------------------------------------------------------------------- + + //! Pre-message hook for async input port assertAsync + virtual void assertAsync_preMsgHook( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Pre-message hook for async input port blockAsync + virtual void blockAsync_preMsgHook( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Pre-message hook for async input port dropAsync + virtual void dropAsync_preMsgHook( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Pre-message hook for async input port hookAsync + virtual void hookAsync_preMsgHook( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Pre-message hooks for serial async input ports + // + // Each of these functions is invoked just before processing a message + // on the corresponding port. By default, they do nothing. You can + // override them to provide specific pre-message behavior. + // ---------------------------------------------------------------------- + + //! Pre-message hook for async input port serialAsyncHook + virtual void serialAsyncHook_preMsgHook( + FwIndexType portNum, //!< The port number + Fw::SerializeBufferBase& buffer //!< The serialization buffer + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Internal interface handlers + // ---------------------------------------------------------------------- + + //! Internal interface handler for internalHookDrop + virtual void internalHookDrop_internalInterfaceHandler() = 0; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Internal interface base-class functions + // ---------------------------------------------------------------------- + + //! Internal interface base-class function for internalHookDrop + void internalHookDrop_internalInterfaceInvoke(); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Command response + // ---------------------------------------------------------------------- + + //! Emit command response + void cmdResponse_out( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq, //!< The command sequence number + Fw::CmdResponse response //!< The command response + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Command handlers to implement + // ---------------------------------------------------------------------- + + //! Handler for command CMD_HOOK + //! + //! A command with queue full 'hook' behavior + virtual void CMD_HOOK_cmdHandler( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq //!< The command sequence number + ) = 0; + + //! Handler for command CMD_PARAMS_PRIORITY_HOOK + //! + //! A command with params, priority, and queue full 'hook' behavior + virtual void CMD_PARAMS_PRIORITY_HOOK_cmdHandler( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq, //!< The command sequence number + U32 u32 + ) = 0; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Command handler base-class functions + // + // Call these functions directly to bypass the command input port + // ---------------------------------------------------------------------- + + //! Base-class handler function for command CMD_HOOK + //! + //! A command with queue full 'hook' behavior + void CMD_HOOK_cmdHandlerBase( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq, //!< The command sequence number + Fw::CmdArgBuffer& args //!< The command argument buffer + ); + + //! Base-class handler function for command CMD_PARAMS_PRIORITY_HOOK + //! + //! A command with params, priority, and queue full 'hook' behavior + void CMD_PARAMS_PRIORITY_HOOK_cmdHandlerBase( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq, //!< The command sequence number + Fw::CmdArgBuffer& args //!< The command argument buffer + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Pre-message hooks for async commands + // + // Each of these functions is invoked just before processing the + // corresponding command. By default they do nothing. You can + // override them to provide specific pre-command behavior. + // ---------------------------------------------------------------------- + + //! Pre-message hook for command CMD_HOOK + virtual void CMD_HOOK_preMsgHook( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq //!< The command sequence number + ); + + //! Pre-message hook for command CMD_PARAMS_PRIORITY_HOOK + virtual void CMD_PARAMS_PRIORITY_HOOK_preMsgHook( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq //!< The command sequence number + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Time + // ---------------------------------------------------------------------- + + //! Get the time + //! + //! \\return The current time + Fw::Time getTime(); + + PRIVATE: + + // ---------------------------------------------------------------------- + // Message dispatch functions + // ---------------------------------------------------------------------- + + //! Called in the message loop to dispatch a message from the queue + virtual MsgDispatchStatus doDispatch(); + + PRIVATE: + + // ---------------------------------------------------------------------- + // Calls for messages received on special input ports + // ---------------------------------------------------------------------- + + //! Callback for port cmdIn + static void m_p_cmdIn_in( + Fw::PassiveComponentBase* callComp, //!< The component instance + FwIndexType portNum, //!< The port number + FwOpcodeType opCode, //!< Command Op Code + U32 cmdSeq, //!< Command Sequence + Fw::CmdArgBuffer& args //!< Buffer containing arguments + ); + + //! Callback for port productRecvInHook + static void m_p_productRecvInHook_in( + Fw::PassiveComponentBase* callComp, //!< The component instance + FwIndexType portNum, //!< The port number + FwDpIdType id, //!< The container ID + const Fw::Buffer& buffer, //!< The buffer + const Fw::Success& status //!< The status + ); + + PRIVATE: + + // ---------------------------------------------------------------------- + // Calls for messages received on typed input ports + // ---------------------------------------------------------------------- + + //! Callback for port assertAsync + static void m_p_assertAsync_in( + Fw::PassiveComponentBase* callComp, //!< The component instance + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Callback for port blockAsync + static void m_p_blockAsync_in( + Fw::PassiveComponentBase* callComp, //!< The component instance + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Callback for port dropAsync + static void m_p_dropAsync_in( + Fw::PassiveComponentBase* callComp, //!< The component instance + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Callback for port hookAsync + static void m_p_hookAsync_in( + Fw::PassiveComponentBase* callComp, //!< The component instance + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + PRIVATE: + + // ---------------------------------------------------------------------- + // Calls for messages received on serial input ports + // ---------------------------------------------------------------------- + +#if FW_PORT_SERIALIZATION + + //! Callback for port serialAsyncHook + static void m_p_serialAsyncHook_in( + Fw::PassiveComponentBase* callComp, //!< The component instance + FwIndexType portNum, //!< The port number + Fw::SerializeBufferBase& buffer //!< The serialization buffer + ); + +#endif + + PRIVATE: + + // ---------------------------------------------------------------------- + // Private data product handling functions + // ---------------------------------------------------------------------- + + //! Handler implementation for productRecvInHook + void productRecvInHook_handler( + const FwIndexType portNum, //!< The port number + FwDpIdType id, //!< The container id + const Fw::Buffer& buffer, //!< The buffer + const Fw::Success& status //!< The buffer status + ); + + PRIVATE: + + // ---------------------------------------------------------------------- + // Special input ports + // ---------------------------------------------------------------------- + + //! Input port cmdIn + Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS]; + + //! Input port productRecvInHook + Fw::InputDpResponsePort m_productRecvInHook_InputPort[NUM_PRODUCTRECVINHOOK_INPUT_PORTS]; + + PRIVATE: + + // ---------------------------------------------------------------------- + // Typed input ports + // ---------------------------------------------------------------------- + + //! Input port assertAsync + Ports::InputTypedPort m_assertAsync_InputPort[NUM_ASSERTASYNC_INPUT_PORTS]; + + //! Input port blockAsync + Ports::InputTypedPort m_blockAsync_InputPort[NUM_BLOCKASYNC_INPUT_PORTS]; + + //! Input port dropAsync + Ports::InputTypedPort m_dropAsync_InputPort[NUM_DROPASYNC_INPUT_PORTS]; + + //! Input port hookAsync + Ports::InputTypedPort m_hookAsync_InputPort[NUM_HOOKASYNC_INPUT_PORTS]; + + PRIVATE: + + // ---------------------------------------------------------------------- + // Serial input ports + // ---------------------------------------------------------------------- + + //! Input port serialAsyncHook + Fw::InputSerializePort m_serialAsyncHook_InputPort[NUM_SERIALASYNCHOOK_INPUT_PORTS]; + + PRIVATE: + + // ---------------------------------------------------------------------- + // Special output ports + // ---------------------------------------------------------------------- + + //! Output port cmdRegOut + Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS]; + + //! Output port cmdResponseOut + Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS]; + + //! Output port eventOut + Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS]; + + //! Output port prmGetOut + Fw::OutputPrmGetPort m_prmGetOut_OutputPort[NUM_PRMGETOUT_OUTPUT_PORTS]; + + //! Output port prmSetOut + Fw::OutputPrmSetPort m_prmSetOut_OutputPort[NUM_PRMSETOUT_OUTPUT_PORTS]; + +#if FW_ENABLE_TEXT_LOGGING == 1 + + //! Output port textEventOut + Fw::OutputLogTextPort m_textEventOut_OutputPort[NUM_TEXTEVENTOUT_OUTPUT_PORTS]; + +#endif + + //! Output port timeGetOut + Fw::OutputTimePort m_timeGetOut_OutputPort[NUM_TIMEGETOUT_OUTPUT_PORTS]; + + //! Output port tlmOut + Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS]; + + PRIVATE: + + //! Stores max message size + FwSizeType m_msgSize; + +}; + +#endif diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.cpp new file mode 100644 index 000000000..34268e423 --- /dev/null +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.cpp @@ -0,0 +1,2620 @@ +// ====================================================================== +// \title QueuedOverflowComponentAc.cpp +// \author Generated by fpp-to-cpp +// \brief cpp file for QueuedOverflow component base class +// ====================================================================== + +#include "Fw/Types/Assert.hpp" +#include "Fw/Types/ExternalString.hpp" +#if FW_ENABLE_TEXT_LOGGING +#include "Fw/Types/String.hpp" +#endif +#include "base/QueuedOverflowComponentAc.hpp" + +namespace { + enum MsgTypeEnum { + QUEUEDOVERFLOW_COMPONENT_EXIT = Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT, + PRODUCTRECVINHOOK_DPRESPONSE, + ASSERTASYNC_TYPED, + BLOCKASYNC_TYPED, + DROPASYNC_TYPED, + HOOKASYNC_TYPED, + SERIALASYNCHOOK_SERIAL, + CMD_CMD_HOOK, + CMD_CMD_PARAMS_PRIORITY_HOOK, + INT_IF_INTERNALHOOKDROP, + }; + + // Get the max size by constructing a union of the async input, command, and + // internal port serialization sizes + union BuffUnion { + BYTE productRecvInHookPortSize[Fw::InputDpResponsePort::SERIALIZED_SIZE]; + BYTE assertAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; + BYTE blockAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; + BYTE dropAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; + BYTE hookAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; + BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE]; + }; + + // Define a message buffer class large enough to handle all the + // asynchronous inputs to the component + class ComponentIpcSerializableBuffer : + public Fw::SerializeBufferBase + { + + public: + + enum { + // Max. message size = size of data + message id + port + SERIALIZATION_SIZE = + sizeof(BuffUnion) + + sizeof(FwEnumStoreType) + + sizeof(FwIndexType) + }; + + Fw::Serializable::SizeType getBuffCapacity() const { + return sizeof(m_buff); + } + + U8* getBuffAddr() { + return m_buff; + } + + const U8* getBuffAddr() const { + return m_buff; + } + + private: + // Should be the max of all the input ports serialized sizes... + U8 m_buff[SERIALIZATION_SIZE]; + + }; +} + +// ---------------------------------------------------------------------- +// Component initialization +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + init( + FwQueueSizeType queueDepth, + FwSizeType msgSize, + FwEnumStoreType instance + ) +{ + // Initialize base class + Fw::QueuedComponentBase::init(instance); + + // Connect input port cmdIn + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_cmdIn_InputPorts()); + port++ + ) { + this->m_cmdIn_InputPort[port].init(); + this->m_cmdIn_InputPort[port].addCallComp( + this, + m_p_cmdIn_in + ); + this->m_cmdIn_InputPort[port].setPortNum(port); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_cmdIn_InputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_cmdIn_InputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect input port productRecvInHook + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_productRecvInHook_InputPorts()); + port++ + ) { + this->m_productRecvInHook_InputPort[port].init(); + this->m_productRecvInHook_InputPort[port].addCallComp( + this, + m_p_productRecvInHook_in + ); + this->m_productRecvInHook_InputPort[port].setPortNum(port); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_productRecvInHook_InputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_productRecvInHook_InputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect input port assertAsync + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_assertAsync_InputPorts()); + port++ + ) { + this->m_assertAsync_InputPort[port].init(); + this->m_assertAsync_InputPort[port].addCallComp( + this, + m_p_assertAsync_in + ); + this->m_assertAsync_InputPort[port].setPortNum(port); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_assertAsync_InputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_assertAsync_InputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect input port blockAsync + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_blockAsync_InputPorts()); + port++ + ) { + this->m_blockAsync_InputPort[port].init(); + this->m_blockAsync_InputPort[port].addCallComp( + this, + m_p_blockAsync_in + ); + this->m_blockAsync_InputPort[port].setPortNum(port); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_blockAsync_InputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_blockAsync_InputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect input port dropAsync + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_dropAsync_InputPorts()); + port++ + ) { + this->m_dropAsync_InputPort[port].init(); + this->m_dropAsync_InputPort[port].addCallComp( + this, + m_p_dropAsync_in + ); + this->m_dropAsync_InputPort[port].setPortNum(port); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_dropAsync_InputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_dropAsync_InputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect input port hookAsync + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_hookAsync_InputPorts()); + port++ + ) { + this->m_hookAsync_InputPort[port].init(); + this->m_hookAsync_InputPort[port].addCallComp( + this, + m_p_hookAsync_in + ); + this->m_hookAsync_InputPort[port].setPortNum(port); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_hookAsync_InputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_hookAsync_InputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect input port serialAsyncHook + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_serialAsyncHook_InputPorts()); + port++ + ) { + this->m_serialAsyncHook_InputPort[port].init(); + this->m_serialAsyncHook_InputPort[port].addCallComp( + this, + m_p_serialAsyncHook_in + ); + this->m_serialAsyncHook_InputPort[port].setPortNum(port); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_serialAsyncHook_InputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_serialAsyncHook_InputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect output port cmdRegOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_cmdRegOut_OutputPorts()); + port++ + ) { + this->m_cmdRegOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_cmdRegOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_cmdRegOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect output port cmdResponseOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_cmdResponseOut_OutputPorts()); + port++ + ) { + this->m_cmdResponseOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_cmdResponseOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_cmdResponseOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect output port eventOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_eventOut_OutputPorts()); + port++ + ) { + this->m_eventOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_eventOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_eventOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect output port prmGetOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_prmGetOut_OutputPorts()); + port++ + ) { + this->m_prmGetOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_prmGetOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_prmGetOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect output port prmSetOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_prmSetOut_OutputPorts()); + port++ + ) { + this->m_prmSetOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_prmSetOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_prmSetOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } + +#if FW_ENABLE_TEXT_LOGGING == 1 + // Connect output port textEventOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_textEventOut_OutputPorts()); + port++ + ) { + this->m_textEventOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_textEventOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_textEventOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } +#endif + + // Connect output port timeGetOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_timeGetOut_OutputPorts()); + port++ + ) { + this->m_timeGetOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_timeGetOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_timeGetOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } + + // Connect output port tlmOut + for ( + FwIndexType port = 0; + port < static_cast(this->getNum_tlmOut_OutputPorts()); + port++ + ) { + this->m_tlmOut_OutputPort[port].init(); + +#if FW_OBJECT_NAMES == 1 + Fw::ObjectName portName; + portName.format( + "%s_tlmOut_OutputPort[%" PRI_PlatformIntType "]", + this->m_objName.toChar(), + port + ); + this->m_tlmOut_OutputPort[port].setObjName(portName.toChar()); +#endif + } + + // Passed-in size added to port number and message type enumeration sizes. + this->m_msgSize = FW_MAX( + msgSize + + static_cast(sizeof(FwIndexType)) + + static_cast(sizeof(FwEnumStoreType)), + static_cast(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE) + ); + + Os::Queue::QueueStatus qStat = this->createQueue(queueDepth, this->m_msgSize); + FW_ASSERT( + Os::Queue::QUEUE_OK == qStat, + static_cast(qStat) + ); +} + +// ---------------------------------------------------------------------- +// Getters for special input ports +// ---------------------------------------------------------------------- + +Fw::InputCmdPort* QueuedOverflowComponentBase :: + get_cmdIn_InputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_cmdIn_InputPorts(), + static_cast(portNum) + ); + + return &this->m_cmdIn_InputPort[portNum]; +} + +Fw::InputDpResponsePort* QueuedOverflowComponentBase :: + get_productRecvInHook_InputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_productRecvInHook_InputPorts(), + static_cast(portNum) + ); + + return &this->m_productRecvInHook_InputPort[portNum]; +} + +// ---------------------------------------------------------------------- +// Getters for typed input ports +// ---------------------------------------------------------------------- + +Ports::InputTypedPort* QueuedOverflowComponentBase :: + get_assertAsync_InputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_assertAsync_InputPorts(), + static_cast(portNum) + ); + + return &this->m_assertAsync_InputPort[portNum]; +} + +Ports::InputTypedPort* QueuedOverflowComponentBase :: + get_blockAsync_InputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_blockAsync_InputPorts(), + static_cast(portNum) + ); + + return &this->m_blockAsync_InputPort[portNum]; +} + +Ports::InputTypedPort* QueuedOverflowComponentBase :: + get_dropAsync_InputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_dropAsync_InputPorts(), + static_cast(portNum) + ); + + return &this->m_dropAsync_InputPort[portNum]; +} + +Ports::InputTypedPort* QueuedOverflowComponentBase :: + get_hookAsync_InputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_hookAsync_InputPorts(), + static_cast(portNum) + ); + + return &this->m_hookAsync_InputPort[portNum]; +} + +// ---------------------------------------------------------------------- +// Getters for serial input ports +// ---------------------------------------------------------------------- + +Fw::InputSerializePort* QueuedOverflowComponentBase :: + get_serialAsyncHook_InputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_serialAsyncHook_InputPorts(), + static_cast(portNum) + ); + + return &this->m_serialAsyncHook_InputPort[portNum]; +} + +// ---------------------------------------------------------------------- +// Connect input ports to special output ports +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + set_cmdRegOut_OutputPort( + FwIndexType portNum, + Fw::InputCmdRegPort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_cmdRegOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_cmdRegOut_OutputPort[portNum].addCallPort(port); +} + +void QueuedOverflowComponentBase :: + set_cmdResponseOut_OutputPort( + FwIndexType portNum, + Fw::InputCmdResponsePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_cmdResponseOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port); +} + +void QueuedOverflowComponentBase :: + set_eventOut_OutputPort( + FwIndexType portNum, + Fw::InputLogPort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_eventOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_eventOut_OutputPort[portNum].addCallPort(port); +} + +void QueuedOverflowComponentBase :: + set_prmGetOut_OutputPort( + FwIndexType portNum, + Fw::InputPrmGetPort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_prmGetOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_prmGetOut_OutputPort[portNum].addCallPort(port); +} + +void QueuedOverflowComponentBase :: + set_prmSetOut_OutputPort( + FwIndexType portNum, + Fw::InputPrmSetPort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_prmSetOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_prmSetOut_OutputPort[portNum].addCallPort(port); +} + +#if FW_ENABLE_TEXT_LOGGING == 1 + +void QueuedOverflowComponentBase :: + set_textEventOut_OutputPort( + FwIndexType portNum, + Fw::InputLogTextPort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_textEventOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_textEventOut_OutputPort[portNum].addCallPort(port); +} + +#endif + +void QueuedOverflowComponentBase :: + set_timeGetOut_OutputPort( + FwIndexType portNum, + Fw::InputTimePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_timeGetOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_timeGetOut_OutputPort[portNum].addCallPort(port); +} + +void QueuedOverflowComponentBase :: + set_tlmOut_OutputPort( + FwIndexType portNum, + Fw::InputTlmPort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_tlmOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_tlmOut_OutputPort[portNum].addCallPort(port); +} + +#if FW_PORT_SERIALIZATION + +// ---------------------------------------------------------------------- +// Connect serial input ports to special output ports +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + set_cmdRegOut_OutputPort( + FwIndexType portNum, + Fw::InputSerializePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_cmdRegOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port); +} + +void QueuedOverflowComponentBase :: + set_cmdResponseOut_OutputPort( + FwIndexType portNum, + Fw::InputSerializePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_cmdResponseOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port); +} + +void QueuedOverflowComponentBase :: + set_eventOut_OutputPort( + FwIndexType portNum, + Fw::InputSerializePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_eventOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_eventOut_OutputPort[portNum].registerSerialPort(port); +} + +void QueuedOverflowComponentBase :: + set_prmSetOut_OutputPort( + FwIndexType portNum, + Fw::InputSerializePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_prmSetOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_prmSetOut_OutputPort[portNum].registerSerialPort(port); +} + +#if FW_ENABLE_TEXT_LOGGING == 1 + +void QueuedOverflowComponentBase :: + set_textEventOut_OutputPort( + FwIndexType portNum, + Fw::InputSerializePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_textEventOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_textEventOut_OutputPort[portNum].registerSerialPort(port); +} + +#endif + +void QueuedOverflowComponentBase :: + set_timeGetOut_OutputPort( + FwIndexType portNum, + Fw::InputSerializePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_timeGetOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_timeGetOut_OutputPort[portNum].registerSerialPort(port); +} + +void QueuedOverflowComponentBase :: + set_tlmOut_OutputPort( + FwIndexType portNum, + Fw::InputSerializePort* port + ) +{ + FW_ASSERT( + portNum < this->getNum_tlmOut_OutputPorts(), + static_cast(portNum) + ); + + this->m_tlmOut_OutputPort[portNum].registerSerialPort(port); +} + +#endif + +// ---------------------------------------------------------------------- +// Command registration +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + regCommands() +{ + FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected()); + + this->m_cmdRegOut_OutputPort[0].invoke( + this->getIdBase() + OPCODE_CMD_HOOK + ); + + this->m_cmdRegOut_OutputPort[0].invoke( + this->getIdBase() + OPCODE_CMD_PARAMS_PRIORITY_HOOK + ); +} + +// ---------------------------------------------------------------------- +// Component construction and destruction +// ---------------------------------------------------------------------- + +QueuedOverflowComponentBase :: + QueuedOverflowComponentBase(const char* compName) : + Fw::QueuedComponentBase(compName) +{ + +} + +QueuedOverflowComponentBase :: + ~QueuedOverflowComponentBase() +{ + +} + +// ---------------------------------------------------------------------- +// Getters for numbers of special input ports +// ---------------------------------------------------------------------- + +FwIndexType QueuedOverflowComponentBase :: + getNum_cmdIn_InputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_cmdIn_InputPort)); +} + +FwIndexType QueuedOverflowComponentBase :: + getNum_productRecvInHook_InputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_productRecvInHook_InputPort)); +} + +// ---------------------------------------------------------------------- +// Getters for numbers of typed input ports +// ---------------------------------------------------------------------- + +FwIndexType QueuedOverflowComponentBase :: + getNum_assertAsync_InputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_assertAsync_InputPort)); +} + +FwIndexType QueuedOverflowComponentBase :: + getNum_blockAsync_InputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_blockAsync_InputPort)); +} + +FwIndexType QueuedOverflowComponentBase :: + getNum_dropAsync_InputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_dropAsync_InputPort)); +} + +FwIndexType QueuedOverflowComponentBase :: + getNum_hookAsync_InputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_hookAsync_InputPort)); +} + +// ---------------------------------------------------------------------- +// Getters for numbers of serial input ports +// ---------------------------------------------------------------------- + +FwIndexType QueuedOverflowComponentBase :: + getNum_serialAsyncHook_InputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_serialAsyncHook_InputPort)); +} + +// ---------------------------------------------------------------------- +// Getters for numbers of special output ports +// ---------------------------------------------------------------------- + +FwIndexType QueuedOverflowComponentBase :: + getNum_cmdRegOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_cmdRegOut_OutputPort)); +} + +FwIndexType QueuedOverflowComponentBase :: + getNum_cmdResponseOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_cmdResponseOut_OutputPort)); +} + +FwIndexType QueuedOverflowComponentBase :: + getNum_eventOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_eventOut_OutputPort)); +} + +FwIndexType QueuedOverflowComponentBase :: + getNum_prmGetOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_prmGetOut_OutputPort)); +} + +FwIndexType QueuedOverflowComponentBase :: + getNum_prmSetOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_prmSetOut_OutputPort)); +} + +#if FW_ENABLE_TEXT_LOGGING == 1 + +FwIndexType QueuedOverflowComponentBase :: + getNum_textEventOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_textEventOut_OutputPort)); +} + +#endif + +FwIndexType QueuedOverflowComponentBase :: + getNum_timeGetOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_timeGetOut_OutputPort)); +} + +FwIndexType QueuedOverflowComponentBase :: + getNum_tlmOut_OutputPorts() const +{ + return static_cast(FW_NUM_ARRAY_ELEMENTS(this->m_tlmOut_OutputPort)); +} + +// ---------------------------------------------------------------------- +// Connection status queries for special output ports +// ---------------------------------------------------------------------- + +bool QueuedOverflowComponentBase :: + isConnected_cmdRegOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_cmdRegOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_cmdRegOut_OutputPort[portNum].isConnected(); +} + +bool QueuedOverflowComponentBase :: + isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_cmdResponseOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_cmdResponseOut_OutputPort[portNum].isConnected(); +} + +bool QueuedOverflowComponentBase :: + isConnected_eventOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_eventOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_eventOut_OutputPort[portNum].isConnected(); +} + +bool QueuedOverflowComponentBase :: + isConnected_prmGetOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_prmGetOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_prmGetOut_OutputPort[portNum].isConnected(); +} + +bool QueuedOverflowComponentBase :: + isConnected_prmSetOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_prmSetOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_prmSetOut_OutputPort[portNum].isConnected(); +} + +#if FW_ENABLE_TEXT_LOGGING == 1 + +bool QueuedOverflowComponentBase :: + isConnected_textEventOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_textEventOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_textEventOut_OutputPort[portNum].isConnected(); +} + +#endif + +bool QueuedOverflowComponentBase :: + isConnected_timeGetOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_timeGetOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_timeGetOut_OutputPort[portNum].isConnected(); +} + +bool QueuedOverflowComponentBase :: + isConnected_tlmOut_OutputPort(FwIndexType portNum) +{ + FW_ASSERT( + portNum < this->getNum_tlmOut_OutputPorts(), + static_cast(portNum) + ); + + return this->m_tlmOut_OutputPort[portNum].isConnected(); +} + +// ---------------------------------------------------------------------- +// Port handler base-class functions for special input ports +// +// Call these functions directly to bypass the corresponding ports +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + productRecvInHook_handlerBase( + FwIndexType portNum, + FwDpIdType id, + const Fw::Buffer& buffer, + const Fw::Success& status + ) +{ + // Make sure port number is valid + FW_ASSERT( + portNum < this->getNum_productRecvInHook_InputPorts(), + static_cast(portNum) + ); + + // Call pre-message hook + productRecvInHook_preMsgHook( + portNum, + id, + buffer, + status + ); + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize message ID + _status = msg.serialize( + static_cast(PRODUCTRECVINHOOK_DPRESPONSE) + ); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize port number + _status = msg.serialize(portNum); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument id + _status = msg.serialize(id); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument buffer + _status = msg.serialize(buffer); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument status + _status = msg.serialize(status); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +// ---------------------------------------------------------------------- +// Port handler base-class functions for typed input ports +// +// Call these functions directly to bypass the corresponding ports +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + assertAsync_handlerBase( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Make sure port number is valid + FW_ASSERT( + portNum < this->getNum_assertAsync_InputPorts(), + static_cast(portNum) + ); + + // Call pre-message hook + assertAsync_preMsgHook( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize message ID + _status = msg.serialize( + static_cast(ASSERTASYNC_TYPED) + ); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize port number + _status = msg.serialize(portNum); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument u32 + _status = msg.serialize(u32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument f32 + _status = msg.serialize(f32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument b + _status = msg.serialize(b); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument str1 + _status = str1.serialize(msg, 80); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument e + _status = msg.serialize(e); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument a + _status = msg.serialize(a); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument s + _status = msg.serialize(s); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +void QueuedOverflowComponentBase :: + blockAsync_handlerBase( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Make sure port number is valid + FW_ASSERT( + portNum < this->getNum_blockAsync_InputPorts(), + static_cast(portNum) + ); + + // Call pre-message hook + blockAsync_preMsgHook( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize message ID + _status = msg.serialize( + static_cast(BLOCKASYNC_TYPED) + ); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize port number + _status = msg.serialize(portNum); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument u32 + _status = msg.serialize(u32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument f32 + _status = msg.serialize(f32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument b + _status = msg.serialize(b); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument str1 + _status = str1.serialize(msg, 80); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument e + _status = msg.serialize(e); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument a + _status = msg.serialize(a); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument s + _status = msg.serialize(s); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_BLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +void QueuedOverflowComponentBase :: + dropAsync_handlerBase( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Make sure port number is valid + FW_ASSERT( + portNum < this->getNum_dropAsync_InputPorts(), + static_cast(portNum) + ); + + // Call pre-message hook + dropAsync_preMsgHook( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize message ID + _status = msg.serialize( + static_cast(DROPASYNC_TYPED) + ); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize port number + _status = msg.serialize(portNum); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument u32 + _status = msg.serialize(u32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument f32 + _status = msg.serialize(f32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument b + _status = msg.serialize(b); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument str1 + _status = str1.serialize(msg, 80); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument e + _status = msg.serialize(e); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument a + _status = msg.serialize(a); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument s + _status = msg.serialize(s); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + + if (qStatus == Os::Queue::QUEUE_FULL) { + this->incNumMsgDropped(); + return; + } + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +void QueuedOverflowComponentBase :: + hookAsync_handlerBase( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Make sure port number is valid + FW_ASSERT( + portNum < this->getNum_hookAsync_InputPorts(), + static_cast(portNum) + ); + + // Call pre-message hook + hookAsync_preMsgHook( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize message ID + _status = msg.serialize( + static_cast(HOOKASYNC_TYPED) + ); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize port number + _status = msg.serialize(portNum); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument u32 + _status = msg.serialize(u32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument f32 + _status = msg.serialize(f32); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument b + _status = msg.serialize(b); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument str1 + _status = str1.serialize(msg, 80); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument e + _status = msg.serialize(e); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument a + _status = msg.serialize(a); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument s + _status = msg.serialize(s); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +// ---------------------------------------------------------------------- +// Port handler base-class functions for serial input ports +// +// Call these functions directly to bypass the corresponding ports +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + serialAsyncHook_handlerBase( + FwIndexType portNum, + Fw::SerializeBufferBase& buffer + ) +{ + // Make sure port number is valid + FW_ASSERT( + portNum < this->getNum_serialAsyncHook_InputPorts(), + static_cast(portNum) + ); + + // Declare buffer for serialAsyncHook + U8 msgBuff[this->m_msgSize]; + Fw::ExternalSerializeBuffer msgSerBuff(msgBuff, this->m_msgSize); + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize message ID + _status = msgSerBuff.serialize( + static_cast(SERIALASYNCHOOK_SERIAL) + ); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize port number + _status = msgSerBuff.serialize(portNum); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Serialize argument buffer + _status = msgSerBuff.serialize(buffer); + FW_ASSERT( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msgSerBuff, 0, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +// ---------------------------------------------------------------------- +// Pre-message hooks for special async input ports +// +// Each of these functions is invoked just before processing a message +// on the corresponding port. By default, they do nothing. You can +// override them to provide specific pre-message behavior. +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + productRecvInHook_preMsgHook( + FwIndexType portNum, + FwDpIdType id, + const Fw::Buffer& buffer, + const Fw::Success& status + ) +{ + // Default: no-op +} + +// ---------------------------------------------------------------------- +// Pre-message hooks for typed async input ports +// +// Each of these functions is invoked just before processing a message +// on the corresponding port. By default, they do nothing. You can +// override them to provide specific pre-message behavior. +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + assertAsync_preMsgHook( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Default: no-op +} + +void QueuedOverflowComponentBase :: + blockAsync_preMsgHook( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Default: no-op +} + +void QueuedOverflowComponentBase :: + dropAsync_preMsgHook( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Default: no-op +} + +void QueuedOverflowComponentBase :: + hookAsync_preMsgHook( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // Default: no-op +} + +// ---------------------------------------------------------------------- +// Pre-message hooks for serial async input ports +// +// Each of these functions is invoked just before processing a message +// on the corresponding port. By default, they do nothing. You can +// override them to provide specific pre-message behavior. +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + serialAsyncHook_preMsgHook( + FwIndexType portNum, + Fw::SerializeBufferBase& buffer + ) +{ + // Default: no-op +} + +// ---------------------------------------------------------------------- +// Internal interface base-class functions +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + internalHookDrop_internalInterfaceInvoke() +{ + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize the message ID + _status = msg.serialize(static_cast(INT_IF_INTERNALHOOKDROP)); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + 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) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +// ---------------------------------------------------------------------- +// Command response +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + cmdResponse_out( + FwOpcodeType opCode, + U32 cmdSeq, + Fw::CmdResponse response + ) +{ + FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected()); + this->m_cmdResponseOut_OutputPort[0].invoke(opCode, cmdSeq, response); +} + +// ---------------------------------------------------------------------- +// Command handler base-class functions +// +// Call these functions directly to bypass the command input port +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + CMD_HOOK_cmdHandlerBase( + FwOpcodeType opCode, + U32 cmdSeq, + Fw::CmdArgBuffer& args + ) +{ + // Call pre-message hook + this->CMD_HOOK_preMsgHook(opCode,cmdSeq); + + // Defer deserializing arguments to the message dispatcher + // to avoid deserializing and reserializing just for IPC + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize for IPC + _status = msg.serialize(static_cast(CMD_CMD_HOOK)); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Fake port number to make message dequeue work + FwIndexType port = 0; + + _status = msg.serialize(port); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + _status = msg.serialize(opCode); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + _status = msg.serialize(cmdSeq); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + _status = msg.serialize(args); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +void QueuedOverflowComponentBase :: + CMD_PARAMS_PRIORITY_HOOK_cmdHandlerBase( + FwOpcodeType opCode, + U32 cmdSeq, + Fw::CmdArgBuffer& args + ) +{ + // Call pre-message hook + this->CMD_PARAMS_PRIORITY_HOOK_preMsgHook(opCode,cmdSeq); + + // Defer deserializing arguments to the message dispatcher + // to avoid deserializing and reserializing just for IPC + ComponentIpcSerializableBuffer msg; + Fw::SerializeStatus _status = Fw::FW_SERIALIZE_OK; + + // Serialize for IPC + _status = msg.serialize(static_cast(CMD_CMD_PARAMS_PRIORITY_HOOK)); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Fake port number to make message dequeue work + FwIndexType port = 0; + + _status = msg.serialize(port); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + _status = msg.serialize(opCode); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + _status = msg.serialize(cmdSeq); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + _status = msg.serialize(args); + FW_ASSERT ( + _status == Fw::FW_SERIALIZE_OK, + static_cast(_status) + ); + + // Send message + Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; + Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 30, _block); + + FW_ASSERT( + qStatus == Os::Queue::QUEUE_OK, + static_cast(qStatus) + ); +} + +// ---------------------------------------------------------------------- +// Pre-message hooks for async commands +// +// Each of these functions is invoked just before processing the +// corresponding command. By default they do nothing. You can +// override them to provide specific pre-command behavior. +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + CMD_HOOK_preMsgHook( + FwOpcodeType opCode, + U32 cmdSeq + ) +{ + // Defaults to no-op; can be overridden + (void) opCode; + (void) cmdSeq; +} + +void QueuedOverflowComponentBase :: + CMD_PARAMS_PRIORITY_HOOK_preMsgHook( + FwOpcodeType opCode, + U32 cmdSeq + ) +{ + // Defaults to no-op; can be overridden + (void) opCode; + (void) cmdSeq; +} + +// ---------------------------------------------------------------------- +// Time +// ---------------------------------------------------------------------- + +Fw::Time QueuedOverflowComponentBase :: + getTime() +{ + if (this->m_timeGetOut_OutputPort[0].isConnected()) { + Fw::Time _time; + this->m_timeGetOut_OutputPort[0].invoke(_time); + return _time; + } + else { + return Fw::Time(TB_NONE, 0, 0); + } +} + +// ---------------------------------------------------------------------- +// Message dispatch functions +// ---------------------------------------------------------------------- + +Fw::QueuedComponentBase::MsgDispatchStatus QueuedOverflowComponentBase :: + doDispatch() +{ + U8 msgBuff[this->m_msgSize]; + Fw::ExternalSerializeBuffer msg(msgBuff,this->m_msgSize); + FwQueuePriorityType priority = 0; + + Os::Queue::QueueStatus msgStatus = this->m_queue.receive( + msg, + priority, + Os::Queue::QUEUE_NONBLOCKING + ); + if (Os::Queue::QUEUE_NO_MORE_MSGS == msgStatus) { + return Fw::QueuedComponentBase::MSG_DISPATCH_EMPTY; + } + else { + FW_ASSERT( + msgStatus == Os::Queue::QUEUE_OK, + static_cast(msgStatus) + ); + } + + // Reset to beginning of buffer + msg.resetDeser(); + + FwEnumStoreType desMsg = 0; + Fw::SerializeStatus deserStatus = msg.deserialize(desMsg); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + MsgTypeEnum msgType = static_cast(desMsg); + + if (msgType == QUEUEDOVERFLOW_COMPONENT_EXIT) { + return MSG_DISPATCH_EXIT; + } + + FwIndexType portNum = 0; + deserStatus = msg.deserialize(portNum); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + switch (msgType) { + // Handle async input port productRecvInHook + case PRODUCTRECVINHOOK_DPRESPONSE: { + // Deserialize argument id + FwDpIdType id; + deserStatus = msg.deserialize(id); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument buffer + Fw::Buffer buffer; + deserStatus = msg.deserialize(buffer); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument status + Fw::Success status; + deserStatus = msg.deserialize(status); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + // Call handler function + this->productRecvInHook_handler( + portNum, + id, + buffer, + status + ); + + break; + } + + // Handle async input port assertAsync + case ASSERTASYNC_TYPED: { + // Deserialize argument u32 + U32 u32; + deserStatus = msg.deserialize(u32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument f32 + F32 f32; + deserStatus = msg.deserialize(f32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument b + bool b; + deserStatus = msg.deserialize(b); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument str1 + char __fprime_ac_str1_buffer[Fw::StringBase::BUFFER_SIZE(80)]; + Fw::ExternalString str1(__fprime_ac_str1_buffer, sizeof __fprime_ac_str1_buffer); + deserStatus = msg.deserialize(str1); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument e + E e; + deserStatus = msg.deserialize(e); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument a + A a; + deserStatus = msg.deserialize(a); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument s + S s; + deserStatus = msg.deserialize(s); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + // Call handler function + this->assertAsync_handler( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + + break; + } + + // Handle async input port blockAsync + case BLOCKASYNC_TYPED: { + // Deserialize argument u32 + U32 u32; + deserStatus = msg.deserialize(u32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument f32 + F32 f32; + deserStatus = msg.deserialize(f32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument b + bool b; + deserStatus = msg.deserialize(b); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument str1 + char __fprime_ac_str1_buffer[Fw::StringBase::BUFFER_SIZE(80)]; + Fw::ExternalString str1(__fprime_ac_str1_buffer, sizeof __fprime_ac_str1_buffer); + deserStatus = msg.deserialize(str1); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument e + E e; + deserStatus = msg.deserialize(e); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument a + A a; + deserStatus = msg.deserialize(a); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument s + S s; + deserStatus = msg.deserialize(s); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + // Call handler function + this->blockAsync_handler( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + + break; + } + + // Handle async input port dropAsync + case DROPASYNC_TYPED: { + // Deserialize argument u32 + U32 u32; + deserStatus = msg.deserialize(u32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument f32 + F32 f32; + deserStatus = msg.deserialize(f32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument b + bool b; + deserStatus = msg.deserialize(b); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument str1 + char __fprime_ac_str1_buffer[Fw::StringBase::BUFFER_SIZE(80)]; + Fw::ExternalString str1(__fprime_ac_str1_buffer, sizeof __fprime_ac_str1_buffer); + deserStatus = msg.deserialize(str1); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument e + E e; + deserStatus = msg.deserialize(e); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument a + A a; + deserStatus = msg.deserialize(a); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument s + S s; + deserStatus = msg.deserialize(s); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + // Call handler function + this->dropAsync_handler( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + + break; + } + + // Handle async input port hookAsync + case HOOKASYNC_TYPED: { + // Deserialize argument u32 + U32 u32; + deserStatus = msg.deserialize(u32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument f32 + F32 f32; + deserStatus = msg.deserialize(f32); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument b + bool b; + deserStatus = msg.deserialize(b); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument str1 + char __fprime_ac_str1_buffer[Fw::StringBase::BUFFER_SIZE(80)]; + Fw::ExternalString str1(__fprime_ac_str1_buffer, sizeof __fprime_ac_str1_buffer); + deserStatus = msg.deserialize(str1); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument e + E e; + deserStatus = msg.deserialize(e); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument a + A a; + deserStatus = msg.deserialize(a); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize argument s + S s; + deserStatus = msg.deserialize(s); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + // Call handler function + this->hookAsync_handler( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); + + break; + } + + // Handle async input port serialAsyncHook + case SERIALASYNCHOOK_SERIAL: { + // Deserialize serialized buffer into new buffer + U8 handBuff[this->m_msgSize]; + Fw::ExternalSerializeBuffer serHandBuff(handBuff,this->m_msgSize); + deserStatus = msg.deserialize(serHandBuff); + FW_ASSERT( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + this->serialAsyncHook_handler(portNum, serHandBuff); + + break; + } + + // Handle command CMD_HOOK + case CMD_CMD_HOOK: { + // Deserialize opcode + FwOpcodeType opCode = 0; + deserStatus = msg.deserialize(opCode); + FW_ASSERT ( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize command sequence + U32 cmdSeq = 0; + deserStatus = msg.deserialize(cmdSeq); + FW_ASSERT ( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize command argument buffer + Fw::CmdArgBuffer args; + deserStatus = msg.deserialize(args); + FW_ASSERT ( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Reset buffer + args.resetDeser(); + + // Make sure there was no data left over. + // That means the argument buffer size was incorrect. +#if FW_CMD_CHECK_RESIDUAL + if (args.getBuffLeft() != 0) { + if (this->m_cmdResponseOut_OutputPort[0].isConnected()) { + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::FORMAT_ERROR); + } + // Don't crash the task if bad arguments were passed from the ground + break; + } +#endif + + // Call handler function + this->CMD_HOOK_cmdHandler(opCode, cmdSeq); + + break; + } + + // Handle command CMD_PARAMS_PRIORITY_HOOK + case CMD_CMD_PARAMS_PRIORITY_HOOK: { + // Deserialize opcode + FwOpcodeType opCode = 0; + deserStatus = msg.deserialize(opCode); + FW_ASSERT ( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize command sequence + U32 cmdSeq = 0; + deserStatus = msg.deserialize(cmdSeq); + FW_ASSERT ( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Deserialize command argument buffer + Fw::CmdArgBuffer args; + deserStatus = msg.deserialize(args); + FW_ASSERT ( + deserStatus == Fw::FW_SERIALIZE_OK, + static_cast(deserStatus) + ); + + // Reset buffer + args.resetDeser(); + + // Deserialize argument u32 + U32 u32; + deserStatus = args.deserialize(u32); + if (deserStatus != Fw::FW_SERIALIZE_OK) { + if (this->m_cmdResponseOut_OutputPort[0].isConnected()) { + this->cmdResponse_out( + opCode, + cmdSeq, + Fw::CmdResponse::FORMAT_ERROR + ); + } + // Don't crash the task if bad arguments were passed from the ground + break; + } + + // Make sure there was no data left over. + // That means the argument buffer size was incorrect. +#if FW_CMD_CHECK_RESIDUAL + if (args.getBuffLeft() != 0) { + if (this->m_cmdResponseOut_OutputPort[0].isConnected()) { + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::FORMAT_ERROR); + } + // Don't crash the task if bad arguments were passed from the ground + break; + } +#endif + + // Call handler function + this->CMD_PARAMS_PRIORITY_HOOK_cmdHandler( + opCode, cmdSeq, + u32 + ); + + break; + } + + // Handle internal interface internalHookDrop + case INT_IF_INTERNALHOOKDROP: { + // Make sure there was no data left over. + // That means the buffer size was incorrect. + FW_ASSERT( + msg.getBuffLeft() == 0, + static_cast(msg.getBuffLeft()) + ); + + // Call handler function + this->internalHookDrop_internalInterfaceHandler(); + + break; + } + + default: + return MSG_DISPATCH_ERROR; + } + + return MSG_DISPATCH_OK; +} + +// ---------------------------------------------------------------------- +// Calls for messages received on special input ports +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + m_p_cmdIn_in( + Fw::PassiveComponentBase* callComp, + FwIndexType portNum, + FwOpcodeType opCode, + U32 cmdSeq, + Fw::CmdArgBuffer& args + ) +{ + FW_ASSERT(callComp); + QueuedOverflowComponentBase* compPtr = static_cast(callComp); + + const U32 idBase = callComp->getIdBase(); + FW_ASSERT(opCode >= idBase, static_cast(opCode), static_cast(idBase)); + + // Select base class function based on opcode + switch (opCode - idBase) { + case OPCODE_CMD_HOOK: { + compPtr->CMD_HOOK_cmdHandlerBase( + opCode, + cmdSeq, + args + ); + break; + } + + case OPCODE_CMD_PARAMS_PRIORITY_HOOK: { + compPtr->CMD_PARAMS_PRIORITY_HOOK_cmdHandlerBase( + opCode, + cmdSeq, + args + ); + break; + } + } +} + +void QueuedOverflowComponentBase :: + m_p_productRecvInHook_in( + Fw::PassiveComponentBase* callComp, + FwIndexType portNum, + FwDpIdType id, + const Fw::Buffer& buffer, + const Fw::Success& status + ) +{ + FW_ASSERT(callComp); + QueuedOverflowComponentBase* compPtr = static_cast(callComp); + compPtr->productRecvInHook_handlerBase( + portNum, + id, + buffer, + status + ); +} + +// ---------------------------------------------------------------------- +// Calls for messages received on typed input ports +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + m_p_assertAsync_in( + Fw::PassiveComponentBase* callComp, + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + FW_ASSERT(callComp); + QueuedOverflowComponentBase* compPtr = static_cast(callComp); + compPtr->assertAsync_handlerBase( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); +} + +void QueuedOverflowComponentBase :: + m_p_blockAsync_in( + Fw::PassiveComponentBase* callComp, + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + FW_ASSERT(callComp); + QueuedOverflowComponentBase* compPtr = static_cast(callComp); + compPtr->blockAsync_handlerBase( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); +} + +void QueuedOverflowComponentBase :: + m_p_dropAsync_in( + Fw::PassiveComponentBase* callComp, + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + FW_ASSERT(callComp); + QueuedOverflowComponentBase* compPtr = static_cast(callComp); + compPtr->dropAsync_handlerBase( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); +} + +void QueuedOverflowComponentBase :: + m_p_hookAsync_in( + Fw::PassiveComponentBase* callComp, + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + FW_ASSERT(callComp); + QueuedOverflowComponentBase* compPtr = static_cast(callComp); + compPtr->hookAsync_handlerBase( + portNum, + u32, + f32, + b, + str1, + e, + a, + s + ); +} + +// ---------------------------------------------------------------------- +// Calls for messages received on serial input ports +// ---------------------------------------------------------------------- + +#if FW_PORT_SERIALIZATION + +void QueuedOverflowComponentBase :: + m_p_serialAsyncHook_in( + Fw::PassiveComponentBase* callComp, + FwIndexType portNum, + Fw::SerializeBufferBase& buffer + ) +{ + FW_ASSERT(callComp); + QueuedOverflowComponentBase* compPtr = static_cast(callComp); + compPtr->serialAsyncHook_handlerBase( + portNum, + buffer + ); +} + +#endif + +// ---------------------------------------------------------------------- +// Private data product handling functions +// ---------------------------------------------------------------------- + +void QueuedOverflowComponentBase :: + productRecvInHook_handler( + const FwIndexType portNum, + FwDpIdType id, + const Fw::Buffer& buffer, + const Fw::Success& status + ) +{ + (void) portNum; + (void) id; + (void) buffer; + (void) status; + // No data products defined +} diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.hpp new file mode 100644 index 000000000..72069e049 --- /dev/null +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.hpp @@ -0,0 +1,1040 @@ +// ====================================================================== +// \title QueuedOverflowComponentAc.hpp +// \author Generated by fpp-to-cpp +// \brief hpp file for QueuedOverflow component base class +// ====================================================================== + +#ifndef QueuedOverflowComponentAc_HPP +#define QueuedOverflowComponentAc_HPP + +#include "FpConfig.hpp" +#include "Fw/Cmd/CmdPortAc.hpp" +#include "Fw/Cmd/CmdRegPortAc.hpp" +#include "Fw/Cmd/CmdResponsePortAc.hpp" +#include "Fw/Cmd/CmdString.hpp" +#include "Fw/Comp/ActiveComponentBase.hpp" +#include "Fw/Dp/DpResponsePortAc.hpp" +#include "Fw/Log/LogPortAc.hpp" +#if FW_ENABLE_TEXT_LOGGING == 1 +#include "Fw/Log/LogTextPortAc.hpp" +#endif +#include "Fw/Port/InputSerializePort.hpp" +#include "Fw/Port/OutputSerializePort.hpp" +#include "Fw/Prm/PrmGetPortAc.hpp" +#include "Fw/Prm/PrmSetPortAc.hpp" +#include "Fw/Time/TimePortAc.hpp" +#include "Fw/Tlm/TlmPortAc.hpp" +#include "Fw/Types/InternalInterfaceString.hpp" +#include "TypedPortAc.hpp" + +static_assert( + FW_PORT_SERIALIZATION == 1, + "QueuedOverflow component requires serialization" +); + +//! \class QueuedOverflowComponentBase +//! \brief Auto-generated base for QueuedOverflow component +//! +//! An active component with overflow behavior +class QueuedOverflowComponentBase : + public Fw::QueuedComponentBase +{ + + // ---------------------------------------------------------------------- + // Friend classes + // ---------------------------------------------------------------------- + + //! Friend class for white-box testing + friend class QueuedOverflowComponentBaseFriend; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Constants + // ---------------------------------------------------------------------- + + //! Enumerations for numbers of special input ports + enum { + NUM_CMDIN_INPUT_PORTS = 1, + NUM_PRODUCTRECVINHOOK_INPUT_PORTS = 1, + }; + + //! Enumerations for numbers of typed input ports + enum { + NUM_ASSERTASYNC_INPUT_PORTS = 1, + NUM_BLOCKASYNC_INPUT_PORTS = 1, + NUM_DROPASYNC_INPUT_PORTS = 1, + NUM_HOOKASYNC_INPUT_PORTS = 1, + }; + + //! Enumerations for numbers of serial input ports + enum { + NUM_SERIALASYNCHOOK_INPUT_PORTS = 1, + }; + + //! Enumerations for numbers of special output ports + enum { + NUM_CMDREGOUT_OUTPUT_PORTS = 1, + NUM_CMDRESPONSEOUT_OUTPUT_PORTS = 1, + NUM_EVENTOUT_OUTPUT_PORTS = 1, + NUM_PRMGETOUT_OUTPUT_PORTS = 1, + NUM_PRMSETOUT_OUTPUT_PORTS = 1, + NUM_TEXTEVENTOUT_OUTPUT_PORTS = 1, + NUM_TIMEGETOUT_OUTPUT_PORTS = 1, + NUM_TLMOUT_OUTPUT_PORTS = 1, + }; + + //! Command opcodes + enum { + OPCODE_CMD_HOOK = 0x0, //!< A command with queue full 'hook' behavior + OPCODE_CMD_PARAMS_PRIORITY_HOOK = 0x1, //!< A command with params, priority, and queue full 'hook' behavior + }; + + public: + + // ---------------------------------------------------------------------- + // Component initialization + // ---------------------------------------------------------------------- + + //! Initialize QueuedOverflowComponentBase object + void init( + FwQueueSizeType queueDepth, //!< The queue depth + FwSizeType msgSize, //!< The message size + FwEnumStoreType instance = 0 //!< The instance number + ); + + public: + + // ---------------------------------------------------------------------- + // Getters for special input ports + // ---------------------------------------------------------------------- + + //! Get special input port at index + //! + //! \return cmdIn[portNum] + Fw::InputCmdPort* get_cmdIn_InputPort( + FwIndexType portNum //!< The port number + ); + + //! Get special input port at index + //! + //! \return productRecvInHook[portNum] + Fw::InputDpResponsePort* get_productRecvInHook_InputPort( + FwIndexType portNum //!< The port number + ); + + public: + + // ---------------------------------------------------------------------- + // Getters for typed input ports + // ---------------------------------------------------------------------- + + //! Get typed input port at index + //! + //! \return assertAsync[portNum] + Ports::InputTypedPort* get_assertAsync_InputPort( + FwIndexType portNum //!< The port number + ); + + //! Get typed input port at index + //! + //! \return blockAsync[portNum] + Ports::InputTypedPort* get_blockAsync_InputPort( + FwIndexType portNum //!< The port number + ); + + //! Get typed input port at index + //! + //! \return dropAsync[portNum] + Ports::InputTypedPort* get_dropAsync_InputPort( + FwIndexType portNum //!< The port number + ); + + //! Get typed input port at index + //! + //! \return hookAsync[portNum] + Ports::InputTypedPort* get_hookAsync_InputPort( + FwIndexType portNum //!< The port number + ); + + public: + + // ---------------------------------------------------------------------- + // Getters for serial input ports + // ---------------------------------------------------------------------- + + //! Get serial input port at index + //! + //! \return serialAsyncHook[portNum] + Fw::InputSerializePort* get_serialAsyncHook_InputPort( + FwIndexType portNum //!< The port number + ); + + public: + + // ---------------------------------------------------------------------- + // Connect input ports to special output ports + // ---------------------------------------------------------------------- + + //! Connect port to cmdRegOut[portNum] + void set_cmdRegOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputCmdRegPort* port //!< The input port + ); + + //! Connect port to cmdResponseOut[portNum] + void set_cmdResponseOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputCmdResponsePort* port //!< The input port + ); + + //! Connect port to eventOut[portNum] + void set_eventOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputLogPort* port //!< The input port + ); + + //! Connect port to prmGetOut[portNum] + void set_prmGetOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputPrmGetPort* port //!< The input port + ); + + //! Connect port to prmSetOut[portNum] + void set_prmSetOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputPrmSetPort* port //!< The input port + ); + +#if FW_ENABLE_TEXT_LOGGING == 1 + + //! Connect port to textEventOut[portNum] + void set_textEventOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputLogTextPort* port //!< The input port + ); + +#endif + + //! Connect port to timeGetOut[portNum] + void set_timeGetOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputTimePort* port //!< The input port + ); + + //! Connect port to tlmOut[portNum] + void set_tlmOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputTlmPort* port //!< The input port + ); + +#if FW_PORT_SERIALIZATION + + public: + + // ---------------------------------------------------------------------- + // Connect serial input ports to special output ports + // ---------------------------------------------------------------------- + + //! Connect port to cmdRegOut[portNum] + void set_cmdRegOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputSerializePort* port //!< The port + ); + + //! Connect port to cmdResponseOut[portNum] + void set_cmdResponseOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputSerializePort* port //!< The port + ); + + //! Connect port to eventOut[portNum] + void set_eventOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputSerializePort* port //!< The port + ); + + //! Connect port to prmSetOut[portNum] + void set_prmSetOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputSerializePort* port //!< The port + ); + +#if FW_ENABLE_TEXT_LOGGING == 1 + + //! Connect port to textEventOut[portNum] + void set_textEventOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputSerializePort* port //!< The port + ); + +#endif + + //! Connect port to timeGetOut[portNum] + void set_timeGetOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputSerializePort* port //!< The port + ); + + //! Connect port to tlmOut[portNum] + void set_tlmOut_OutputPort( + FwIndexType portNum, //!< The port number + Fw::InputSerializePort* port //!< The port + ); + +#endif + + public: + + // ---------------------------------------------------------------------- + // Command registration + // ---------------------------------------------------------------------- + + //! \brief Register commands with the Command Dispatcher + //! + //! Connect the dispatcher first + void regCommands(); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Component construction and destruction + // ---------------------------------------------------------------------- + + //! Construct QueuedOverflowComponentBase object + QueuedOverflowComponentBase( + const char* compName = "" //!< The component name + ); + + //! Destroy QueuedOverflowComponentBase object + virtual ~QueuedOverflowComponentBase(); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Getters for numbers of special input ports + // ---------------------------------------------------------------------- + + //! Get the number of cmdIn input ports + //! + //! \return The number of cmdIn input ports + FwIndexType getNum_cmdIn_InputPorts() const; + + //! Get the number of productRecvInHook input ports + //! + //! \return The number of productRecvInHook input ports + FwIndexType getNum_productRecvInHook_InputPorts() const; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Getters for numbers of typed input ports + // ---------------------------------------------------------------------- + + //! Get the number of assertAsync input ports + //! + //! \return The number of assertAsync input ports + FwIndexType getNum_assertAsync_InputPorts() const; + + //! Get the number of blockAsync input ports + //! + //! \return The number of blockAsync input ports + FwIndexType getNum_blockAsync_InputPorts() const; + + //! Get the number of dropAsync input ports + //! + //! \return The number of dropAsync input ports + FwIndexType getNum_dropAsync_InputPorts() const; + + //! Get the number of hookAsync input ports + //! + //! \return The number of hookAsync input ports + FwIndexType getNum_hookAsync_InputPorts() const; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Getters for numbers of serial input ports + // ---------------------------------------------------------------------- + + //! Get the number of serialAsyncHook input ports + //! + //! \return The number of serialAsyncHook input ports + FwIndexType getNum_serialAsyncHook_InputPorts() const; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Getters for numbers of special output ports + // ---------------------------------------------------------------------- + + //! Get the number of cmdRegOut output ports + //! + //! \return The number of cmdRegOut output ports + FwIndexType getNum_cmdRegOut_OutputPorts() const; + + //! Get the number of cmdResponseOut output ports + //! + //! \return The number of cmdResponseOut output ports + FwIndexType getNum_cmdResponseOut_OutputPorts() const; + + //! Get the number of eventOut output ports + //! + //! \return The number of eventOut output ports + FwIndexType getNum_eventOut_OutputPorts() const; + + //! Get the number of prmGetOut output ports + //! + //! \return The number of prmGetOut output ports + FwIndexType getNum_prmGetOut_OutputPorts() const; + + //! Get the number of prmSetOut output ports + //! + //! \return The number of prmSetOut output ports + FwIndexType getNum_prmSetOut_OutputPorts() const; + +#if FW_ENABLE_TEXT_LOGGING == 1 + + //! Get the number of textEventOut output ports + //! + //! \return The number of textEventOut output ports + FwIndexType getNum_textEventOut_OutputPorts() const; + +#endif + + //! Get the number of timeGetOut output ports + //! + //! \return The number of timeGetOut output ports + FwIndexType getNum_timeGetOut_OutputPorts() const; + + //! Get the number of tlmOut output ports + //! + //! \return The number of tlmOut output ports + FwIndexType getNum_tlmOut_OutputPorts() const; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Connection status queries for special output ports + // ---------------------------------------------------------------------- + + //! Check whether port cmdRegOut is connected + //! + //! \return Whether port cmdRegOut is connected + bool isConnected_cmdRegOut_OutputPort( + FwIndexType portNum //!< The port number + ); + + //! Check whether port cmdResponseOut is connected + //! + //! \return Whether port cmdResponseOut is connected + bool isConnected_cmdResponseOut_OutputPort( + FwIndexType portNum //!< The port number + ); + + //! Check whether port eventOut is connected + //! + //! \return Whether port eventOut is connected + bool isConnected_eventOut_OutputPort( + FwIndexType portNum //!< The port number + ); + + //! Check whether port prmGetOut is connected + //! + //! \return Whether port prmGetOut is connected + bool isConnected_prmGetOut_OutputPort( + FwIndexType portNum //!< The port number + ); + + //! Check whether port prmSetOut is connected + //! + //! \return Whether port prmSetOut is connected + bool isConnected_prmSetOut_OutputPort( + FwIndexType portNum //!< The port number + ); + +#if FW_ENABLE_TEXT_LOGGING == 1 + + //! Check whether port textEventOut is connected + //! + //! \return Whether port textEventOut is connected + bool isConnected_textEventOut_OutputPort( + FwIndexType portNum //!< The port number + ); + +#endif + + //! Check whether port timeGetOut is connected + //! + //! \return Whether port timeGetOut is connected + bool isConnected_timeGetOut_OutputPort( + FwIndexType portNum //!< The port number + ); + + //! Check whether port tlmOut is connected + //! + //! \return Whether port tlmOut is connected + bool isConnected_tlmOut_OutputPort( + FwIndexType portNum //!< The port number + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Port handler base-class functions for special input ports + // + // Call these functions directly to bypass the corresponding ports + // ---------------------------------------------------------------------- + + //! Handler base-class function for input port productRecvInHook + void productRecvInHook_handlerBase( + FwIndexType portNum, //!< The port number + FwDpIdType id, //!< The container ID + const Fw::Buffer& buffer, //!< The buffer + const Fw::Success& status //!< The status + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Handlers to implement for typed input ports + // ---------------------------------------------------------------------- + + //! Handler for input port assertAsync + virtual void assertAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) = 0; + + //! Handler for input port blockAsync + virtual void blockAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) = 0; + + //! Handler for input port dropAsync + virtual void dropAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) = 0; + + //! Handler for input port hookAsync + virtual void hookAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) = 0; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Port handler base-class functions for typed input ports + // + // Call these functions directly to bypass the corresponding ports + // ---------------------------------------------------------------------- + + //! Handler base-class function for input port assertAsync + void assertAsync_handlerBase( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Handler base-class function for input port blockAsync + void blockAsync_handlerBase( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Handler base-class function for input port dropAsync + void dropAsync_handlerBase( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Handler base-class function for input port hookAsync + void hookAsync_handlerBase( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Handlers to implement for serial input ports + // ---------------------------------------------------------------------- + + //! Handler for input port serialAsyncHook + virtual void serialAsyncHook_handler( + FwIndexType portNum, //!< The port number + Fw::SerializeBufferBase& buffer //!< The serialization buffer + ) = 0; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Port handler base-class functions for serial input ports + // + // Call these functions directly to bypass the corresponding ports + // ---------------------------------------------------------------------- + + //! Handler base-class function for input port serialAsyncHook + void serialAsyncHook_handlerBase( + FwIndexType portNum, //!< The port number + Fw::SerializeBufferBase& buffer //!< The serialization buffer + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Pre-message hooks for special async input ports + // + // Each of these functions is invoked just before processing a message + // on the corresponding port. By default, they do nothing. You can + // override them to provide specific pre-message behavior. + // ---------------------------------------------------------------------- + + //! Pre-message hook for async input port productRecvInHook + virtual void productRecvInHook_preMsgHook( + FwIndexType portNum, //!< The port number + FwDpIdType id, //!< The container ID + const Fw::Buffer& buffer, //!< The buffer + const Fw::Success& status //!< The status + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Pre-message hooks for typed async input ports + // + // Each of these functions is invoked just before processing a message + // on the corresponding port. By default, they do nothing. You can + // override them to provide specific pre-message behavior. + // ---------------------------------------------------------------------- + + //! Pre-message hook for async input port assertAsync + virtual void assertAsync_preMsgHook( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Pre-message hook for async input port blockAsync + virtual void blockAsync_preMsgHook( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Pre-message hook for async input port dropAsync + virtual void dropAsync_preMsgHook( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Pre-message hook for async input port hookAsync + virtual void hookAsync_preMsgHook( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Pre-message hooks for serial async input ports + // + // Each of these functions is invoked just before processing a message + // on the corresponding port. By default, they do nothing. You can + // override them to provide specific pre-message behavior. + // ---------------------------------------------------------------------- + + //! Pre-message hook for async input port serialAsyncHook + virtual void serialAsyncHook_preMsgHook( + FwIndexType portNum, //!< The port number + Fw::SerializeBufferBase& buffer //!< The serialization buffer + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Internal interface handlers + // ---------------------------------------------------------------------- + + //! Internal interface handler for internalHookDrop + virtual void internalHookDrop_internalInterfaceHandler() = 0; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Internal interface base-class functions + // ---------------------------------------------------------------------- + + //! Internal interface base-class function for internalHookDrop + void internalHookDrop_internalInterfaceInvoke(); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Command response + // ---------------------------------------------------------------------- + + //! Emit command response + void cmdResponse_out( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq, //!< The command sequence number + Fw::CmdResponse response //!< The command response + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Command handlers to implement + // ---------------------------------------------------------------------- + + //! Handler for command CMD_HOOK + //! + //! A command with queue full 'hook' behavior + virtual void CMD_HOOK_cmdHandler( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq //!< The command sequence number + ) = 0; + + //! Handler for command CMD_PARAMS_PRIORITY_HOOK + //! + //! A command with params, priority, and queue full 'hook' behavior + virtual void CMD_PARAMS_PRIORITY_HOOK_cmdHandler( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq, //!< The command sequence number + U32 u32 + ) = 0; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Command handler base-class functions + // + // Call these functions directly to bypass the command input port + // ---------------------------------------------------------------------- + + //! Base-class handler function for command CMD_HOOK + //! + //! A command with queue full 'hook' behavior + void CMD_HOOK_cmdHandlerBase( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq, //!< The command sequence number + Fw::CmdArgBuffer& args //!< The command argument buffer + ); + + //! Base-class handler function for command CMD_PARAMS_PRIORITY_HOOK + //! + //! A command with params, priority, and queue full 'hook' behavior + void CMD_PARAMS_PRIORITY_HOOK_cmdHandlerBase( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq, //!< The command sequence number + Fw::CmdArgBuffer& args //!< The command argument buffer + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Pre-message hooks for async commands + // + // Each of these functions is invoked just before processing the + // corresponding command. By default they do nothing. You can + // override them to provide specific pre-command behavior. + // ---------------------------------------------------------------------- + + //! Pre-message hook for command CMD_HOOK + virtual void CMD_HOOK_preMsgHook( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq //!< The command sequence number + ); + + //! Pre-message hook for command CMD_PARAMS_PRIORITY_HOOK + virtual void CMD_PARAMS_PRIORITY_HOOK_preMsgHook( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq //!< The command sequence number + ); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Time + // ---------------------------------------------------------------------- + + //! Get the time + //! + //! \\return The current time + Fw::Time getTime(); + + PROTECTED: + + // ---------------------------------------------------------------------- + // Message dispatch functions + // ---------------------------------------------------------------------- + + //! Called in the message loop to dispatch a message from the queue + virtual MsgDispatchStatus doDispatch(); + + PRIVATE: + + // ---------------------------------------------------------------------- + // Calls for messages received on special input ports + // ---------------------------------------------------------------------- + + //! Callback for port cmdIn + static void m_p_cmdIn_in( + Fw::PassiveComponentBase* callComp, //!< The component instance + FwIndexType portNum, //!< The port number + FwOpcodeType opCode, //!< Command Op Code + U32 cmdSeq, //!< Command Sequence + Fw::CmdArgBuffer& args //!< Buffer containing arguments + ); + + //! Callback for port productRecvInHook + static void m_p_productRecvInHook_in( + Fw::PassiveComponentBase* callComp, //!< The component instance + FwIndexType portNum, //!< The port number + FwDpIdType id, //!< The container ID + const Fw::Buffer& buffer, //!< The buffer + const Fw::Success& status //!< The status + ); + + PRIVATE: + + // ---------------------------------------------------------------------- + // Calls for messages received on typed input ports + // ---------------------------------------------------------------------- + + //! Callback for port assertAsync + static void m_p_assertAsync_in( + Fw::PassiveComponentBase* callComp, //!< The component instance + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Callback for port blockAsync + static void m_p_blockAsync_in( + Fw::PassiveComponentBase* callComp, //!< The component instance + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Callback for port dropAsync + static void m_p_dropAsync_in( + Fw::PassiveComponentBase* callComp, //!< The component instance + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + //! Callback for port hookAsync + static void m_p_hookAsync_in( + Fw::PassiveComponentBase* callComp, //!< The component instance + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ); + + PRIVATE: + + // ---------------------------------------------------------------------- + // Calls for messages received on serial input ports + // ---------------------------------------------------------------------- + +#if FW_PORT_SERIALIZATION + + //! Callback for port serialAsyncHook + static void m_p_serialAsyncHook_in( + Fw::PassiveComponentBase* callComp, //!< The component instance + FwIndexType portNum, //!< The port number + Fw::SerializeBufferBase& buffer //!< The serialization buffer + ); + +#endif + + PRIVATE: + + // ---------------------------------------------------------------------- + // Private data product handling functions + // ---------------------------------------------------------------------- + + //! Handler implementation for productRecvInHook + void productRecvInHook_handler( + const FwIndexType portNum, //!< The port number + FwDpIdType id, //!< The container id + const Fw::Buffer& buffer, //!< The buffer + const Fw::Success& status //!< The buffer status + ); + + PRIVATE: + + // ---------------------------------------------------------------------- + // Special input ports + // ---------------------------------------------------------------------- + + //! Input port cmdIn + Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS]; + + //! Input port productRecvInHook + Fw::InputDpResponsePort m_productRecvInHook_InputPort[NUM_PRODUCTRECVINHOOK_INPUT_PORTS]; + + PRIVATE: + + // ---------------------------------------------------------------------- + // Typed input ports + // ---------------------------------------------------------------------- + + //! Input port assertAsync + Ports::InputTypedPort m_assertAsync_InputPort[NUM_ASSERTASYNC_INPUT_PORTS]; + + //! Input port blockAsync + Ports::InputTypedPort m_blockAsync_InputPort[NUM_BLOCKASYNC_INPUT_PORTS]; + + //! Input port dropAsync + Ports::InputTypedPort m_dropAsync_InputPort[NUM_DROPASYNC_INPUT_PORTS]; + + //! Input port hookAsync + Ports::InputTypedPort m_hookAsync_InputPort[NUM_HOOKASYNC_INPUT_PORTS]; + + PRIVATE: + + // ---------------------------------------------------------------------- + // Serial input ports + // ---------------------------------------------------------------------- + + //! Input port serialAsyncHook + Fw::InputSerializePort m_serialAsyncHook_InputPort[NUM_SERIALASYNCHOOK_INPUT_PORTS]; + + PRIVATE: + + // ---------------------------------------------------------------------- + // Special output ports + // ---------------------------------------------------------------------- + + //! Output port cmdRegOut + Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS]; + + //! Output port cmdResponseOut + Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS]; + + //! Output port eventOut + Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS]; + + //! Output port prmGetOut + Fw::OutputPrmGetPort m_prmGetOut_OutputPort[NUM_PRMGETOUT_OUTPUT_PORTS]; + + //! Output port prmSetOut + Fw::OutputPrmSetPort m_prmSetOut_OutputPort[NUM_PRMSETOUT_OUTPUT_PORTS]; + +#if FW_ENABLE_TEXT_LOGGING == 1 + + //! Output port textEventOut + Fw::OutputLogTextPort m_textEventOut_OutputPort[NUM_TEXTEVENTOUT_OUTPUT_PORTS]; + +#endif + + //! Output port timeGetOut + Fw::OutputTimePort m_timeGetOut_OutputPort[NUM_TIMEGETOUT_OUTPUT_PORTS]; + + //! Output port tlmOut + Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS]; + + PRIVATE: + + //! Stores max message size + FwSizeType m_msgSize; + +}; + +#endif diff --git a/compiler/tools/fpp-to-cpp/test/component/base/run.sh b/compiler/tools/fpp-to-cpp/test/component/base/run.sh index c400bb222..015fc9243 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/run.sh +++ b/compiler/tools/fpp-to-cpp/test/component/base/run.sh @@ -41,6 +41,7 @@ active() diff_cpp ActiveAsyncProductPortsOnlyComponent && \ diff_cpp ActiveAsyncProductsComponent && \ diff_cpp ActiveCommandsComponent && \ + diff_cpp ActiveOverflowComponent && \ diff_cpp ActiveEventsComponent && \ diff_cpp ActiveGetProductsComponent && \ diff_cpp ActiveGuardedProductsComponent && \ @@ -58,6 +59,7 @@ queued() diff_cpp QueuedAsyncProductPortsOnlyComponent && \ diff_cpp QueuedAsyncProductsComponent && \ diff_cpp QueuedCommandsComponent && \ + diff_cpp QueuedOverflowComponent && \ diff_cpp QueuedEventsComponent && \ diff_cpp QueuedGetProductsComponent && \ diff_cpp QueuedGuardedProductsComponent && \ diff --git a/compiler/tools/fpp-to-cpp/test/component/base/update-ref.sh b/compiler/tools/fpp-to-cpp/test/component/base/update-ref.sh index 68776ed99..7aa6ab698 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/update-ref.sh +++ b/compiler/tools/fpp-to-cpp/test/component/base/update-ref.sh @@ -41,6 +41,7 @@ active() move_cpp ActiveAsyncProductPortsOnlyComponent move_cpp ActiveAsyncProductsComponent move_cpp ActiveCommandsComponent + move_cpp ActiveOverflowComponent move_cpp ActiveEventsComponent move_cpp ActiveGetProductsComponent move_cpp ActiveGuardedProductsComponent @@ -58,6 +59,7 @@ queued() move_cpp QueuedAsyncProductPortsOnlyComponent move_cpp QueuedAsyncProductsComponent move_cpp QueuedCommandsComponent + move_cpp QueuedOverflowComponent move_cpp QueuedEventsComponent move_cpp QueuedGetProductsComponent move_cpp QueuedGuardedProductsComponent diff --git a/compiler/tools/fpp-to-cpp/test/component/include/overflow_commands.fppi b/compiler/tools/fpp-to-cpp/test/component/include/overflow_commands.fppi new file mode 100644 index 000000000..6882d557f --- /dev/null +++ b/compiler/tools/fpp-to-cpp/test/component/include/overflow_commands.fppi @@ -0,0 +1,7 @@ +@ A command with queue full 'hook' behavior +async command CMD_HOOK hook + +@ A command with params, priority, and queue full 'hook' behavior +async command CMD_PARAMS_PRIORITY_HOOK( + u32: U32 +) priority 30 hook diff --git a/compiler/tools/fpp-to-cpp/test/component/include/overflow_internal_ports.fppi b/compiler/tools/fpp-to-cpp/test/component/include/overflow_internal_ports.fppi new file mode 100644 index 000000000..53f3780ea --- /dev/null +++ b/compiler/tools/fpp-to-cpp/test/component/include/overflow_internal_ports.fppi @@ -0,0 +1,6 @@ +# ---------------------------------------------------------------------- +# Internal ports +# ---------------------------------------------------------------------- + +@ An internal port with hook queue full behavior +internal port internalHookDrop hook diff --git a/compiler/tools/fpp-to-cpp/test/component/include/overflow_product_ports.fppi b/compiler/tools/fpp-to-cpp/test/component/include/overflow_product_ports.fppi new file mode 100644 index 000000000..2c619820a --- /dev/null +++ b/compiler/tools/fpp-to-cpp/test/component/include/overflow_product_ports.fppi @@ -0,0 +1,5 @@ +# ---------------------------------------------------------------------- +# Data product ports (async receive) +# ---------------------------------------------------------------------- +@ Data product receive port with overflow hook +async product recv port productRecvInHook hook diff --git a/compiler/tools/fpp-to-cpp/test/component/include/overflow_serial_ports.fppi b/compiler/tools/fpp-to-cpp/test/component/include/overflow_serial_ports.fppi new file mode 100644 index 000000000..a64c5be37 --- /dev/null +++ b/compiler/tools/fpp-to-cpp/test/component/include/overflow_serial_ports.fppi @@ -0,0 +1,2 @@ +@ A serial async input port with overflow hook +async input port serialAsyncHook: serial hook diff --git a/compiler/tools/fpp-to-cpp/test/component/include/overflow_typed_ports.fppi b/compiler/tools/fpp-to-cpp/test/component/include/overflow_typed_ports.fppi new file mode 100644 index 000000000..d37ca0c38 --- /dev/null +++ b/compiler/tools/fpp-to-cpp/test/component/include/overflow_typed_ports.fppi @@ -0,0 +1,11 @@ +@ A port with drop behavior +async input port dropAsync: Ports.Typed drop + +@ A port with assert behavior +async input port assertAsync: Ports.Typed assert + +@ A port with block behavior +async input port blockAsync: Ports.Typed block + +@ A port with hook behavior +async input port hookAsync: Ports.Typed hook diff --git a/compiler/tools/fpp-to-cpp/test/component/queued.fpp b/compiler/tools/fpp-to-cpp/test/component/queued.fpp index 831dad003..1ee65f86a 100644 --- a/compiler/tools/fpp-to-cpp/test/component/queued.fpp +++ b/compiler/tools/fpp-to-cpp/test/component/queued.fpp @@ -16,6 +16,16 @@ queued component QueuedTest { } +@ An active component with overflow behavior +queued component QueuedOverflow { + include "include/special_ports.fppi" + include "include/overflow_commands.fppi" + include "include/overflow_typed_ports.fppi" + include "include/overflow_product_ports.fppi" + include "include/overflow_serial_ports.fppi" + include "include/overflow_internal_ports.fppi" +} + @ A queued component with serial ports queued component QueuedSerial { From 11d00f0dcee6df2cfbca9e0f8d05909f0b2d8017 Mon Sep 17 00:00:00 2001 From: M Starch Date: Mon, 12 Aug 2024 10:13:55 -0700 Subject: [PATCH 05/11] Adding overflow hook function generation --- .../ComponentCommands.scala | 30 +++++- .../ComponentCppWriterUtils.scala | 62 +++++++++++- .../ComponentInputPorts.scala | 24 ++++- .../ComponentInternalPort.scala | 5 +- .../ComponentCppWriter/ComponentPorts.scala | 3 + .../XmlFppWriter/ComponentXmlFppWriter.scala | 1 + .../base/ActiveOverflowComponentAc.ref.cpp | 70 ++++++++++++++ .../base/ActiveOverflowComponentAc.ref.hpp | 94 +++++++++++++++++++ .../base/QueuedOverflowComponentAc.ref.cpp | 70 ++++++++++++++ .../base/QueuedOverflowComponentAc.ref.hpp | 94 +++++++++++++++++++ 10 files changed, 447 insertions(+), 6 deletions(-) diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCommands.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCommands.scala index 11c936a0e..e441eca89 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCommands.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCommands.scala @@ -54,7 +54,8 @@ case class ComponentCommands ( List( getHandlers, getHandlerBases, - getPreMsgHooks + getPreMsgHooks, + getOverflowHooks, ).flatten } @@ -185,7 +186,7 @@ case class ComponentCommands ( ) ) ), - writeSendMessageLogic("msg", queueFull, priority) + writeSendMessageLogic("msg", queueFull, priority, cmd.getName, cmdParamTypeMap(opcode).map((n, tn, _) => n)) ) ) case _ => intersperseBlankLines( @@ -318,4 +319,29 @@ case class ComponentCommands ( ) } + private def getOverflowHooks: List[CppDoc.Class.Member] = { + addAccessTagAndComment( + "PROTECTED", + """|Overflow hooks for async commands marked 'hook' + | + |Each of these functions is invoked after an overflow event + |on a queue when the command is marked with 'hook' overflow + |behavior. + |""", + hookCmds.map((opcode, cmd) => + functionClassMember( + Some(s"Overflow hook for command ${cmd.getName}"), + inputOverflowHookName(cmd.getName), + List( + opcodeParam, + cmdSeqParam + ) ++ cmdParamMap(opcode), + CppDoc.Type("void"), + Nil, + CppDoc.Function.PureVirtual + ) + ) + ) + } + } diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCppWriterUtils.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCppWriterUtils.scala index 973cdeb07..e673b57e5 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCppWriterUtils.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCppWriterUtils.scala @@ -103,6 +103,21 @@ abstract class ComponentCppWriterUtils( /** List of serial async input ports */ val serialAsyncInputPorts: List[PortInstance.General] = filterAsyncInputPorts(serialInputPorts) + + /** List of typed overflow hook ports */ + val typedHookPorts: List[PortInstance.General] = filterOverflowHookPorts(typedAsyncInputPorts) + + /** List of serial overflow hook ports */ + val serialHookPorts: List[PortInstance.General] = filterOverflowHookPorts(serialInputPorts) + + /** List of serial overflow hook ports */ + val dataProductHookPorts: List[PortInstance.Special] = + dataProductAsyncInputPorts.filter(p => + p.queueFull match { + case Some(Ast.QueueFull.Hook) => true + case _ => false + } + ) /** List of typed output ports */ val typedOutputPorts: List[PortInstance.General] = filterTypedPorts(outputPorts) @@ -116,6 +131,15 @@ abstract class ComponentCppWriterUtils( case _ => None }).filter(_.isDefined).map(_.get).sortBy(_.getUnqualifiedName) + /** List of internal overflow hook ports */ + val internalHookPorts: List[PortInstance.Internal] = + internalPorts.filter(p => + p.queueFull match { + case Ast.QueueFull.Hook => true + case _ => false + } + ) + /** List of commands sorted by opcode */ val sortedCmds: List[(Command.Opcode, Command)] = component.commandMap.toList.sortBy(_._1) @@ -131,6 +155,12 @@ abstract class ComponentCppWriterUtils( case _ => false }) + /** List of async commands */ + val hookCmds: List[(Command.Opcode, Command.NonParam)] = nonParamCmds.filter((_, cmd) => cmd.kind match { + case Command.NonParam.Async(_, Ast.QueueFull.Hook) => true + case _ => false + }) + /** List of guarded commands */ val guardedCmds: List[(Command.Opcode, Command.NonParam)] = nonParamCmds.filter((_, cmd) => cmd.kind match { case Command.NonParam.Guarded => true @@ -445,6 +475,15 @@ abstract class ComponentCppWriterUtils( ) case _ => portParamTypeMap(p.getUnqualifiedName).map((n, tn, t) => (n, tn, Some(t))) } + + /** Get port params as a list of names */ + def getPortParamNames(p: PortInstance): List[String] = + p.getType match { + case Some(PortInstance.Type.Serial) => List( + "buffer" + ) + case _ => portParamTypeMap(p.getUnqualifiedName).map((n, tn, t) => n) + } /** Get port params as CppDoc Function Params */ def getPortFunctionParams(p: PortInstance): List[CppDoc.Function.Param] = @@ -563,7 +602,9 @@ abstract class ComponentCppWriterUtils( def writeSendMessageLogic( bufferName: String, queueFull: Ast.QueueFull, - priority: Option[BigInt] + priority: Option[BigInt], + name: String, + arguments: List[String] ): List[Line] = { val queueBlocking = queueFull match { case Ast.QueueFull.Block => "QUEUE_BLOCKING" @@ -591,6 +632,13 @@ abstract class ComponentCppWriterUtils( |} |""" ) + case Ast.QueueFull.Hook => lines( + s"""|if (qStatus == Os::Queue::QUEUE_FULL) { + | this->${inputOverflowHookName(name)}(${arguments.mkString(",")}); + | return; + |} + |""" + ) case _ => Nil } , @@ -671,6 +719,10 @@ abstract class ComponentCppWriterUtils( /** Get the name for an async input port pre-message hook function */ def inputPortHookName(name: String) = s"${name}_preMsgHook" + + /** Get the name for an async input port overflow hook function */ + def inputOverflowHookName(name: String) = + s"${name}_overflowHook" // Get the name for an output port connector function def outputPortConnectorName(name: String) = @@ -822,6 +874,14 @@ abstract class ComponentCppWriterUtils( case _ => false } ) + + private def filterOverflowHookPorts(ports: List[PortInstance.General]) = + ports.filter(p => + p.kind match { + case PortInstance.General.Kind.AsyncInput(_, Ast.QueueFull.Hook) => true + case _ => false + } + ) private def filterAsyncSpecialPorts(ports: List[PortInstance.Special]) = ports.filter(p => diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInputPorts.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInputPorts.scala index 03b82fe66..f90d1e208 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInputPorts.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInputPorts.scala @@ -164,7 +164,7 @@ case class ComponentInputPorts( ) }) ), - writeSendMessageLogic(bufferName, queueFull, priority) + writeSendMessageLogic(bufferName, queueFull, priority, p.getUnqualifiedName, getPortParamNames(p)) ) ) } @@ -408,6 +408,28 @@ case class ComponentInputPorts( ) ) } + + def getDropHooks(ports: List[PortInstance]): List[CppDoc.Class.Member] = { + addAccessTagAndComment( + "PROTECTED", + s"""|Hooks for ${getPortListTypeString(ports)} async input ports + | + |Each of these functions is invoked just before dropping a message + |on the corresponding port. You should override them to provide + |specific drop behavior. + |""", + ports.map(p => + functionClassMember( + Some(s"Overflow hook for async input port ${p.getUnqualifiedName}"), + inputOverflowHookName(p.getUnqualifiedName), + portNumParam :: getPortFunctionParams(p), + CppDoc.Type("void"), + Nil, + CppDoc.Function.PureVirtual + ) + ) + ) + } // Get the name for a param command handler function private def paramCmdHandlerName(cmd: Command.Param) = diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInternalPort.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInternalPort.scala index 07067ab46..d96fb752c 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInternalPort.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInternalPort.scala @@ -9,9 +9,10 @@ case class ComponentInternalPort ( s: CppWriterState, aNode: Ast.Annotated[AstNode[Ast.DefComponent]] ) extends ComponentCppWriterUtils(s, aNode) { - + private val inputPortWriter = ComponentInputPorts(s, aNode) def getFunctionMembers: List[CppDoc.Class.Member] = { List( + inputPortWriter.getDropHooks(internalHookPorts), getHandlers, getHandlerBases ).flatten @@ -82,7 +83,7 @@ case class ComponentInternalPort ( ) ) ), - writeSendMessageLogic("msg", p.queueFull, p.priority) + writeSendMessageLogic("msg", p.queueFull, p.priority, p.getUnqualifiedName, getPortParams(p).map((n, _, _) => n)) ) ) ) diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentPorts.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentPorts.scala index 83bd9acdc..2dbb50e12 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentPorts.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentPorts.scala @@ -57,6 +57,9 @@ case class ComponentPorts( inputPortWriter.getPreMsgHooks(dataProductInputPorts), inputPortWriter.getPreMsgHooks(typedAsyncInputPorts), inputPortWriter.getPreMsgHooks(serialAsyncInputPorts), + inputPortWriter.getDropHooks(dataProductHookPorts), + inputPortWriter.getDropHooks(typedHookPorts), + inputPortWriter.getDropHooks(serialHookPorts), outputPortWriter.getInvokers(dataProductOutputPorts), outputPortWriter.getInvokers(typedOutputPorts), outputPortWriter.getInvokers(serialOutputPorts), diff --git a/compiler/lib/src/main/scala/codegen/XmlFppWriter/ComponentXmlFppWriter.scala b/compiler/lib/src/main/scala/codegen/XmlFppWriter/ComponentXmlFppWriter.scala index c2ed165f7..5fab6b2d2 100644 --- a/compiler/lib/src/main/scala/codegen/XmlFppWriter/ComponentXmlFppWriter.scala +++ b/compiler/lib/src/main/scala/codegen/XmlFppWriter/ComponentXmlFppWriter.scala @@ -105,6 +105,7 @@ object ComponentXmlFppWriter extends LineUtils { case Some("assert") => Right(Some(Ast.QueueFull.Assert)) case Some("block") => Right(Some(Ast.QueueFull.Block)) case Some("drop") => Right(Some(Ast.QueueFull.Drop)) + case Some("hook") => Right(Some(Ast.QueueFull.Hook)) case Some(xmlQueueFull) => Left(file.semanticError(s"invalid queue full behavior $xmlQueueFull")) case None => Right(None) diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.cpp index 5f31eb41c..4dbae5934 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.cpp @@ -1053,6 +1053,11 @@ void ActiveOverflowComponentBase :: Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + if (qStatus == Os::Queue::QUEUE_FULL) { + this->productRecvInHook_overflowHook(id,buffer,status); + return; + } + FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, static_cast(qStatus) @@ -1492,6 +1497,11 @@ void ActiveOverflowComponentBase :: Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + if (qStatus == Os::Queue::QUEUE_FULL) { + this->hookAsync_overflowHook(u32,f32,b,str1,e,a,s); + return; + } + FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, static_cast(qStatus) @@ -1548,6 +1558,11 @@ void ActiveOverflowComponentBase :: Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; Os::Queue::QueueStatus qStatus = this->m_queue.send(msgSerBuff, 0, _block); + if (qStatus == Os::Queue::QUEUE_FULL) { + this->serialAsyncHook_overflowHook(buffer); + return; + } + FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, static_cast(qStatus) @@ -1658,6 +1673,38 @@ void ActiveOverflowComponentBase :: // Default: no-op } +// ---------------------------------------------------------------------- +// Hooks for special async input ports +// +// Each of these functions is invoked just before dropping a message +// on the corresponding port. You should override them to provide +// specific drop behavior. +// ---------------------------------------------------------------------- + +// ---------------------------------------------------------------------- +// Hooks for typed async input ports +// +// Each of these functions is invoked just before dropping a message +// on the corresponding port. You should override them to provide +// specific drop behavior. +// ---------------------------------------------------------------------- + +// ---------------------------------------------------------------------- +// Hooks for serial async input ports +// +// Each of these functions is invoked just before dropping a message +// on the corresponding port. You should override them to provide +// specific drop behavior. +// ---------------------------------------------------------------------- + +// ---------------------------------------------------------------------- +// Hooks for internal async input ports +// +// Each of these functions is invoked just before dropping a message +// on the corresponding port. You should override them to provide +// specific drop behavior. +// ---------------------------------------------------------------------- + // ---------------------------------------------------------------------- // Internal interface base-class functions // ---------------------------------------------------------------------- @@ -1686,6 +1733,11 @@ void ActiveOverflowComponentBase :: Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + if (qStatus == Os::Queue::QUEUE_FULL) { + this->internalHookDrop_overflowHook(); + return; + } + FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, static_cast(qStatus) @@ -1766,6 +1818,11 @@ void ActiveOverflowComponentBase :: Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + if (qStatus == Os::Queue::QUEUE_FULL) { + this->CMD_HOOK_overflowHook(); + return; + } + FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, static_cast(qStatus) @@ -1825,6 +1882,11 @@ void ActiveOverflowComponentBase :: Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 30, _block); + if (qStatus == Os::Queue::QUEUE_FULL) { + this->CMD_PARAMS_PRIORITY_HOOK_overflowHook(u32); + return; + } + FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, static_cast(qStatus) @@ -1861,6 +1923,14 @@ void ActiveOverflowComponentBase :: (void) cmdSeq; } +// ---------------------------------------------------------------------- +// Overflow hooks for async commands marked 'hook' +// +// Each of these functions is invoked after an overflow event +// on a queue when the command is marked with 'hook' overflow +// behavior. +// ---------------------------------------------------------------------- + // ---------------------------------------------------------------------- // Time // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.hpp index 5b7778395..08acc7279 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.hpp @@ -722,6 +722,77 @@ class ActiveOverflowComponentBase : Fw::SerializeBufferBase& buffer //!< The serialization buffer ); + PROTECTED: + + // ---------------------------------------------------------------------- + // Hooks for special async input ports + // + // Each of these functions is invoked just before dropping a message + // on the corresponding port. You should override them to provide + // specific drop behavior. + // ---------------------------------------------------------------------- + + //! Overflow hook for async input port productRecvInHook + virtual void productRecvInHook_overflowHook( + FwIndexType portNum, //!< The port number + FwDpIdType id, //!< The container ID + const Fw::Buffer& buffer, //!< The buffer + const Fw::Success& status //!< The status + ) = 0; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Hooks for typed async input ports + // + // Each of these functions is invoked just before dropping a message + // on the corresponding port. You should override them to provide + // specific drop behavior. + // ---------------------------------------------------------------------- + + //! Overflow hook for async input port hookAsync + virtual void hookAsync_overflowHook( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) = 0; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Hooks for serial async input ports + // + // Each of these functions is invoked just before dropping a message + // on the corresponding port. You should override them to provide + // specific drop behavior. + // ---------------------------------------------------------------------- + + //! Overflow hook for async input port serialAsyncHook + virtual void serialAsyncHook_overflowHook( + FwIndexType portNum, //!< The port number + Fw::SerializeBufferBase& buffer //!< The serialization buffer + ) = 0; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Hooks for internal async input ports + // + // Each of these functions is invoked just before dropping a message + // on the corresponding port. You should override them to provide + // specific drop behavior. + // ---------------------------------------------------------------------- + + //! Overflow hook for async input port internalHookDrop + virtual void internalHookDrop_overflowHook( + FwIndexType portNum //!< The port number + ) = 0; + PROTECTED: // ---------------------------------------------------------------------- @@ -824,6 +895,29 @@ class ActiveOverflowComponentBase : U32 cmdSeq //!< The command sequence number ); + PROTECTED: + + // ---------------------------------------------------------------------- + // Overflow hooks for async commands marked 'hook' + // + // Each of these functions is invoked after an overflow event + // on a queue when the command is marked with 'hook' overflow + // behavior. + // ---------------------------------------------------------------------- + + //! Overflow hook for command CMD_HOOK + virtual void CMD_HOOK_overflowHook( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq //!< The command sequence number + ) = 0; + + //! Overflow hook for command CMD_PARAMS_PRIORITY_HOOK + virtual void CMD_PARAMS_PRIORITY_HOOK_overflowHook( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq, //!< The command sequence number + U32 u32 + ) = 0; + PROTECTED: // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.cpp index 34268e423..f3f63795d 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.cpp @@ -1053,6 +1053,11 @@ void QueuedOverflowComponentBase :: Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + if (qStatus == Os::Queue::QUEUE_FULL) { + this->productRecvInHook_overflowHook(id,buffer,status); + return; + } + FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, static_cast(qStatus) @@ -1492,6 +1497,11 @@ void QueuedOverflowComponentBase :: Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + if (qStatus == Os::Queue::QUEUE_FULL) { + this->hookAsync_overflowHook(u32,f32,b,str1,e,a,s); + return; + } + FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, static_cast(qStatus) @@ -1548,6 +1558,11 @@ void QueuedOverflowComponentBase :: Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; Os::Queue::QueueStatus qStatus = this->m_queue.send(msgSerBuff, 0, _block); + if (qStatus == Os::Queue::QUEUE_FULL) { + this->serialAsyncHook_overflowHook(buffer); + return; + } + FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, static_cast(qStatus) @@ -1658,6 +1673,38 @@ void QueuedOverflowComponentBase :: // Default: no-op } +// ---------------------------------------------------------------------- +// Hooks for special async input ports +// +// Each of these functions is invoked just before dropping a message +// on the corresponding port. You should override them to provide +// specific drop behavior. +// ---------------------------------------------------------------------- + +// ---------------------------------------------------------------------- +// Hooks for typed async input ports +// +// Each of these functions is invoked just before dropping a message +// on the corresponding port. You should override them to provide +// specific drop behavior. +// ---------------------------------------------------------------------- + +// ---------------------------------------------------------------------- +// Hooks for serial async input ports +// +// Each of these functions is invoked just before dropping a message +// on the corresponding port. You should override them to provide +// specific drop behavior. +// ---------------------------------------------------------------------- + +// ---------------------------------------------------------------------- +// Hooks for internal async input ports +// +// Each of these functions is invoked just before dropping a message +// on the corresponding port. You should override them to provide +// specific drop behavior. +// ---------------------------------------------------------------------- + // ---------------------------------------------------------------------- // Internal interface base-class functions // ---------------------------------------------------------------------- @@ -1686,6 +1733,11 @@ void QueuedOverflowComponentBase :: Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + if (qStatus == Os::Queue::QUEUE_FULL) { + this->internalHookDrop_overflowHook(); + return; + } + FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, static_cast(qStatus) @@ -1766,6 +1818,11 @@ void QueuedOverflowComponentBase :: Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); + if (qStatus == Os::Queue::QUEUE_FULL) { + this->CMD_HOOK_overflowHook(); + return; + } + FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, static_cast(qStatus) @@ -1825,6 +1882,11 @@ void QueuedOverflowComponentBase :: Os::Queue::QueueBlocking _block = Os::Queue::QUEUE_NONBLOCKING; Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 30, _block); + if (qStatus == Os::Queue::QUEUE_FULL) { + this->CMD_PARAMS_PRIORITY_HOOK_overflowHook(u32); + return; + } + FW_ASSERT( qStatus == Os::Queue::QUEUE_OK, static_cast(qStatus) @@ -1861,6 +1923,14 @@ void QueuedOverflowComponentBase :: (void) cmdSeq; } +// ---------------------------------------------------------------------- +// Overflow hooks for async commands marked 'hook' +// +// Each of these functions is invoked after an overflow event +// on a queue when the command is marked with 'hook' overflow +// behavior. +// ---------------------------------------------------------------------- + // ---------------------------------------------------------------------- // Time // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.hpp index 72069e049..6e9523b3c 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.hpp @@ -722,6 +722,77 @@ class QueuedOverflowComponentBase : Fw::SerializeBufferBase& buffer //!< The serialization buffer ); + PROTECTED: + + // ---------------------------------------------------------------------- + // Hooks for special async input ports + // + // Each of these functions is invoked just before dropping a message + // on the corresponding port. You should override them to provide + // specific drop behavior. + // ---------------------------------------------------------------------- + + //! Overflow hook for async input port productRecvInHook + virtual void productRecvInHook_overflowHook( + FwIndexType portNum, //!< The port number + FwDpIdType id, //!< The container ID + const Fw::Buffer& buffer, //!< The buffer + const Fw::Success& status //!< The status + ) = 0; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Hooks for typed async input ports + // + // Each of these functions is invoked just before dropping a message + // on the corresponding port. You should override them to provide + // specific drop behavior. + // ---------------------------------------------------------------------- + + //! Overflow hook for async input port hookAsync + virtual void hookAsync_overflowHook( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) = 0; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Hooks for serial async input ports + // + // Each of these functions is invoked just before dropping a message + // on the corresponding port. You should override them to provide + // specific drop behavior. + // ---------------------------------------------------------------------- + + //! Overflow hook for async input port serialAsyncHook + virtual void serialAsyncHook_overflowHook( + FwIndexType portNum, //!< The port number + Fw::SerializeBufferBase& buffer //!< The serialization buffer + ) = 0; + + PROTECTED: + + // ---------------------------------------------------------------------- + // Hooks for internal async input ports + // + // Each of these functions is invoked just before dropping a message + // on the corresponding port. You should override them to provide + // specific drop behavior. + // ---------------------------------------------------------------------- + + //! Overflow hook for async input port internalHookDrop + virtual void internalHookDrop_overflowHook( + FwIndexType portNum //!< The port number + ) = 0; + PROTECTED: // ---------------------------------------------------------------------- @@ -824,6 +895,29 @@ class QueuedOverflowComponentBase : U32 cmdSeq //!< The command sequence number ); + PROTECTED: + + // ---------------------------------------------------------------------- + // Overflow hooks for async commands marked 'hook' + // + // Each of these functions is invoked after an overflow event + // on a queue when the command is marked with 'hook' overflow + // behavior. + // ---------------------------------------------------------------------- + + //! Overflow hook for command CMD_HOOK + virtual void CMD_HOOK_overflowHook( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq //!< The command sequence number + ) = 0; + + //! Overflow hook for command CMD_PARAMS_PRIORITY_HOOK + virtual void CMD_PARAMS_PRIORITY_HOOK_overflowHook( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq, //!< The command sequence number + U32 u32 + ) = 0; + PROTECTED: // ---------------------------------------------------------------------- From e8d491927785fb76001715f34fdd88014892bf95 Mon Sep 17 00:00:00 2001 From: M Starch Date: Mon, 12 Aug 2024 10:23:06 -0700 Subject: [PATCH 06/11] Adding 'hook' overflow impl test --- .../impl/ActiveOverflow.template.ref.cpp | 137 +++++++++++++++++ .../impl/ActiveOverflow.template.ref.hpp | 142 ++++++++++++++++++ .../impl/QueuedOverflow.template.ref.cpp | 137 +++++++++++++++++ .../impl/QueuedOverflow.template.ref.hpp | 142 ++++++++++++++++++ .../fpp-to-cpp/test/component/impl/run.sh | 2 + .../test/component/impl/update-ref.sh | 2 + 6 files changed, 562 insertions(+) create mode 100644 compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.cpp create mode 100644 compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.hpp create mode 100644 compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.cpp create mode 100644 compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.hpp diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.cpp new file mode 100644 index 000000000..caef76533 --- /dev/null +++ b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.cpp @@ -0,0 +1,137 @@ +// ====================================================================== +// \title ActiveOverflow.cpp +// \author [user name] +// \brief cpp file for ActiveOverflow component implementation class +// ====================================================================== + +#include "ActiveOverflow.hpp" +#include "FpConfig.hpp" + +// ---------------------------------------------------------------------- +// Component construction and destruction +// ---------------------------------------------------------------------- + +ActiveOverflow :: + ActiveOverflow(const char* const compName) : + ActiveOverflowComponentBase(compName) +{ + +} + +ActiveOverflow :: + ~ActiveOverflow() +{ + +} + +// ---------------------------------------------------------------------- +// Handler implementations for user-defined typed input ports +// ---------------------------------------------------------------------- + +void ActiveOverflow :: + assertAsync_handler( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // TODO +} + +void ActiveOverflow :: + blockAsync_handler( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // TODO +} + +void ActiveOverflow :: + dropAsync_handler( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // TODO +} + +void ActiveOverflow :: + hookAsync_handler( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // TODO +} + +// ---------------------------------------------------------------------- +// Handler implementations for user-defined serial input ports +// ---------------------------------------------------------------------- + +void ActiveOverflow :: + serialAsyncHook_handler( + FwIndexType portNum, + Fw::SerializeBufferBase& buffer + ) +{ + // TODO +} + +// ---------------------------------------------------------------------- +// Handler implementations for commands +// ---------------------------------------------------------------------- + +void ActiveOverflow :: + CMD_HOOK_cmdHandler( + FwOpcodeType opCode, + U32 cmdSeq + ) +{ + // TODO + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); +} + +void ActiveOverflow :: + CMD_PARAMS_PRIORITY_HOOK_cmdHandler( + FwOpcodeType opCode, + U32 cmdSeq, + U32 u32 + ) +{ + // TODO + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); +} + +// ---------------------------------------------------------------------- +// Handler implementations for user-defined internal interfaces +// ---------------------------------------------------------------------- + +void ActiveOverflow :: + internalHookDrop_internalInterfaceHandler() +{ + // TODO +} diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.hpp new file mode 100644 index 000000000..dfee79e88 --- /dev/null +++ b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.hpp @@ -0,0 +1,142 @@ +// ====================================================================== +// \title ActiveOverflow.hpp +// \author [user name] +// \brief hpp file for ActiveOverflow component implementation class +// ====================================================================== + +#ifndef ActiveOverflow_HPP +#define ActiveOverflow_HPP + +#include "ActiveOverflowComponentAc.hpp" + +class ActiveOverflow : + public ActiveOverflowComponentBase +{ + + public: + + // ---------------------------------------------------------------------- + // Component construction and destruction + // ---------------------------------------------------------------------- + + //! Construct ActiveOverflow object + ActiveOverflow( + const char* const compName //!< The component name + ); + + //! Destroy ActiveOverflow object + ~ActiveOverflow(); + + PRIVATE: + + // ---------------------------------------------------------------------- + // Handler implementations for user-defined typed input ports + // ---------------------------------------------------------------------- + + //! Handler implementation for assertAsync + //! + //! A port with assert behavior + void assertAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) override; + + //! Handler implementation for blockAsync + //! + //! A port with block behavior + void blockAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) override; + + //! Handler implementation for dropAsync + //! + //! A port with drop behavior + void dropAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) override; + + //! Handler implementation for hookAsync + //! + //! A port with hook behavior + void hookAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) override; + + PRIVATE: + + // ---------------------------------------------------------------------- + // Handler implementations for user-defined serial input ports + // ---------------------------------------------------------------------- + + //! Handler implementation for serialAsyncHook + //! + //! A serial async input port with overflow hook + void serialAsyncHook_handler( + FwIndexType portNum, //!< The port number + Fw::SerializeBufferBase& buffer //!< The serialization buffer + ) override; + + PRIVATE: + + // ---------------------------------------------------------------------- + // Handler implementations for commands + // ---------------------------------------------------------------------- + + //! Handler implementation for command CMD_HOOK + //! + //! A command with queue full 'hook' behavior + void CMD_HOOK_cmdHandler( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq //!< The command sequence number + ) override; + + //! Handler implementation for command CMD_PARAMS_PRIORITY_HOOK + //! + //! A command with params, priority, and queue full 'hook' behavior + void CMD_PARAMS_PRIORITY_HOOK_cmdHandler( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq, //!< The command sequence number + U32 u32 + ) override; + + PRIVATE: + + // ---------------------------------------------------------------------- + // Handler implementations for user-defined internal interfaces + // ---------------------------------------------------------------------- + + //! Handler implementation for internalHookDrop + //! + //! An internal port with hook queue full behavior + void internalHookDrop_internalInterfaceHandler() override; + +}; + +#endif diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.cpp new file mode 100644 index 000000000..ffc5fc96f --- /dev/null +++ b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.cpp @@ -0,0 +1,137 @@ +// ====================================================================== +// \title QueuedOverflow.cpp +// \author [user name] +// \brief cpp file for QueuedOverflow component implementation class +// ====================================================================== + +#include "FpConfig.hpp" +#include "QueuedOverflow.hpp" + +// ---------------------------------------------------------------------- +// Component construction and destruction +// ---------------------------------------------------------------------- + +QueuedOverflow :: + QueuedOverflow(const char* const compName) : + QueuedOverflowComponentBase(compName) +{ + +} + +QueuedOverflow :: + ~QueuedOverflow() +{ + +} + +// ---------------------------------------------------------------------- +// Handler implementations for user-defined typed input ports +// ---------------------------------------------------------------------- + +void QueuedOverflow :: + assertAsync_handler( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // TODO +} + +void QueuedOverflow :: + blockAsync_handler( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // TODO +} + +void QueuedOverflow :: + dropAsync_handler( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // TODO +} + +void QueuedOverflow :: + hookAsync_handler( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // TODO +} + +// ---------------------------------------------------------------------- +// Handler implementations for user-defined serial input ports +// ---------------------------------------------------------------------- + +void QueuedOverflow :: + serialAsyncHook_handler( + FwIndexType portNum, + Fw::SerializeBufferBase& buffer + ) +{ + // TODO +} + +// ---------------------------------------------------------------------- +// Handler implementations for commands +// ---------------------------------------------------------------------- + +void QueuedOverflow :: + CMD_HOOK_cmdHandler( + FwOpcodeType opCode, + U32 cmdSeq + ) +{ + // TODO + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); +} + +void QueuedOverflow :: + CMD_PARAMS_PRIORITY_HOOK_cmdHandler( + FwOpcodeType opCode, + U32 cmdSeq, + U32 u32 + ) +{ + // TODO + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); +} + +// ---------------------------------------------------------------------- +// Handler implementations for user-defined internal interfaces +// ---------------------------------------------------------------------- + +void QueuedOverflow :: + internalHookDrop_internalInterfaceHandler() +{ + // TODO +} diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.hpp new file mode 100644 index 000000000..10bb3b052 --- /dev/null +++ b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.hpp @@ -0,0 +1,142 @@ +// ====================================================================== +// \title QueuedOverflow.hpp +// \author [user name] +// \brief hpp file for QueuedOverflow component implementation class +// ====================================================================== + +#ifndef QueuedOverflow_HPP +#define QueuedOverflow_HPP + +#include "QueuedOverflowComponentAc.hpp" + +class QueuedOverflow : + public QueuedOverflowComponentBase +{ + + public: + + // ---------------------------------------------------------------------- + // Component construction and destruction + // ---------------------------------------------------------------------- + + //! Construct QueuedOverflow object + QueuedOverflow( + const char* const compName //!< The component name + ); + + //! Destroy QueuedOverflow object + ~QueuedOverflow(); + + PRIVATE: + + // ---------------------------------------------------------------------- + // Handler implementations for user-defined typed input ports + // ---------------------------------------------------------------------- + + //! Handler implementation for assertAsync + //! + //! A port with assert behavior + void assertAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) override; + + //! Handler implementation for blockAsync + //! + //! A port with block behavior + void blockAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) override; + + //! Handler implementation for dropAsync + //! + //! A port with drop behavior + void dropAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) override; + + //! Handler implementation for hookAsync + //! + //! A port with hook behavior + void hookAsync_handler( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) override; + + PRIVATE: + + // ---------------------------------------------------------------------- + // Handler implementations for user-defined serial input ports + // ---------------------------------------------------------------------- + + //! Handler implementation for serialAsyncHook + //! + //! A serial async input port with overflow hook + void serialAsyncHook_handler( + FwIndexType portNum, //!< The port number + Fw::SerializeBufferBase& buffer //!< The serialization buffer + ) override; + + PRIVATE: + + // ---------------------------------------------------------------------- + // Handler implementations for commands + // ---------------------------------------------------------------------- + + //! Handler implementation for command CMD_HOOK + //! + //! A command with queue full 'hook' behavior + void CMD_HOOK_cmdHandler( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq //!< The command sequence number + ) override; + + //! Handler implementation for command CMD_PARAMS_PRIORITY_HOOK + //! + //! A command with params, priority, and queue full 'hook' behavior + void CMD_PARAMS_PRIORITY_HOOK_cmdHandler( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq, //!< The command sequence number + U32 u32 + ) override; + + PRIVATE: + + // ---------------------------------------------------------------------- + // Handler implementations for user-defined internal interfaces + // ---------------------------------------------------------------------- + + //! Handler implementation for internalHookDrop + //! + //! An internal port with hook queue full behavior + void internalHookDrop_internalInterfaceHandler() override; + +}; + +#endif diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/run.sh b/compiler/tools/fpp-to-cpp/test/component/impl/run.sh index 458fb303b..833cbfa16 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/run.sh +++ b/compiler/tools/fpp-to-cpp/test/component/impl/run.sh @@ -29,6 +29,7 @@ active() diff_template ActiveAsyncProductPortsOnly && \ diff_template ActiveAsyncProducts && \ diff_template ActiveCommands && \ + diff_template ActiveOverflow && \ diff_template ActiveEvents && \ diff_template ActiveGetProducts && \ diff_template ActiveGuardedProducts && \ @@ -46,6 +47,7 @@ queued() diff_template QueuedAsyncProductPortsOnly && \ diff_template QueuedAsyncProducts && \ diff_template QueuedCommands && \ + diff_template QueuedOverflow && \ diff_template QueuedEvents && \ diff_template QueuedGetProducts && \ diff_template QueuedGuardedProducts && \ diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/update-ref.sh b/compiler/tools/fpp-to-cpp/test/component/impl/update-ref.sh index 8e51c76ac..e708c59e2 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/update-ref.sh +++ b/compiler/tools/fpp-to-cpp/test/component/impl/update-ref.sh @@ -29,6 +29,7 @@ active() move_template ActiveAsyncProductPortsOnly move_template ActiveAsyncProducts move_template ActiveCommands + move_template ActiveOverflow move_template ActiveEvents move_template ActiveGetProducts move_template ActiveGuardedProducts @@ -46,6 +47,7 @@ queued() move_template QueuedAsyncProductPortsOnly move_template QueuedAsyncProducts move_template QueuedCommands + move_template QueuedOverflow move_template QueuedEvents move_template QueuedGetProducts move_template QueuedGuardedProducts From 56468da3e5ba3240a91e7686fedf7984730834c8 Mon Sep 17 00:00:00 2001 From: M Starch Date: Mon, 12 Aug 2024 11:24:18 -0700 Subject: [PATCH 07/11] Adding fpp-to-cpp template support for overflow hooks --- .../ComponentImplWriter.scala | 47 ++++++++++++- .../impl/ActiveOverflow.template.ref.cpp | 68 +++++++++++++++++++ .../impl/ActiveOverflow.template.ref.hpp | 56 +++++++++++++++ .../impl/QueuedOverflow.template.ref.cpp | 68 +++++++++++++++++++ .../impl/QueuedOverflow.template.ref.hpp | 56 +++++++++++++++ 5 files changed, 294 insertions(+), 1 deletion(-) diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentImplWriter.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentImplWriter.scala index 87e0c9f41..a2ab10dc7 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentImplWriter.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentImplWriter.scala @@ -61,7 +61,8 @@ case class ComponentImplWriter( private def getClassMembers: List[CppDoc.Class.Member] = { List.concat( getPublicMembers, - getHandlers + getHandlers, + getOverflowHooks ) } @@ -178,5 +179,49 @@ case class ComponentImplWriter( }) ) } +private def getOverflowHooks: List[CppDoc.Class.Member] = { + List.concat( + getPortOverflowHooks( + typedHookPorts ++ + serialHookPorts ++ + dataProductHookPorts ++ + internalHookPorts + ), + addAccessTagAndComment( + "PRIVATE", + s"Overflow hook implementations for 'hook' commands", + hookCmds.map((opcode, cmd) => { + functionClassMember( + Some(s"Overflow hook implementation for ${cmd.getName}"), + inputOverflowHookName(cmd.getName), + List( + opcodeParam, + cmdSeqParam + ) ++ cmdParamMap(opcode), + CppDoc.Type("void"), + lines("// TODO"), + CppDoc.Function.Override + ) + }) + ) + ) +} + +private def getPortOverflowHooks(ports: List[PortInstance]): List[CppDoc.Class.Member] = { + addAccessTagAndComment( + "PRIVATE", + s"Overflow hook implementations for 'hook' input ports", + ports.map(p => { + functionClassMember( + Some(s"Overflow hook implementation for ${p.getUnqualifiedName}"), + inputOverflowHookName(p.getUnqualifiedName), + portNumParam :: getPortFunctionParams(p), + CppDoc.Type("void"), + lines("// TODO"), + CppDoc.Function.Override + ) + }) + ) + } } diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.cpp index caef76533..b2bb7f8b5 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.cpp @@ -135,3 +135,71 @@ void ActiveOverflow :: { // TODO } + +// ---------------------------------------------------------------------- +// Overflow hook implementations for 'hook' input ports +// ---------------------------------------------------------------------- + +void ActiveOverflow :: + hookAsync_overflowHook( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // TODO +} + +void ActiveOverflow :: + serialAsyncHook_overflowHook( + FwIndexType portNum, + Fw::SerializeBufferBase& buffer + ) +{ + // TODO +} + +void ActiveOverflow :: + productRecvInHook_overflowHook( + FwIndexType portNum, + FwDpIdType id, + const Fw::Buffer& buffer, + const Fw::Success& status + ) +{ + // TODO +} + +void ActiveOverflow :: + internalHookDrop_overflowHook(FwIndexType portNum) +{ + // TODO +} + +// ---------------------------------------------------------------------- +// Overflow hook implementations for 'hook' commands +// ---------------------------------------------------------------------- + +void ActiveOverflow :: + CMD_HOOK_overflowHook( + FwOpcodeType opCode, + U32 cmdSeq + ) +{ + // TODO +} + +void ActiveOverflow :: + CMD_PARAMS_PRIORITY_HOOK_overflowHook( + FwOpcodeType opCode, + U32 cmdSeq, + U32 u32 + ) +{ + // TODO +} diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.hpp index dfee79e88..92b5a9199 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.hpp @@ -137,6 +137,62 @@ class ActiveOverflow : //! An internal port with hook queue full behavior void internalHookDrop_internalInterfaceHandler() override; + PRIVATE: + + // ---------------------------------------------------------------------- + // Overflow hook implementations for 'hook' input ports + // ---------------------------------------------------------------------- + + //! Overflow hook implementation for hookAsync + void hookAsync_overflowHook( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) override; + + //! Overflow hook implementation for serialAsyncHook + void serialAsyncHook_overflowHook( + FwIndexType portNum, //!< The port number + Fw::SerializeBufferBase& buffer //!< The serialization buffer + ) override; + + //! Overflow hook implementation for productRecvInHook + void productRecvInHook_overflowHook( + FwIndexType portNum, //!< The port number + FwDpIdType id, //!< The container ID + const Fw::Buffer& buffer, //!< The buffer + const Fw::Success& status //!< The status + ) override; + + //! Overflow hook implementation for internalHookDrop + void internalHookDrop_overflowHook( + FwIndexType portNum //!< The port number + ) override; + + PRIVATE: + + // ---------------------------------------------------------------------- + // Overflow hook implementations for 'hook' commands + // ---------------------------------------------------------------------- + + //! Overflow hook implementation for CMD_HOOK + void CMD_HOOK_overflowHook( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq //!< The command sequence number + ) override; + + //! Overflow hook implementation for CMD_PARAMS_PRIORITY_HOOK + void CMD_PARAMS_PRIORITY_HOOK_overflowHook( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq, //!< The command sequence number + U32 u32 + ) override; + }; #endif diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.cpp index ffc5fc96f..d8eb96d88 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.cpp @@ -135,3 +135,71 @@ void QueuedOverflow :: { // TODO } + +// ---------------------------------------------------------------------- +// Overflow hook implementations for 'hook' input ports +// ---------------------------------------------------------------------- + +void QueuedOverflow :: + hookAsync_overflowHook( + FwIndexType portNum, + U32 u32, + F32 f32, + bool b, + const Fw::StringBase& str1, + const E& e, + const A& a, + const S& s + ) +{ + // TODO +} + +void QueuedOverflow :: + serialAsyncHook_overflowHook( + FwIndexType portNum, + Fw::SerializeBufferBase& buffer + ) +{ + // TODO +} + +void QueuedOverflow :: + productRecvInHook_overflowHook( + FwIndexType portNum, + FwDpIdType id, + const Fw::Buffer& buffer, + const Fw::Success& status + ) +{ + // TODO +} + +void QueuedOverflow :: + internalHookDrop_overflowHook(FwIndexType portNum) +{ + // TODO +} + +// ---------------------------------------------------------------------- +// Overflow hook implementations for 'hook' commands +// ---------------------------------------------------------------------- + +void QueuedOverflow :: + CMD_HOOK_overflowHook( + FwOpcodeType opCode, + U32 cmdSeq + ) +{ + // TODO +} + +void QueuedOverflow :: + CMD_PARAMS_PRIORITY_HOOK_overflowHook( + FwOpcodeType opCode, + U32 cmdSeq, + U32 u32 + ) +{ + // TODO +} diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.hpp index 10bb3b052..6c7e85afc 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.hpp @@ -137,6 +137,62 @@ class QueuedOverflow : //! An internal port with hook queue full behavior void internalHookDrop_internalInterfaceHandler() override; + PRIVATE: + + // ---------------------------------------------------------------------- + // Overflow hook implementations for 'hook' input ports + // ---------------------------------------------------------------------- + + //! Overflow hook implementation for hookAsync + void hookAsync_overflowHook( + FwIndexType portNum, //!< The port number + U32 u32, //!< A U32 + F32 f32, //!< An F32 + bool b, //!< A boolean + const Fw::StringBase& str1, //!< A string + const E& e, //!< An enum + const A& a, //!< An array + const S& s //!< A struct + ) override; + + //! Overflow hook implementation for serialAsyncHook + void serialAsyncHook_overflowHook( + FwIndexType portNum, //!< The port number + Fw::SerializeBufferBase& buffer //!< The serialization buffer + ) override; + + //! Overflow hook implementation for productRecvInHook + void productRecvInHook_overflowHook( + FwIndexType portNum, //!< The port number + FwDpIdType id, //!< The container ID + const Fw::Buffer& buffer, //!< The buffer + const Fw::Success& status //!< The status + ) override; + + //! Overflow hook implementation for internalHookDrop + void internalHookDrop_overflowHook( + FwIndexType portNum //!< The port number + ) override; + + PRIVATE: + + // ---------------------------------------------------------------------- + // Overflow hook implementations for 'hook' commands + // ---------------------------------------------------------------------- + + //! Overflow hook implementation for CMD_HOOK + void CMD_HOOK_overflowHook( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq //!< The command sequence number + ) override; + + //! Overflow hook implementation for CMD_PARAMS_PRIORITY_HOOK + void CMD_PARAMS_PRIORITY_HOOK_overflowHook( + FwOpcodeType opCode, //!< The opcode + U32 cmdSeq, //!< The command sequence number + U32 u32 + ) override; + }; #endif From bd5aba68087516a08f4cf538ca43329d7d154ca2 Mon Sep 17 00:00:00 2001 From: Rob Bocchino Date: Wed, 14 Aug 2024 16:09:14 -0700 Subject: [PATCH 08/11] Regenerate native image trace --- .../META-INF/native-image/reflect-config.json | 1630 +++++++++-------- 1 file changed, 825 insertions(+), 805 deletions(-) diff --git a/compiler/lib/src/main/resources/META-INF/native-image/reflect-config.json b/compiler/lib/src/main/resources/META-INF/native-image/reflect-config.json index c199fd70f..fcb3dd27f 100644 --- a/compiler/lib/src/main/resources/META-INF/native-image/reflect-config.json +++ b/compiler/lib/src/main/resources/META-INF/native-image/reflect-config.json @@ -24,847 +24,815 @@ }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1", - "fields":[{"name":"0bitmap$346"}] + "fields":[{"name":"0bitmap$365"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1014", - "fields":[{"name":"0bitmap$1048"}] -}, -{ - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1015", - "fields":[{"name":"0bitmap$971"}] -}, -{ - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1016", - "fields":[{"name":"0bitmap$957"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1052", + "fields":[{"name":"0bitmap$1095"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1053", - "fields":[{"name":"0bitmap$967"}] + "fields":[{"name":"0bitmap$1012"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1054", - "fields":[{"name":"0bitmap$962"}] -}, -{ - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1055", - "fields":[{"name":"0bitmap$958"}] -}, -{ - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1056", - "fields":[{"name":"0bitmap$959"}] + "fields":[{"name":"0bitmap$997"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1057", - "fields":[{"name":"0bitmap$960"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1093", + "fields":[{"name":"0bitmap$1008"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1058", - "fields":[{"name":"0bitmap$961"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1094", + "fields":[{"name":"0bitmap$1002"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1060", - "fields":[{"name":"0bitmap$966"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1095", + "fields":[{"name":"0bitmap$998"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1064", - "fields":[{"name":"0bitmap$970"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1096", + "fields":[{"name":"0bitmap$999"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1065", - "fields":[{"name":"0bitmap$968"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1097", + "fields":[{"name":"0bitmap$1000"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1066", - "fields":[{"name":"0bitmap$969"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1098", + "fields":[{"name":"0bitmap$1001"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1067", - "fields":[{"name":"0bitmap$1033"}] -}, -{ - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1068", - "fields":[{"name":"0bitmap$1005"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1100", + "fields":[{"name":"0bitmap$1007"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1105", - "fields":[{"name":"0bitmap$1028"}] + "fields":[{"name":"0bitmap$1011"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1106", "fields":[{"name":"0bitmap$1009"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1111", - "fields":[{"name":"0bitmap$1023"}] -}, -{ - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1112", + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1107", "fields":[{"name":"0bitmap$1010"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1113", - "fields":[{"name":"0bitmap$1011"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1108", + "fields":[{"name":"0bitmap$1078"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1114", - "fields":[{"name":"0bitmap$1012"}] -}, -{ - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1115", - "fields":[{"name":"0bitmap$1013"}] -}, -{ - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1116", - "fields":[{"name":"0bitmap$1014"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1109", + "fields":[{"name":"0bitmap$1048"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1117", - "fields":[{"name":"0bitmap$1015"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1148", + "fields":[{"name":"0bitmap$1072"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1118", - "fields":[{"name":"0bitmap$1016"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1149", + "fields":[{"name":"0bitmap$1052"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1119", - "fields":[{"name":"0bitmap$1017"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1154", + "fields":[{"name":"0bitmap$1066"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1120", - "fields":[{"name":"0bitmap$1018"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1155", + "fields":[{"name":"0bitmap$1053"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1121", - "fields":[{"name":"0bitmap$1019"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1156", + "fields":[{"name":"0bitmap$1054"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1122", - "fields":[{"name":"0bitmap$1020"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1157", + "fields":[{"name":"0bitmap$1055"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1123", - "fields":[{"name":"0bitmap$1021"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1158", + "fields":[{"name":"0bitmap$1056"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1124", - "fields":[{"name":"0bitmap$1022"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1159", + "fields":[{"name":"0bitmap$1057"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1126", - "fields":[{"name":"0bitmap$1027"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1160", + "fields":[{"name":"0bitmap$1058"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1130", - "fields":[{"name":"0bitmap$1032"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1161", + "fields":[{"name":"0bitmap$1059"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1134", - "fields":[{"name":"0bitmap$1047"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1162", + "fields":[{"name":"0bitmap$1060"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1135", - "fields":[{"name":"0bitmap$1042"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1163", + "fields":[{"name":"0bitmap$1061"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1145", - "fields":[{"name":"0bitmap$1046"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1164", + "fields":[{"name":"0bitmap$1062"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1146", - "fields":[{"name":"0bitmap$1043"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1165", + "fields":[{"name":"0bitmap$1063"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1147", - "fields":[{"name":"0bitmap$1044"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1166", + "fields":[{"name":"0bitmap$1064"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1148", - "fields":[{"name":"0bitmap$1045"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1167", + "fields":[{"name":"0bitmap$1065"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1149", - "fields":[{"name":"0bitmap$1049"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1169", + "fields":[{"name":"0bitmap$1071"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1150", - "fields":[{"name":"0bitmap$1147"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1174", + "fields":[{"name":"0bitmap$1077"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1151", - "fields":[{"name":"0bitmap$1050"}] -}, -{ - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1152", - "fields":[{"name":"0bitmap$1098"}] -}, -{ - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1153", - "fields":[{"name":"0bitmap$1084"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1179", + "fields":[{"name":"0bitmap$1094"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1190", - "fields":[{"name":"0bitmap$1094"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1180", + "fields":[{"name":"0bitmap$1088"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1191", - "fields":[{"name":"0bitmap$1089"}] + "fields":[{"name":"0bitmap$1093"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1192", - "fields":[{"name":"0bitmap$1085"}] + "fields":[{"name":"0bitmap$1089"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1193", - "fields":[{"name":"0bitmap$1086"}] + "fields":[{"name":"0bitmap$1090"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1194", - "fields":[{"name":"0bitmap$1087"}] + "fields":[{"name":"0bitmap$1091"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1195", - "fields":[{"name":"0bitmap$1088"}] + "fields":[{"name":"0bitmap$1092"}] +}, +{ + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1196", + "fields":[{"name":"0bitmap$1096"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1197", - "fields":[{"name":"0bitmap$1093"}] + "fields":[{"name":"0bitmap$1200"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1201", + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1198", "fields":[{"name":"0bitmap$1097"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1202", - "fields":[{"name":"0bitmap$1095"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1199", + "fields":[{"name":"0bitmap$1148"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1203", - "fields":[{"name":"0bitmap$1096"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1200", + "fields":[{"name":"0bitmap$1133"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1204", - "fields":[{"name":"0bitmap$1146"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1239", + "fields":[{"name":"0bitmap$1144"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1205", - "fields":[{"name":"0bitmap$1132"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1240", + "fields":[{"name":"0bitmap$1138"}] +}, +{ + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1241", + "fields":[{"name":"0bitmap$1134"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1242", - "fields":[{"name":"0bitmap$1142"}] + "fields":[{"name":"0bitmap$1135"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1243", - "fields":[{"name":"0bitmap$1137"}] + "fields":[{"name":"0bitmap$1136"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1244", - "fields":[{"name":"0bitmap$1133"}] -}, -{ - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1245", - "fields":[{"name":"0bitmap$1134"}] + "fields":[{"name":"0bitmap$1137"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1246", - "fields":[{"name":"0bitmap$1135"}] + "fields":[{"name":"0bitmap$1143"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1247", - "fields":[{"name":"0bitmap$1136"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1251", + "fields":[{"name":"0bitmap$1147"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1249", - "fields":[{"name":"0bitmap$1141"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1252", + "fields":[{"name":"0bitmap$1145"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1253", - "fields":[{"name":"0bitmap$1145"}] + "fields":[{"name":"0bitmap$1146"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1254", - "fields":[{"name":"0bitmap$1143"}] + "fields":[{"name":"0bitmap$1199"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1255", - "fields":[{"name":"0bitmap$1144"}] + "fields":[{"name":"0bitmap$1184"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1258", - "fields":[{"name":"0bitmap$1178"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1294", + "fields":[{"name":"0bitmap$1195"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1259", - "fields":[{"name":"0bitmap$1163"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1295", + "fields":[{"name":"0bitmap$1189"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1274", - "fields":[{"name":"0bitmap$1177"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1296", + "fields":[{"name":"0bitmap$1185"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1275", - "fields":[{"name":"0bitmap$1176"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1297", + "fields":[{"name":"0bitmap$1186"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1276", - "fields":[{"name":"0bitmap$1164"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1298", + "fields":[{"name":"0bitmap$1187"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1277", - "fields":[{"name":"0bitmap$1170"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1299", + "fields":[{"name":"0bitmap$1188"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1284", - "fields":[{"name":"0bitmap$1175"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1301", + "fields":[{"name":"0bitmap$1194"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1290", - "fields":[{"name":"0bitmap$1199"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1306", + "fields":[{"name":"0bitmap$1198"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1291", - "fields":[{"name":"0bitmap$1188"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1307", + "fields":[{"name":"0bitmap$1196"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1302", - "fields":[{"name":"0bitmap$1189"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1308", + "fields":[{"name":"0bitmap$1197"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1303", - "fields":[{"name":"0bitmap$1193"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1311", + "fields":[{"name":"0bitmap$1231"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1308", - "fields":[{"name":"0bitmap$1194"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1312", + "fields":[{"name":"0bitmap$1216"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1309", - "fields":[{"name":"0bitmap$1195"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1327", + "fields":[{"name":"0bitmap$1230"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1310", - "fields":[{"name":"0bitmap$1198"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1328", + "fields":[{"name":"0bitmap$1229"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1313", - "fields":[{"name":"0bitmap$1201"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1329", + "fields":[{"name":"0bitmap$1217"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1314", - "fields":[{"name":"0bitmap$1200"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1330", + "fields":[{"name":"0bitmap$1223"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1315", - "fields":[{"name":"0bitmap$1224"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1337", + "fields":[{"name":"0bitmap$1228"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1316", - "fields":[{"name":"0bitmap$1202"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1343", + "fields":[{"name":"0bitmap$1252"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1317", - "fields":[{"name":"0bitmap$1223"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1344", + "fields":[{"name":"0bitmap$1241"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1318", - "fields":[{"name":"0bitmap$1212"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1355", + "fields":[{"name":"0bitmap$1242"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1319", - "fields":[{"name":"0bitmap$1211"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1356", + "fields":[{"name":"0bitmap$1246"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1320", - "fields":[{"name":"0bitmap$1203"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1361", + "fields":[{"name":"0bitmap$1247"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1321", - "fields":[{"name":"0bitmap$1204"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1362", + "fields":[{"name":"0bitmap$1248"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1322", - "fields":[{"name":"0bitmap$1205"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1363", + "fields":[{"name":"0bitmap$1251"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1323", - "fields":[{"name":"0bitmap$1206"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1366", + "fields":[{"name":"0bitmap$1254"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1324", - "fields":[{"name":"0bitmap$1207"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1367", + "fields":[{"name":"0bitmap$1253"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1325", - "fields":[{"name":"0bitmap$1208"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1368", + "fields":[{"name":"0bitmap$1277"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1326", - "fields":[{"name":"0bitmap$1209"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1369", + "fields":[{"name":"0bitmap$1255"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1327", - "fields":[{"name":"0bitmap$1210"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$137", + "fields":[{"name":"0bitmap$256"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1329", - "fields":[{"name":"0bitmap$1213"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1370", + "fields":[{"name":"0bitmap$1276"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$133", - "fields":[{"name":"0bitmap$243"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1371", + "fields":[{"name":"0bitmap$1265"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1330", - "fields":[{"name":"0bitmap$1217"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1372", + "fields":[{"name":"0bitmap$1264"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1331", - "fields":[{"name":"0bitmap$1216"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1373", + "fields":[{"name":"0bitmap$1256"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1332", - "fields":[{"name":"0bitmap$1214"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1374", + "fields":[{"name":"0bitmap$1257"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1333", - "fields":[{"name":"0bitmap$1215"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1375", + "fields":[{"name":"0bitmap$1258"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1335", - "fields":[{"name":"0bitmap$1218"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1376", + "fields":[{"name":"0bitmap$1259"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1336", - "fields":[{"name":"0bitmap$1219"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1377", + "fields":[{"name":"0bitmap$1260"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1337", - "fields":[{"name":"0bitmap$1222"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1378", + "fields":[{"name":"0bitmap$1261"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$134", - "fields":[{"name":"0bitmap$166"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1379", + "fields":[{"name":"0bitmap$1262"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1340", - "fields":[{"name":"0bitmap$1248"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$138", + "fields":[{"name":"0bitmap$173"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1341", - "fields":[{"name":"0bitmap$1238"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1380", + "fields":[{"name":"0bitmap$1263"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$135", - "fields":[{"name":"0bitmap$152"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1382", + "fields":[{"name":"0bitmap$1266"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1356", - "fields":[{"name":"0bitmap$1247"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1383", + "fields":[{"name":"0bitmap$1270"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1357", - "fields":[{"name":"0bitmap$1246"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1384", + "fields":[{"name":"0bitmap$1269"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1358", - "fields":[{"name":"0bitmap$1239"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1385", + "fields":[{"name":"0bitmap$1267"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1359", - "fields":[{"name":"0bitmap$1240"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1386", + "fields":[{"name":"0bitmap$1268"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1360", - "fields":[{"name":"0bitmap$1241"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1388", + "fields":[{"name":"0bitmap$1271"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1361", - "fields":[{"name":"0bitmap$1242"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1389", + "fields":[{"name":"0bitmap$1272"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1362", - "fields":[{"name":"0bitmap$1243"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$139", + "fields":[{"name":"0bitmap$158"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1363", - "fields":[{"name":"0bitmap$1244"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1390", + "fields":[{"name":"0bitmap$1275"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1364", - "fields":[{"name":"0bitmap$1245"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1393", + "fields":[{"name":"0bitmap$1301"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1368", - "fields":[{"name":"0bitmap$1252"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1394", + "fields":[{"name":"0bitmap$1291"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1369", - "fields":[{"name":"0bitmap$1251"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1409", + "fields":[{"name":"0bitmap$1300"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1370", - "fields":[{"name":"0bitmap$1314"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1410", + "fields":[{"name":"0bitmap$1299"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1371", - "fields":[{"name":"0bitmap$1286"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1411", + "fields":[{"name":"0bitmap$1292"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1408", - "fields":[{"name":"0bitmap$1309"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1412", + "fields":[{"name":"0bitmap$1293"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1409", - "fields":[{"name":"0bitmap$1290"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1413", + "fields":[{"name":"0bitmap$1294"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1414", - "fields":[{"name":"0bitmap$1304"}] + "fields":[{"name":"0bitmap$1295"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1415", - "fields":[{"name":"0bitmap$1291"}] + "fields":[{"name":"0bitmap$1296"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1416", - "fields":[{"name":"0bitmap$1292"}] + "fields":[{"name":"0bitmap$1297"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1417", - "fields":[{"name":"0bitmap$1293"}] + "fields":[{"name":"0bitmap$1298"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1418", - "fields":[{"name":"0bitmap$1294"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1421", + "fields":[{"name":"0bitmap$1305"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1419", - "fields":[{"name":"0bitmap$1295"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1422", + "fields":[{"name":"0bitmap$1304"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1420", - "fields":[{"name":"0bitmap$1296"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1423", + "fields":[{"name":"0bitmap$1371"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1421", - "fields":[{"name":"0bitmap$1297"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1424", + "fields":[{"name":"0bitmap$1341"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1422", - "fields":[{"name":"0bitmap$1298"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1463", + "fields":[{"name":"0bitmap$1365"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1423", - "fields":[{"name":"0bitmap$1299"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1464", + "fields":[{"name":"0bitmap$1345"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1424", - "fields":[{"name":"0bitmap$1300"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1469", + "fields":[{"name":"0bitmap$1359"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1425", - "fields":[{"name":"0bitmap$1301"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1470", + "fields":[{"name":"0bitmap$1346"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1426", - "fields":[{"name":"0bitmap$1302"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1471", + "fields":[{"name":"0bitmap$1347"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1427", - "fields":[{"name":"0bitmap$1303"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1472", + "fields":[{"name":"0bitmap$1348"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1429", - "fields":[{"name":"0bitmap$1308"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1473", + "fields":[{"name":"0bitmap$1349"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1433", - "fields":[{"name":"0bitmap$1313"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1474", + "fields":[{"name":"0bitmap$1350"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1437", - "fields":[{"name":"0bitmap$1344"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1475", + "fields":[{"name":"0bitmap$1351"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1438", - "fields":[{"name":"0bitmap$1326"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1476", + "fields":[{"name":"0bitmap$1352"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1453", - "fields":[{"name":"0bitmap$1329"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1477", + "fields":[{"name":"0bitmap$1353"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1454", - "fields":[{"name":"0bitmap$1327"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1478", + "fields":[{"name":"0bitmap$1354"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1455", - "fields":[{"name":"0bitmap$1328"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1479", + "fields":[{"name":"0bitmap$1355"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1457", - "fields":[{"name":"0bitmap$1343"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1480", + "fields":[{"name":"0bitmap$1356"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1458", - "fields":[{"name":"0bitmap$1342"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1481", + "fields":[{"name":"0bitmap$1357"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1459", - "fields":[{"name":"0bitmap$1330"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1482", + "fields":[{"name":"0bitmap$1358"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1460", - "fields":[{"name":"0bitmap$1336"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1484", + "fields":[{"name":"0bitmap$1364"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1467", - "fields":[{"name":"0bitmap$1341"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1489", + "fields":[{"name":"0bitmap$1370"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1468", - "fields":[{"name":"0bitmap$1340"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1494", + "fields":[{"name":"0bitmap$1401"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1469", - "fields":[{"name":"0bitmap$1337"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1495", + "fields":[{"name":"0bitmap$1383"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1470", - "fields":[{"name":"0bitmap$1338"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1510", + "fields":[{"name":"0bitmap$1386"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1471", - "fields":[{"name":"0bitmap$1339"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1511", + "fields":[{"name":"0bitmap$1384"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1473", - "fields":[{"name":"0bitmap$1406"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1512", + "fields":[{"name":"0bitmap$1385"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1474", - "fields":[{"name":"0bitmap$1371"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1514", + "fields":[{"name":"0bitmap$1400"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1503", + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1515", "fields":[{"name":"0bitmap$1399"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1504", - "fields":[{"name":"0bitmap$1398"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1516", + "fields":[{"name":"0bitmap$1387"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1533", - "fields":[{"name":"0bitmap$1402"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1517", + "fields":[{"name":"0bitmap$1393"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1534", - "fields":[{"name":"0bitmap$1400"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1524", + "fields":[{"name":"0bitmap$1398"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1535", - "fields":[{"name":"0bitmap$1401"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1525", + "fields":[{"name":"0bitmap$1397"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1536", - "fields":[{"name":"0bitmap$1405"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1526", + "fields":[{"name":"0bitmap$1394"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1537", - "fields":[{"name":"0bitmap$1403"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1527", + "fields":[{"name":"0bitmap$1395"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1538", - "fields":[{"name":"0bitmap$1404"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1528", + "fields":[{"name":"0bitmap$1396"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1539", - "fields":[{"name":"0bitmap$1427"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1530", + "fields":[{"name":"0bitmap$1463"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1540", - "fields":[{"name":"0bitmap$1416"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1531", + "fields":[{"name":"0bitmap$1428"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1551", - "fields":[{"name":"0bitmap$1417"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1560", + "fields":[{"name":"0bitmap$1456"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1552", - "fields":[{"name":"0bitmap$1421"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1561", + "fields":[{"name":"0bitmap$1455"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1553", - "fields":[{"name":"0bitmap$1420"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1590", + "fields":[{"name":"0bitmap$1459"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1554", - "fields":[{"name":"0bitmap$1418"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1591", + "fields":[{"name":"0bitmap$1457"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1555", - "fields":[{"name":"0bitmap$1419"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1592", + "fields":[{"name":"0bitmap$1458"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1557", - "fields":[{"name":"0bitmap$1422"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1593", + "fields":[{"name":"0bitmap$1462"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1558", - "fields":[{"name":"0bitmap$1423"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1594", + "fields":[{"name":"0bitmap$1460"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1559", - "fields":[{"name":"0bitmap$1426"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1595", + "fields":[{"name":"0bitmap$1461"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1562", - "fields":[{"name":"0bitmap$1430"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1596", + "fields":[{"name":"0bitmap$1484"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1563", - "fields":[{"name":"0bitmap$1428"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1597", + "fields":[{"name":"0bitmap$1473"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1564", - "fields":[{"name":"0bitmap$1429"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1608", + "fields":[{"name":"0bitmap$1474"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1565", - "fields":[{"name":"0bitmap$1433"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1609", + "fields":[{"name":"0bitmap$1478"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1566", - "fields":[{"name":"0bitmap$1431"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1610", + "fields":[{"name":"0bitmap$1477"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1567", - "fields":[{"name":"0bitmap$1432"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1611", + "fields":[{"name":"0bitmap$1475"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1568", - "fields":[{"name":"0bitmap$1440"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1612", + "fields":[{"name":"0bitmap$1476"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1576", - "fields":[{"name":"0bitmap$1441"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1614", + "fields":[{"name":"0bitmap$1479"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1577", - "fields":[{"name":"0bitmap$1449"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1615", + "fields":[{"name":"0bitmap$1480"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1586", - "fields":[{"name":"0bitmap$1452"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1616", + "fields":[{"name":"0bitmap$1483"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1587", - "fields":[{"name":"0bitmap$1450"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1619", + "fields":[{"name":"0bitmap$1487"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1588", - "fields":[{"name":"0bitmap$1451"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1620", + "fields":[{"name":"0bitmap$1485"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$172", - "fields":[{"name":"0bitmap$162"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1621", + "fields":[{"name":"0bitmap$1486"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$173", - "fields":[{"name":"0bitmap$157"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1622", + "fields":[{"name":"0bitmap$1490"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$174", - "fields":[{"name":"0bitmap$153"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1623", + "fields":[{"name":"0bitmap$1488"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$175", - "fields":[{"name":"0bitmap$154"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1624", + "fields":[{"name":"0bitmap$1489"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$176", - "fields":[{"name":"0bitmap$155"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1625", + "fields":[{"name":"0bitmap$1497"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$177", - "fields":[{"name":"0bitmap$156"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1633", + "fields":[{"name":"0bitmap$1498"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$179", - "fields":[{"name":"0bitmap$161"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1634", + "fields":[{"name":"0bitmap$1506"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$183", - "fields":[{"name":"0bitmap$165"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1643", + "fields":[{"name":"0bitmap$1509"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$184", - "fields":[{"name":"0bitmap$163"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1644", + "fields":[{"name":"0bitmap$1507"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$185", - "fields":[{"name":"0bitmap$164"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$1645", + "fields":[{"name":"0bitmap$1508"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$186", - "fields":[{"name":"0bitmap$228"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$178", + "fields":[{"name":"0bitmap$169"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$187", - "fields":[{"name":"0bitmap$200"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$179", + "fields":[{"name":"0bitmap$163"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$2", - "fields":[{"name":"0bitmap$2"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$180", + "fields":[{"name":"0bitmap$159"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$224", - "fields":[{"name":"0bitmap$223"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$181", + "fields":[{"name":"0bitmap$160"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$225", - "fields":[{"name":"0bitmap$204"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$182", + "fields":[{"name":"0bitmap$161"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$230", - "fields":[{"name":"0bitmap$218"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$183", + "fields":[{"name":"0bitmap$162"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$231", - "fields":[{"name":"0bitmap$205"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$185", + "fields":[{"name":"0bitmap$168"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$232", - "fields":[{"name":"0bitmap$206"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$190", + "fields":[{"name":"0bitmap$172"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$233", - "fields":[{"name":"0bitmap$207"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$191", + "fields":[{"name":"0bitmap$170"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$234", - "fields":[{"name":"0bitmap$208"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$192", + "fields":[{"name":"0bitmap$171"}] +}, +{ + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$193", + "fields":[{"name":"0bitmap$239"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$235", + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$194", "fields":[{"name":"0bitmap$209"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$236", - "fields":[{"name":"0bitmap$210"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$2", + "fields":[{"name":"0bitmap$2"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$237", - "fields":[{"name":"0bitmap$211"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$233", + "fields":[{"name":"0bitmap$233"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$238", - "fields":[{"name":"0bitmap$212"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$234", + "fields":[{"name":"0bitmap$213"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$239", - "fields":[{"name":"0bitmap$213"}] + "fields":[{"name":"0bitmap$227"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$240", @@ -882,33 +850,69 @@ "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$243", "fields":[{"name":"0bitmap$217"}] }, +{ + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$244", + "fields":[{"name":"0bitmap$218"}] +}, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$245", + "fields":[{"name":"0bitmap$219"}] +}, +{ + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$246", + "fields":[{"name":"0bitmap$220"}] +}, +{ + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$247", + "fields":[{"name":"0bitmap$221"}] +}, +{ + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$248", "fields":[{"name":"0bitmap$222"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$249", - "fields":[{"name":"0bitmap$227"}] + "fields":[{"name":"0bitmap$223"}] +}, +{ + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$250", + "fields":[{"name":"0bitmap$224"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$253", - "fields":[{"name":"0bitmap$242"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$251", + "fields":[{"name":"0bitmap$225"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$268", - "fields":[{"name":"0bitmap$244"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$252", + "fields":[{"name":"0bitmap$226"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$269", - "fields":[{"name":"0bitmap$342"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$254", + "fields":[{"name":"0bitmap$232"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$375", - "fields":[{"name":"0bitmap$345"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$259", + "fields":[{"name":"0bitmap$238"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$377", - "fields":[{"name":"0bitmap$461"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$264", + "fields":[{"name":"0bitmap$255"}] +}, +{ + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$281", + "fields":[{"name":"0bitmap$257"}] +}, +{ + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$282", + "fields":[{"name":"0bitmap$361"}] +}, +{ + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$394", + "fields":[{"name":"0bitmap$364"}] +}, +{ + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$396", + "fields":[{"name":"0bitmap$484"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$4", @@ -916,571 +920,575 @@ }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$5", - "fields":[{"name":"0bitmap$343"}] + "fields":[{"name":"0bitmap$362"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$504", - "fields":[{"name":"0bitmap$475"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$527", + "fields":[{"name":"0bitmap$498"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$505", - "fields":[{"name":"0bitmap$474"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$528", + "fields":[{"name":"0bitmap$497"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$506", - "fields":[{"name":"0bitmap$463"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$529", + "fields":[{"name":"0bitmap$486"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$508", - "fields":[{"name":"0bitmap$473"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$531", + "fields":[{"name":"0bitmap$496"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$509", - "fields":[{"name":"0bitmap$472"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$532", + "fields":[{"name":"0bitmap$495"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$510", - "fields":[{"name":"0bitmap$464"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$533", + "fields":[{"name":"0bitmap$487"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$511", - "fields":[{"name":"0bitmap$465"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$534", + "fields":[{"name":"0bitmap$488"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$512", - "fields":[{"name":"0bitmap$466"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$535", + "fields":[{"name":"0bitmap$489"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$513", - "fields":[{"name":"0bitmap$467"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$536", + "fields":[{"name":"0bitmap$490"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$514", - "fields":[{"name":"0bitmap$468"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$537", + "fields":[{"name":"0bitmap$491"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$515", - "fields":[{"name":"0bitmap$469"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$538", + "fields":[{"name":"0bitmap$492"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$516", - "fields":[{"name":"0bitmap$470"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$539", + "fields":[{"name":"0bitmap$493"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$517", - "fields":[{"name":"0bitmap$471"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$540", + "fields":[{"name":"0bitmap$494"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$519", - "fields":[{"name":"0bitmap$601"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$542", + "fields":[{"name":"0bitmap$633"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$520", - "fields":[{"name":"0bitmap$600"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$543", + "fields":[{"name":"0bitmap$632"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$521", - "fields":[{"name":"0bitmap$523"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$544", + "fields":[{"name":"0bitmap$549"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$522", - "fields":[{"name":"0bitmap$509"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$545", + "fields":[{"name":"0bitmap$534"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$559", - "fields":[{"name":"0bitmap$519"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$584", + "fields":[{"name":"0bitmap$545"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$560", - "fields":[{"name":"0bitmap$514"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$585", + "fields":[{"name":"0bitmap$539"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$561", - "fields":[{"name":"0bitmap$510"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$586", + "fields":[{"name":"0bitmap$535"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$562", - "fields":[{"name":"0bitmap$511"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$587", + "fields":[{"name":"0bitmap$536"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$563", - "fields":[{"name":"0bitmap$512"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$588", + "fields":[{"name":"0bitmap$537"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$564", - "fields":[{"name":"0bitmap$513"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$589", + "fields":[{"name":"0bitmap$538"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$566", - "fields":[{"name":"0bitmap$518"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$591", + "fields":[{"name":"0bitmap$544"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$570", - "fields":[{"name":"0bitmap$522"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$596", + "fields":[{"name":"0bitmap$548"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$571", - "fields":[{"name":"0bitmap$520"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$597", + "fields":[{"name":"0bitmap$546"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$572", - "fields":[{"name":"0bitmap$521"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$598", + "fields":[{"name":"0bitmap$547"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$573", - "fields":[{"name":"0bitmap$585"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$599", + "fields":[{"name":"0bitmap$615"}] }, { "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$6", - "fields":[{"name":"0bitmap$118"}] + "fields":[{"name":"0bitmap$122"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$640", - "fields":[{"name":"0bitmap$599"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$670", + "fields":[{"name":"0bitmap$631"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$655", - "fields":[{"name":"0bitmap$699"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$687", + "fields":[{"name":"0bitmap$731"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$656", - "fields":[{"name":"0bitmap$613"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$688", + "fields":[{"name":"0bitmap$645"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$657", - "fields":[{"name":"0bitmap$611"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$689", + "fields":[{"name":"0bitmap$643"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$658", - "fields":[{"name":"0bitmap$610"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$690", + "fields":[{"name":"0bitmap$642"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$659", - "fields":[{"name":"0bitmap$602"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$691", + "fields":[{"name":"0bitmap$634"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$660", - "fields":[{"name":"0bitmap$603"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$692", + "fields":[{"name":"0bitmap$635"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$661", - "fields":[{"name":"0bitmap$604"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$693", + "fields":[{"name":"0bitmap$636"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$662", - "fields":[{"name":"0bitmap$605"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$694", + "fields":[{"name":"0bitmap$637"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$663", - "fields":[{"name":"0bitmap$606"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$695", + "fields":[{"name":"0bitmap$638"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$664", - "fields":[{"name":"0bitmap$607"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$696", + "fields":[{"name":"0bitmap$639"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$665", - "fields":[{"name":"0bitmap$608"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$697", + "fields":[{"name":"0bitmap$640"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$666", - "fields":[{"name":"0bitmap$609"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$698", + "fields":[{"name":"0bitmap$641"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$668", - "fields":[{"name":"0bitmap$612"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$700", + "fields":[{"name":"0bitmap$644"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$670", - "fields":[{"name":"0bitmap$629"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$702", + "fields":[{"name":"0bitmap$661"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$671", - "fields":[{"name":"0bitmap$623"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$703", + "fields":[{"name":"0bitmap$655"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$682", - "fields":[{"name":"0bitmap$627"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$714", + "fields":[{"name":"0bitmap$659"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$683", - "fields":[{"name":"0bitmap$626"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$715", + "fields":[{"name":"0bitmap$658"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$684", - "fields":[{"name":"0bitmap$624"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$716", + "fields":[{"name":"0bitmap$656"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$685", - "fields":[{"name":"0bitmap$625"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$717", + "fields":[{"name":"0bitmap$657"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$687", - "fields":[{"name":"0bitmap$628"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$719", + "fields":[{"name":"0bitmap$660"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$689", - "fields":[{"name":"0bitmap$639"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$721", + "fields":[{"name":"0bitmap$671"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$700", - "fields":[{"name":"0bitmap$643"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$732", + "fields":[{"name":"0bitmap$675"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$705", - "fields":[{"name":"0bitmap$644"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$737", + "fields":[{"name":"0bitmap$676"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$706", - "fields":[{"name":"0bitmap$645"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$738", + "fields":[{"name":"0bitmap$677"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$707", - "fields":[{"name":"0bitmap$646"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$739", + "fields":[{"name":"0bitmap$678"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$708", - "fields":[{"name":"0bitmap$648"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$740", + "fields":[{"name":"0bitmap$680"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$709", - "fields":[{"name":"0bitmap$647"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$741", + "fields":[{"name":"0bitmap$679"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$710", - "fields":[{"name":"0bitmap$665"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$742", + "fields":[{"name":"0bitmap$697"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$711", - "fields":[{"name":"0bitmap$649"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$743", + "fields":[{"name":"0bitmap$681"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$712", - "fields":[{"name":"0bitmap$650"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$744", + "fields":[{"name":"0bitmap$682"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$713", - "fields":[{"name":"0bitmap$664"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$745", + "fields":[{"name":"0bitmap$696"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$714", - "fields":[{"name":"0bitmap$663"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$746", + "fields":[{"name":"0bitmap$695"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$715", - "fields":[{"name":"0bitmap$651"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$747", + "fields":[{"name":"0bitmap$683"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$716", - "fields":[{"name":"0bitmap$657"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$748", + "fields":[{"name":"0bitmap$689"}] +}, +{ + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$755", + "fields":[{"name":"0bitmap$694"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$723", - "fields":[{"name":"0bitmap$662"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$761", + "fields":[{"name":"0bitmap$710"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$729", - "fields":[{"name":"0bitmap$678"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$762", + "fields":[{"name":"0bitmap$699"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$730", - "fields":[{"name":"0bitmap$667"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$764", + "fields":[{"name":"0bitmap$709"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$732", - "fields":[{"name":"0bitmap$677"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$765", + "fields":[{"name":"0bitmap$708"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$733", - "fields":[{"name":"0bitmap$676"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$766", + "fields":[{"name":"0bitmap$700"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$734", - "fields":[{"name":"0bitmap$668"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$767", + "fields":[{"name":"0bitmap$701"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$735", - "fields":[{"name":"0bitmap$669"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$768", + "fields":[{"name":"0bitmap$702"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$736", - "fields":[{"name":"0bitmap$670"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$769", + "fields":[{"name":"0bitmap$703"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$737", - "fields":[{"name":"0bitmap$671"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$770", + "fields":[{"name":"0bitmap$704"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$738", - "fields":[{"name":"0bitmap$672"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$771", + "fields":[{"name":"0bitmap$705"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$739", - "fields":[{"name":"0bitmap$673"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$772", + "fields":[{"name":"0bitmap$706"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$740", - "fields":[{"name":"0bitmap$674"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$773", + "fields":[{"name":"0bitmap$707"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$741", - "fields":[{"name":"0bitmap$675"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$775", + "fields":[{"name":"0bitmap$728"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$743", - "fields":[{"name":"0bitmap$696"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$776", + "fields":[{"name":"0bitmap$712"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$744", - "fields":[{"name":"0bitmap$680"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$778", + "fields":[{"name":"0bitmap$713"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$746", - "fields":[{"name":"0bitmap$681"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$779", + "fields":[{"name":"0bitmap$727"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$747", - "fields":[{"name":"0bitmap$695"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$795", + "fields":[{"name":"0bitmap$729"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$763", - "fields":[{"name":"0bitmap$697"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$796", + "fields":[{"name":"0bitmap$730"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$764", - "fields":[{"name":"0bitmap$698"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$797", + "fields":[{"name":"0bitmap$753"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$765", - "fields":[{"name":"0bitmap$721"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$798", + "fields":[{"name":"0bitmap$752"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$766", - "fields":[{"name":"0bitmap$720"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$799", + "fields":[{"name":"0bitmap$741"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$767", - "fields":[{"name":"0bitmap$709"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$810", + "fields":[{"name":"0bitmap$742"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$778", - "fields":[{"name":"0bitmap$710"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$811", + "fields":[{"name":"0bitmap$746"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$779", - "fields":[{"name":"0bitmap$714"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$812", + "fields":[{"name":"0bitmap$745"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$780", - "fields":[{"name":"0bitmap$713"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$813", + "fields":[{"name":"0bitmap$743"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$781", - "fields":[{"name":"0bitmap$711"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$814", + "fields":[{"name":"0bitmap$744"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$782", - "fields":[{"name":"0bitmap$712"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$816", + "fields":[{"name":"0bitmap$747"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$784", - "fields":[{"name":"0bitmap$715"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$817", + "fields":[{"name":"0bitmap$748"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$785", - "fields":[{"name":"0bitmap$716"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$818", + "fields":[{"name":"0bitmap$751"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$786", - "fields":[{"name":"0bitmap$719"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$819", + "fields":[{"name":"0bitmap$750"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$787", - "fields":[{"name":"0bitmap$718"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$820", + "fields":[{"name":"0bitmap$749"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$788", - "fields":[{"name":"0bitmap$717"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$821", + "fields":[{"name":"0bitmap$775"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$789", - "fields":[{"name":"0bitmap$743"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$822", + "fields":[{"name":"0bitmap$774"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$790", - "fields":[{"name":"0bitmap$742"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$823", + "fields":[{"name":"0bitmap$763"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$791", - "fields":[{"name":"0bitmap$731"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$824", + "fields":[{"name":"0bitmap$762"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$792", - "fields":[{"name":"0bitmap$730"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$825", + "fields":[{"name":"0bitmap$754"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$793", - "fields":[{"name":"0bitmap$722"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$826", + "fields":[{"name":"0bitmap$755"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$794", - "fields":[{"name":"0bitmap$723"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$827", + "fields":[{"name":"0bitmap$756"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$795", - "fields":[{"name":"0bitmap$724"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$828", + "fields":[{"name":"0bitmap$757"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$796", - "fields":[{"name":"0bitmap$725"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$829", + "fields":[{"name":"0bitmap$758"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$797", - "fields":[{"name":"0bitmap$726"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$830", + "fields":[{"name":"0bitmap$759"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$798", - "fields":[{"name":"0bitmap$727"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$831", + "fields":[{"name":"0bitmap$760"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$799", - "fields":[{"name":"0bitmap$728"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$832", + "fields":[{"name":"0bitmap$761"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$800", - "fields":[{"name":"0bitmap$729"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$834", + "fields":[{"name":"0bitmap$764"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$802", - "fields":[{"name":"0bitmap$732"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$835", + "fields":[{"name":"0bitmap$768"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$803", - "fields":[{"name":"0bitmap$736"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$840", + "fields":[{"name":"0bitmap$769"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$808", - "fields":[{"name":"0bitmap$737"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$841", + "fields":[{"name":"0bitmap$770"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$809", - "fields":[{"name":"0bitmap$738"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$842", + "fields":[{"name":"0bitmap$773"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$810", - "fields":[{"name":"0bitmap$741"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$845", + "fields":[{"name":"0bitmap$793"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$813", - "fields":[{"name":"0bitmap$761"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$846", + "fields":[{"name":"0bitmap$792"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$814", - "fields":[{"name":"0bitmap$760"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$847", + "fields":[{"name":"0bitmap$776"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$815", - "fields":[{"name":"0bitmap$744"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$848", + "fields":[{"name":"0bitmap$777"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$816", - "fields":[{"name":"0bitmap$745"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$849", + "fields":[{"name":"0bitmap$791"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$817", - "fields":[{"name":"0bitmap$759"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$865", + "fields":[{"name":"0bitmap$812"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$833", - "fields":[{"name":"0bitmap$780"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$866", + "fields":[{"name":"0bitmap$811"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$834", - "fields":[{"name":"0bitmap$779"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$867", + "fields":[{"name":"0bitmap$795"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$835", - "fields":[{"name":"0bitmap$763"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$869", + "fields":[{"name":"0bitmap$796"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$837", - "fields":[{"name":"0bitmap$764"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$870", + "fields":[{"name":"0bitmap$810"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$838", - "fields":[{"name":"0bitmap$778"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$886", + "fields":[{"name":"0bitmap$842"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$854", - "fields":[{"name":"0bitmap$808"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$887", + "fields":[{"name":"0bitmap$836"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$855", - "fields":[{"name":"0bitmap$802"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$888", + "fields":[{"name":"0bitmap$826"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$856", - "fields":[{"name":"0bitmap$793"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$904", + "fields":[{"name":"0bitmap$835"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$871", - "fields":[{"name":"0bitmap$801"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$905", + "fields":[{"name":"0bitmap$832"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$872", - "fields":[{"name":"0bitmap$798"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$906", + "fields":[{"name":"0bitmap$831"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$873", - "fields":[{"name":"0bitmap$797"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$907", + "fields":[{"name":"0bitmap$827"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$874", - "fields":[{"name":"0bitmap$794"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$908", + "fields":[{"name":"0bitmap$828"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$875", - "fields":[{"name":"0bitmap$795"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$909", + "fields":[{"name":"0bitmap$829"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$876", - "fields":[{"name":"0bitmap$796"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$910", + "fields":[{"name":"0bitmap$830"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$877", - "fields":[{"name":"0bitmap$799"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$911", + "fields":[{"name":"0bitmap$833"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$878", - "fields":[{"name":"0bitmap$800"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$912", + "fields":[{"name":"0bitmap$834"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$880", - "fields":[{"name":"0bitmap$807"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$914", + "fields":[{"name":"0bitmap$841"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$881", - "fields":[{"name":"0bitmap$803"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$915", + "fields":[{"name":"0bitmap$837"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$882", - "fields":[{"name":"0bitmap$806"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$916", + "fields":[{"name":"0bitmap$840"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$883", - "fields":[{"name":"0bitmap$804"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$917", + "fields":[{"name":"0bitmap$838"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$884", - "fields":[{"name":"0bitmap$805"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$918", + "fields":[{"name":"0bitmap$839"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$886", - "fields":[{"name":"0bitmap$1148"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$920", + "fields":[{"name":"0bitmap$1201"}] }, { - "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$887", - "fields":[{"name":"0bitmap$923"}] + "name":"fpp.compiler.codegen.AnalysisJsonEncoder$$anon$921", + "fields":[{"name":"0bitmap$961"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$1", @@ -1512,11 +1520,11 @@ }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$108", - "fields":[{"name":"0bitmap$113"}] + "fields":[{"name":"0bitmap$114"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$109", - "fields":[{"name":"0bitmap$112"}] + "fields":[{"name":"0bitmap$113"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$11", @@ -1560,7 +1568,7 @@ }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$120", - "fields":[{"name":"0bitmap$111"}] + "fields":[{"name":"0bitmap$112"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$121", @@ -1576,23 +1584,23 @@ }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$124", - "fields":[{"name":"0bitmap$115"}] + "fields":[{"name":"0bitmap$111"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$126", - "fields":[{"name":"0bitmap$129"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$125", + "fields":[{"name":"0bitmap$116"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$127", - "fields":[{"name":"0bitmap$128"}] + "fields":[{"name":"0bitmap$130"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$128", - "fields":[{"name":"0bitmap$119"}] + "fields":[{"name":"0bitmap$129"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$129", - "fields":[{"name":"0bitmap$118"}] + "fields":[{"name":"0bitmap$120"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$13", @@ -1600,19 +1608,19 @@ }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$130", - "fields":[{"name":"0bitmap$116"}] + "fields":[{"name":"0bitmap$119"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$131", "fields":[{"name":"0bitmap$117"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$133", - "fields":[{"name":"0bitmap$127"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$132", + "fields":[{"name":"0bitmap$118"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$134", - "fields":[{"name":"0bitmap$120"}] + "fields":[{"name":"0bitmap$128"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$135", @@ -1643,28 +1651,28 @@ "fields":[{"name":"0bitmap$126"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$142", - "fields":[{"name":"0bitmap$131"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$141", + "fields":[{"name":"0bitmap$127"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$144", - "fields":[{"name":"0bitmap$141"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$143", + "fields":[{"name":"0bitmap$132"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$145", - "fields":[{"name":"0bitmap$140"}] + "fields":[{"name":"0bitmap$143"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$146", - "fields":[{"name":"0bitmap$135"}] + "fields":[{"name":"0bitmap$142"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$147", - "fields":[{"name":"0bitmap$134"}] + "fields":[{"name":"0bitmap$136"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$148", - "fields":[{"name":"0bitmap$132"}] + "fields":[{"name":"0bitmap$135"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$149", @@ -1675,12 +1683,12 @@ "fields":[{"name":"0bitmap$14"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$151", - "fields":[{"name":"0bitmap$139"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$150", + "fields":[{"name":"0bitmap$134"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$152", - "fields":[{"name":"0bitmap$136"}] + "fields":[{"name":"0bitmap$141"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$153", @@ -1692,23 +1700,23 @@ }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$155", - "fields":[{"name":"0bitmap$143"}] + "fields":[{"name":"0bitmap$139"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$156", - "fields":[{"name":"0bitmap$142"}] + "fields":[{"name":"0bitmap$140"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$157", - "fields":[{"name":"0bitmap$178"}] + "fields":[{"name":"0bitmap$145"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$158", - "fields":[{"name":"0bitmap$177"}] + "fields":[{"name":"0bitmap$144"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$159", - "fields":[{"name":"0bitmap$153"}] + "fields":[{"name":"0bitmap$182"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$16", @@ -1716,15 +1724,15 @@ }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$160", - "fields":[{"name":"0bitmap$148"}] + "fields":[{"name":"0bitmap$181"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$161", - "fields":[{"name":"0bitmap$144"}] + "fields":[{"name":"0bitmap$156"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$162", - "fields":[{"name":"0bitmap$145"}] + "fields":[{"name":"0bitmap$150"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$163", @@ -1735,16 +1743,16 @@ "fields":[{"name":"0bitmap$147"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$166", - "fields":[{"name":"0bitmap$152"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$165", + "fields":[{"name":"0bitmap$148"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$167", + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$166", "fields":[{"name":"0bitmap$149"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$168", - "fields":[{"name":"0bitmap$150"}] + "fields":[{"name":"0bitmap$155"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$169", @@ -1756,27 +1764,27 @@ }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$170", - "fields":[{"name":"0bitmap$176"}] + "fields":[{"name":"0bitmap$152"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$171", - "fields":[{"name":"0bitmap$157"}] + "fields":[{"name":"0bitmap$153"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$176", - "fields":[{"name":"0bitmap$171"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$172", + "fields":[{"name":"0bitmap$154"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$177", - "fields":[{"name":"0bitmap$158"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$173", + "fields":[{"name":"0bitmap$180"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$178", - "fields":[{"name":"0bitmap$159"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$174", + "fields":[{"name":"0bitmap$160"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$179", - "fields":[{"name":"0bitmap$160"}] + "fields":[{"name":"0bitmap$174"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$18", @@ -1827,24 +1835,24 @@ "fields":[{"name":"0bitmap$19"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$191", - "fields":[{"name":"0bitmap$175"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$190", + "fields":[{"name":"0bitmap$171"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$195", - "fields":[{"name":"0bitmap$180"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$191", + "fields":[{"name":"0bitmap$172"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$196", - "fields":[{"name":"0bitmap$179"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$192", + "fields":[{"name":"0bitmap$173"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$197", - "fields":[{"name":"0bitmap$182"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$194", + "fields":[{"name":"0bitmap$179"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$199", - "fields":[{"name":"0bitmap$195"}] + "fields":[{"name":"0bitmap$184"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$2", @@ -1856,19 +1864,19 @@ }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$200", - "fields":[{"name":"0bitmap$194"}] + "fields":[{"name":"0bitmap$183"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$201", - "fields":[{"name":"0bitmap$185"}] + "fields":[{"name":"0bitmap$186"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$202", - "fields":[{"name":"0bitmap$183"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$203", + "fields":[{"name":"0bitmap$199"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$203", - "fields":[{"name":"0bitmap$184"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$204", + "fields":[{"name":"0bitmap$198"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$205", @@ -1876,15 +1884,15 @@ }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$206", - "fields":[{"name":"0bitmap$186"}] + "fields":[{"name":"0bitmap$187"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$207", - "fields":[{"name":"0bitmap$187"}] + "fields":[{"name":"0bitmap$188"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$208", - "fields":[{"name":"0bitmap$188"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$209", + "fields":[{"name":"0bitmap$193"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$21", @@ -1892,35 +1900,31 @@ }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$210", - "fields":[{"name":"0bitmap$193"}] -}, -{ - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$211", "fields":[{"name":"0bitmap$190"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$212", + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$211", "fields":[{"name":"0bitmap$191"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$213", + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$212", "fields":[{"name":"0bitmap$192"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$216", - "fields":[{"name":"0bitmap$221"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$214", + "fields":[{"name":"0bitmap$197"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$217", - "fields":[{"name":"0bitmap$201"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$215", + "fields":[{"name":"0bitmap$194"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$218", - "fields":[{"name":"0bitmap$200"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$216", + "fields":[{"name":"0bitmap$195"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$219", - "fields":[{"name":"0bitmap$199"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$217", + "fields":[{"name":"0bitmap$196"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$22", @@ -1928,43 +1932,43 @@ }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$220", - "fields":[{"name":"0bitmap$197"}] + "fields":[{"name":"0bitmap$225"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$221", - "fields":[{"name":"0bitmap$198"}] + "fields":[{"name":"0bitmap$205"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$222", - "fields":[{"name":"0bitmap$216"}] + "fields":[{"name":"0bitmap$204"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$223", - "fields":[{"name":"0bitmap$215"}] + "fields":[{"name":"0bitmap$203"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$224", - "fields":[{"name":"0bitmap$205"}] + "fields":[{"name":"0bitmap$201"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$225", - "fields":[{"name":"0bitmap$204"}] + "fields":[{"name":"0bitmap$202"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$226", - "fields":[{"name":"0bitmap$202"}] + "fields":[{"name":"0bitmap$220"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$227", - "fields":[{"name":"0bitmap$203"}] + "fields":[{"name":"0bitmap$219"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$228", - "fields":[{"name":"0bitmap$214"}] + "fields":[{"name":"0bitmap$209"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$229", - "fields":[{"name":"0bitmap$213"}] + "fields":[{"name":"0bitmap$208"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$23", @@ -1980,11 +1984,11 @@ }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$232", - "fields":[{"name":"0bitmap$208"}] + "fields":[{"name":"0bitmap$218"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$233", - "fields":[{"name":"0bitmap$209"}] + "fields":[{"name":"0bitmap$217"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$234", @@ -1998,21 +2002,37 @@ "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$236", "fields":[{"name":"0bitmap$212"}] }, +{ + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$237", + "fields":[{"name":"0bitmap$213"}] +}, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$238", - "fields":[{"name":"0bitmap$218"}] + "fields":[{"name":"0bitmap$214"}] +}, +{ + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$239", + "fields":[{"name":"0bitmap$215"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$240", - "fields":[{"name":"0bitmap$220"}] + "fields":[{"name":"0bitmap$216"}] }, { - "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$241", - "fields":[{"name":"0bitmap$219"}] + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$242", + "fields":[{"name":"0bitmap$222"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$244", - "fields":[{"name":"0bitmap$222"}] + "fields":[{"name":"0bitmap$224"}] +}, +{ + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$245", + "fields":[{"name":"0bitmap$223"}] +}, +{ + "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$248", + "fields":[{"name":"0bitmap$226"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$25", @@ -2264,7 +2284,7 @@ }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$95", - "fields":[{"name":"0bitmap$196"}] + "fields":[{"name":"0bitmap$200"}] }, { "name":"fpp.compiler.codegen.AstJsonEncoder$$anon$96", From 903fa5c9c790548c8149824394b415325d5cc148 Mon Sep 17 00:00:00 2001 From: Michael D Starch Date: Thu, 15 Aug 2024 09:58:21 -0700 Subject: [PATCH 09/11] Adding UT for hook -> drop in fpp-to-xml --- .../fpp-to-xml/test/component/GeneralPorts1ComponentAi.ref.xml | 1 + compiler/tools/fpp-to-xml/test/component/general_ports.fpp | 1 + 2 files changed, 2 insertions(+) diff --git a/compiler/tools/fpp-to-xml/test/component/GeneralPorts1ComponentAi.ref.xml b/compiler/tools/fpp-to-xml/test/component/GeneralPorts1ComponentAi.ref.xml index 1ec80300f..2ba7baeb2 100644 --- a/compiler/tools/fpp-to-xml/test/component/GeneralPorts1ComponentAi.ref.xml +++ b/compiler/tools/fpp-to-xml/test/component/GeneralPorts1ComponentAi.ref.xml @@ -25,6 +25,7 @@ Generated by fpp-to-xml + diff --git a/compiler/tools/fpp-to-xml/test/component/general_ports.fpp b/compiler/tools/fpp-to-xml/test/component/general_ports.fpp index 652600260..64e73a55c 100644 --- a/compiler/tools/fpp-to-xml/test/component/general_ports.fpp +++ b/compiler/tools/fpp-to-xml/test/component/general_ports.fpp @@ -15,6 +15,7 @@ module M { sync input port p7: serial output port p8: [10] serial + async input port p9: P hook } @ Component GeneralPorts2 From c8f3f3bac110fc10c57888e4a2d0dfcff56ae078 Mon Sep 17 00:00:00 2001 From: Michael D Starch Date: Thu, 15 Aug 2024 10:27:14 -0700 Subject: [PATCH 10/11] Downgrading 'hook' to 'drop' in XML generation --- .../src/main/scala/codegen/XmlWriter/ComponentXmlWriter.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/lib/src/main/scala/codegen/XmlWriter/ComponentXmlWriter.scala b/compiler/lib/src/main/scala/codegen/XmlWriter/ComponentXmlWriter.scala index 86b1fc3e3..300ed50f2 100644 --- a/compiler/lib/src/main/scala/codegen/XmlWriter/ComponentXmlWriter.scala +++ b/compiler/lib/src/main/scala/codegen/XmlWriter/ComponentXmlWriter.scala @@ -216,6 +216,9 @@ object ComponentXmlWriter extends AstVisitor with LineUtils { case _ => Nil } val queueFull = general.kind match { + // Hook queue full option becomes drop in XML + case Kind.AsyncInput(_, Ast.QueueFull.Hook) => + List(("full", Ast.QueueFull.Drop.toString)) case Kind.AsyncInput(_, queueFull) => List(("full", queueFull.toString)) case _ => Nil From 59a0e6fc10b1696f18b42c685b6a7a8dd1ff2b0e Mon Sep 17 00:00:00 2001 From: Michael D Starch Date: Thu, 15 Aug 2024 15:57:22 -0700 Subject: [PATCH 11/11] Review comment fixes --- .../ComponentCommands.scala | 9 +++------ .../ComponentCppWriterUtils.scala | 19 +++++++++++++++---- .../ComponentImplWriter.scala | 19 +++++++++---------- .../ComponentInputPorts.scala | 4 ++-- .../ComponentInternalPort.scala | 2 +- .../src/main/scala/codegen/FppWriter.scala | 1 + .../XmlFppWriter/ComponentXmlFppWriter.scala | 1 - .../base/ActiveOverflowComponentAc.ref.cpp | 4 ++-- .../base/ActiveOverflowComponentAc.ref.hpp | 4 ++-- .../base/QueuedOverflowComponentAc.ref.cpp | 4 ++-- .../base/QueuedOverflowComponentAc.ref.hpp | 4 ++-- .../impl/ActiveOverflow.template.ref.cpp | 4 ++-- .../impl/ActiveOverflow.template.ref.hpp | 4 ++-- .../impl/QueuedOverflow.template.ref.cpp | 4 ++-- .../impl/QueuedOverflow.template.ref.hpp | 4 ++-- docs/code-prettify/run_prettify.js | 1 + docs/users-guide/Defining-Components.adoc | 6 +++++- editors/emacs/fpp-mode.el | 2 +- editors/vim/fpp.vim | 1 + 19 files changed, 55 insertions(+), 42 deletions(-) diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCommands.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCommands.scala index e441eca89..668642f91 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCommands.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCommands.scala @@ -186,7 +186,7 @@ case class ComponentCommands ( ) ) ), - writeSendMessageLogic("msg", queueFull, priority, cmd.getName, cmdParamTypeMap(opcode).map((n, tn, _) => n)) + writeSendMessageLogic("msg", queueFull, priority, MessageType.Command, cmd.getName, cmdParamTypeMap(opcode).map((n, _, _) => n)) ) ) case _ => intersperseBlankLines( @@ -331,11 +331,8 @@ case class ComponentCommands ( hookCmds.map((opcode, cmd) => functionClassMember( Some(s"Overflow hook for command ${cmd.getName}"), - inputOverflowHookName(cmd.getName), - List( - opcodeParam, - cmdSeqParam - ) ++ cmdParamMap(opcode), + inputOverflowHookName(cmd.getName, MessageType.Command), + opcodeParam :: cmdSeqParam :: cmdParamMap(opcode), CppDoc.Type("void"), Nil, CppDoc.Function.PureVirtual diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCppWriterUtils.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCppWriterUtils.scala index e673b57e5..0d527ff23 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCppWriterUtils.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCppWriterUtils.scala @@ -4,6 +4,13 @@ import fpp.compiler.analysis._ import fpp.compiler.ast._ import fpp.compiler.codegen._ +/** Message type for message send logic */ +sealed trait MessageType +object MessageType { + case object Command extends MessageType + case object Port extends MessageType +} + /** Utilities for writing C++ component definitions */ abstract class ComponentCppWriterUtils( s: CppWriterState, @@ -482,7 +489,7 @@ abstract class ComponentCppWriterUtils( case Some(PortInstance.Type.Serial) => List( "buffer" ) - case _ => portParamTypeMap(p.getUnqualifiedName).map((n, tn, t) => n) + case _ => portParamTypeMap(p.getUnqualifiedName).map((n, _, _) => n) } /** Get port params as CppDoc Function Params */ @@ -603,6 +610,7 @@ abstract class ComponentCppWriterUtils( bufferName: String, queueFull: Ast.QueueFull, priority: Option[BigInt], + messageType: MessageType, name: String, arguments: List[String] ): List[Line] = { @@ -634,7 +642,7 @@ abstract class ComponentCppWriterUtils( ) case Ast.QueueFull.Hook => lines( s"""|if (qStatus == Os::Queue::QUEUE_FULL) { - | this->${inputOverflowHookName(name)}(${arguments.mkString(",")}); + | this->${inputOverflowHookName(name, messageType)}(${arguments.mkString(",")}); | return; |} |""" @@ -721,8 +729,11 @@ abstract class ComponentCppWriterUtils( s"${name}_preMsgHook" /** Get the name for an async input port overflow hook function */ - def inputOverflowHookName(name: String) = - s"${name}_overflowHook" + def inputOverflowHookName(name: String, messageType: MessageType) = + messageType match { + case MessageType.Port => s"${name}_overflowHook" + case MessageType.Command => s"${name}_cmdOverflowHook" + } // Get the name for an output port connector function def outputPortConnectorName(name: String) = diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentImplWriter.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentImplWriter.scala index a2ab10dc7..5f45302c3 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentImplWriter.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentImplWriter.scala @@ -182,10 +182,12 @@ case class ComponentImplWriter( private def getOverflowHooks: List[CppDoc.Class.Member] = { List.concat( getPortOverflowHooks( - typedHookPorts ++ - serialHookPorts ++ - dataProductHookPorts ++ - internalHookPorts + List.concat( + typedHookPorts, + serialHookPorts, + dataProductHookPorts, + internalHookPorts + ) ), addAccessTagAndComment( "PRIVATE", @@ -193,11 +195,8 @@ private def getOverflowHooks: List[CppDoc.Class.Member] = { hookCmds.map((opcode, cmd) => { functionClassMember( Some(s"Overflow hook implementation for ${cmd.getName}"), - inputOverflowHookName(cmd.getName), - List( - opcodeParam, - cmdSeqParam - ) ++ cmdParamMap(opcode), + inputOverflowHookName(cmd.getName, MessageType.Command), + opcodeParam :: cmdSeqParam :: cmdParamMap(opcode), CppDoc.Type("void"), lines("// TODO"), CppDoc.Function.Override @@ -214,7 +213,7 @@ private def getPortOverflowHooks(ports: List[PortInstance]): List[CppDoc.Class.M ports.map(p => { functionClassMember( Some(s"Overflow hook implementation for ${p.getUnqualifiedName}"), - inputOverflowHookName(p.getUnqualifiedName), + inputOverflowHookName(p.getUnqualifiedName, MessageType.Port), portNumParam :: getPortFunctionParams(p), CppDoc.Type("void"), lines("// TODO"), diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInputPorts.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInputPorts.scala index f90d1e208..670a642da 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInputPorts.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInputPorts.scala @@ -164,7 +164,7 @@ case class ComponentInputPorts( ) }) ), - writeSendMessageLogic(bufferName, queueFull, priority, p.getUnqualifiedName, getPortParamNames(p)) + writeSendMessageLogic(bufferName, queueFull, priority, MessageType.Port, p.getUnqualifiedName, getPortParamNames(p)) ) ) } @@ -421,7 +421,7 @@ case class ComponentInputPorts( ports.map(p => functionClassMember( Some(s"Overflow hook for async input port ${p.getUnqualifiedName}"), - inputOverflowHookName(p.getUnqualifiedName), + inputOverflowHookName(p.getUnqualifiedName, MessageType.Port), portNumParam :: getPortFunctionParams(p), CppDoc.Type("void"), Nil, diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInternalPort.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInternalPort.scala index d96fb752c..5ffce83fa 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInternalPort.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentInternalPort.scala @@ -83,7 +83,7 @@ case class ComponentInternalPort ( ) ) ), - writeSendMessageLogic("msg", p.queueFull, p.priority, p.getUnqualifiedName, getPortParams(p).map((n, _, _) => n)) + writeSendMessageLogic("msg", p.queueFull, p.priority, MessageType.Port, p.getUnqualifiedName, getPortParams(p).map((n, _, _) => n)) ) ) ) diff --git a/compiler/lib/src/main/scala/codegen/FppWriter.scala b/compiler/lib/src/main/scala/codegen/FppWriter.scala index 05c73a4d8..3d24bfd5e 100644 --- a/compiler/lib/src/main/scala/codegen/FppWriter.scala +++ b/compiler/lib/src/main/scala/codegen/FppWriter.scala @@ -665,6 +665,7 @@ object FppWriter extends AstVisitor with LineUtils { "guarded", "health", "high", + "hook", "id", "import", "include", diff --git a/compiler/lib/src/main/scala/codegen/XmlFppWriter/ComponentXmlFppWriter.scala b/compiler/lib/src/main/scala/codegen/XmlFppWriter/ComponentXmlFppWriter.scala index 5fab6b2d2..c2ed165f7 100644 --- a/compiler/lib/src/main/scala/codegen/XmlFppWriter/ComponentXmlFppWriter.scala +++ b/compiler/lib/src/main/scala/codegen/XmlFppWriter/ComponentXmlFppWriter.scala @@ -105,7 +105,6 @@ object ComponentXmlFppWriter extends LineUtils { case Some("assert") => Right(Some(Ast.QueueFull.Assert)) case Some("block") => Right(Some(Ast.QueueFull.Block)) case Some("drop") => Right(Some(Ast.QueueFull.Drop)) - case Some("hook") => Right(Some(Ast.QueueFull.Hook)) case Some(xmlQueueFull) => Left(file.semanticError(s"invalid queue full behavior $xmlQueueFull")) case None => Right(None) diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.cpp index 4dbae5934..3e4907ec4 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.cpp @@ -1819,7 +1819,7 @@ void ActiveOverflowComponentBase :: Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); if (qStatus == Os::Queue::QUEUE_FULL) { - this->CMD_HOOK_overflowHook(); + this->CMD_HOOK_cmdOverflowHook(); return; } @@ -1883,7 +1883,7 @@ void ActiveOverflowComponentBase :: Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 30, _block); if (qStatus == Os::Queue::QUEUE_FULL) { - this->CMD_PARAMS_PRIORITY_HOOK_overflowHook(u32); + this->CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook(u32); return; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.hpp index 08acc7279..e10e773fb 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveOverflowComponentAc.ref.hpp @@ -906,13 +906,13 @@ class ActiveOverflowComponentBase : // ---------------------------------------------------------------------- //! Overflow hook for command CMD_HOOK - virtual void CMD_HOOK_overflowHook( + virtual void CMD_HOOK_cmdOverflowHook( FwOpcodeType opCode, //!< The opcode U32 cmdSeq //!< The command sequence number ) = 0; //! Overflow hook for command CMD_PARAMS_PRIORITY_HOOK - virtual void CMD_PARAMS_PRIORITY_HOOK_overflowHook( + virtual void CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook( FwOpcodeType opCode, //!< The opcode U32 cmdSeq, //!< The command sequence number U32 u32 diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.cpp index f3f63795d..5bf26a019 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.cpp @@ -1819,7 +1819,7 @@ void QueuedOverflowComponentBase :: Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); if (qStatus == Os::Queue::QUEUE_FULL) { - this->CMD_HOOK_overflowHook(); + this->CMD_HOOK_cmdOverflowHook(); return; } @@ -1883,7 +1883,7 @@ void QueuedOverflowComponentBase :: Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 30, _block); if (qStatus == Os::Queue::QUEUE_FULL) { - this->CMD_PARAMS_PRIORITY_HOOK_overflowHook(u32); + this->CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook(u32); return; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.hpp index 6e9523b3c..a1e489c24 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedOverflowComponentAc.ref.hpp @@ -906,13 +906,13 @@ class QueuedOverflowComponentBase : // ---------------------------------------------------------------------- //! Overflow hook for command CMD_HOOK - virtual void CMD_HOOK_overflowHook( + virtual void CMD_HOOK_cmdOverflowHook( FwOpcodeType opCode, //!< The opcode U32 cmdSeq //!< The command sequence number ) = 0; //! Overflow hook for command CMD_PARAMS_PRIORITY_HOOK - virtual void CMD_PARAMS_PRIORITY_HOOK_overflowHook( + virtual void CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook( FwOpcodeType opCode, //!< The opcode U32 cmdSeq, //!< The command sequence number U32 u32 diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.cpp index b2bb7f8b5..7d11b0e35 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.cpp @@ -186,7 +186,7 @@ void ActiveOverflow :: // ---------------------------------------------------------------------- void ActiveOverflow :: - CMD_HOOK_overflowHook( + CMD_HOOK_cmdOverflowHook( FwOpcodeType opCode, U32 cmdSeq ) @@ -195,7 +195,7 @@ void ActiveOverflow :: } void ActiveOverflow :: - CMD_PARAMS_PRIORITY_HOOK_overflowHook( + CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook( FwOpcodeType opCode, U32 cmdSeq, U32 u32 diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.hpp index 92b5a9199..f81ee100e 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveOverflow.template.ref.hpp @@ -181,13 +181,13 @@ class ActiveOverflow : // ---------------------------------------------------------------------- //! Overflow hook implementation for CMD_HOOK - void CMD_HOOK_overflowHook( + void CMD_HOOK_cmdOverflowHook( FwOpcodeType opCode, //!< The opcode U32 cmdSeq //!< The command sequence number ) override; //! Overflow hook implementation for CMD_PARAMS_PRIORITY_HOOK - void CMD_PARAMS_PRIORITY_HOOK_overflowHook( + void CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook( FwOpcodeType opCode, //!< The opcode U32 cmdSeq, //!< The command sequence number U32 u32 diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.cpp index d8eb96d88..ac522a8c1 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.cpp @@ -186,7 +186,7 @@ void QueuedOverflow :: // ---------------------------------------------------------------------- void QueuedOverflow :: - CMD_HOOK_overflowHook( + CMD_HOOK_cmdOverflowHook( FwOpcodeType opCode, U32 cmdSeq ) @@ -195,7 +195,7 @@ void QueuedOverflow :: } void QueuedOverflow :: - CMD_PARAMS_PRIORITY_HOOK_overflowHook( + CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook( FwOpcodeType opCode, U32 cmdSeq, U32 u32 diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.hpp index 6c7e85afc..6548f7e96 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedOverflow.template.ref.hpp @@ -181,13 +181,13 @@ class QueuedOverflow : // ---------------------------------------------------------------------- //! Overflow hook implementation for CMD_HOOK - void CMD_HOOK_overflowHook( + void CMD_HOOK_cmdOverflowHook( FwOpcodeType opCode, //!< The opcode U32 cmdSeq //!< The command sequence number ) override; //! Overflow hook implementation for CMD_PARAMS_PRIORITY_HOOK - void CMD_PARAMS_PRIORITY_HOOK_overflowHook( + void CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook( FwOpcodeType opCode, //!< The opcode U32 cmdSeq, //!< The command sequence number U32 u32 diff --git a/docs/code-prettify/run_prettify.js b/docs/code-prettify/run_prettify.js index 9c37a6d4e..d791d31d6 100644 --- a/docs/code-prettify/run_prettify.js +++ b/docs/code-prettify/run_prettify.js @@ -432,6 +432,7 @@ var IN_GLOBAL_SCOPE = false; "guarded," + "health," + "high," + + "hook," + "id," + "import," + "include," + diff --git a/docs/users-guide/Defining-Components.adoc b/docs/users-guide/Defining-Components.adoc index eb55a8bbc..893d2d9b3 100644 --- a/docs/users-guide/Defining-Components.adoc +++ b/docs/users-guide/Defining-Components.adoc @@ -327,9 +327,10 @@ There are three possible behaviors: . `assert`: Fail a FSW assertion (the default behavior). . `block`: Block the sender until the queue is available. . `drop`: Drop the incoming message and proceed. +. `hook`: Call a user function to respond to the queue overflow. To specify queue full behavior, you write one of the keywords `assert`, -`block`, or `drop` after the port type and after the priority +`block`, `drop`, or `hook` after the port type and after the priority (if any). As an example, here is the `ActiveF32Adder` updated with explicit queue full behavior. @@ -348,6 +349,9 @@ active component ActiveF32Adder { @ Input 2: Drop on queue full async input port f32ValueIn2: F32Value drop + + @ Input 3: Call hook function on queue full + async input port f32ValueIn3: F32Value hook @ Output output port f32ValueOut: F32Value diff --git a/editors/emacs/fpp-mode.el b/editors/emacs/fpp-mode.el index bfac9dc4e..9b0f20584 100644 --- a/editors/emacs/fpp-mode.el +++ b/editors/emacs/fpp-mode.el @@ -42,7 +42,7 @@ '("active" "activity" "always" "assert" "at" "base" "block" "change" "command" "connections" "cpu" "default" "diagnostic" - "drop" "event" "false" "fatal" "format" "get" + "drop" "hook" "event" "false" "fatal" "format" "get" "guarded" "health" "high" "id" "import" "include" "input" "internal" "locate" "low" "match" "on" "opcode" "orange" "output" diff --git a/editors/vim/fpp.vim b/editors/vim/fpp.vim index 69d8fe5d0..33ca7edf8 100644 --- a/editors/vim/fpp.vim +++ b/editors/vim/fpp.vim @@ -27,6 +27,7 @@ syn keyword fppKeyword cpu syn keyword fppKeyword default syn keyword fppKeyword diagnostic syn keyword fppKeyword drop +syn keyword fppKeyword hook syn keyword fppKeyword enum syn keyword fppKeyword event syn keyword fppKeyword false