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 33e4d3294..cc3373909 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCommands.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCommands.scala @@ -192,7 +192,7 @@ case class ComponentCommands ( priority, MessageType.Command, cmd.getName, - opcodeParam :: cmdSeqParam :: cmdParamMap(opcode) + opcodeParam :: cmdSeqParam :: Nil ) ) ) @@ -339,7 +339,7 @@ case class ComponentCommands ( functionClassMember( Some(s"Overflow hook for command ${cmd.getName}"), inputOverflowHookName(cmd.getName, MessageType.Command), - opcodeParam :: cmdSeqParam :: cmdParamMap(opcode), + opcodeParam :: cmdSeqParam :: Nil, 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 b1cdb9ad0..996c84bd4 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCppWriterUtils.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCppWriterUtils.scala @@ -631,27 +631,13 @@ abstract class ComponentCppWriterUtils( |} |""" ) - case Ast.QueueFull.Hook => { - messageType match { - case MessageType.Command => - lines( - s"""|if (qStatus == Os::Queue::QUEUE_FULL) { - | // TODO: Deserialize command arguments and call the hook - | // this->${inputOverflowHookName(name, messageType)}(${arguments.map(_.name).mkString(", ")}); - | return; - |} - |""" - ) - case _ => - lines( - s"""|if (qStatus == Os::Queue::QUEUE_FULL) { - | this->${inputOverflowHookName(name, messageType)}(${arguments.map(_.name).mkString(", ")}); - | return; - |} - |""" - ) - } - } + case Ast.QueueFull.Hook => lines( + s"""|if (qStatus == Os::Queue::QUEUE_FULL) { + | this->${inputOverflowHookName(name, messageType)}(${arguments.map(_.name).mkString(", ")}); + | return; + |} + |""" + ) case _ => Nil } , 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 c8125c006..0a8218d03 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentImplWriter.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentImplWriter.scala @@ -209,7 +209,7 @@ private def getOverflowHooks: List[CppDoc.Class.Member] = { functionClassMember( Some(s"Overflow hook implementation for ${cmd.getName}"), inputOverflowHookName(cmd.getName, MessageType.Command), - opcodeParam :: cmdSeqParam :: cmdParamMap(opcode), + opcodeParam :: cmdSeqParam :: Nil, CppDoc.Type("void"), lines("// TODO"), CppDoc.Function.Override 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 d2ef0d914..1edf44a71 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,8 +1819,7 @@ void ActiveOverflowComponentBase :: Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); if (qStatus == Os::Queue::QUEUE_FULL) { - // TODO: Deserialize command arguments and call the hook - // this->CMD_HOOK_cmdOverflowHook(opCode, cmdSeq); + this->CMD_HOOK_cmdOverflowHook(opCode, cmdSeq); return; } @@ -1884,8 +1883,7 @@ void ActiveOverflowComponentBase :: Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 30, _block); if (qStatus == Os::Queue::QUEUE_FULL) { - // TODO: Deserialize command arguments and call the hook - // this->CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook(opCode, cmdSeq, u32); + this->CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook(opCode, cmdSeq); 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 6dc14d28a..60a502b8c 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 @@ -912,8 +912,7 @@ class ActiveOverflowComponentBase : //! Overflow hook for command CMD_PARAMS_PRIORITY_HOOK virtual void CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook( FwOpcodeType opCode, //!< The opcode - U32 cmdSeq, //!< The command sequence number - U32 u32 + U32 cmdSeq //!< The command sequence number ) = 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 345dadd80..5ab6e47d9 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,8 +1819,7 @@ void QueuedOverflowComponentBase :: Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block); if (qStatus == Os::Queue::QUEUE_FULL) { - // TODO: Deserialize command arguments and call the hook - // this->CMD_HOOK_cmdOverflowHook(opCode, cmdSeq); + this->CMD_HOOK_cmdOverflowHook(opCode, cmdSeq); return; } @@ -1884,8 +1883,7 @@ void QueuedOverflowComponentBase :: Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 30, _block); if (qStatus == Os::Queue::QUEUE_FULL) { - // TODO: Deserialize command arguments and call the hook - // this->CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook(opCode, cmdSeq, u32); + this->CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook(opCode, cmdSeq); 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 1e54a2604..59e01933b 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 @@ -912,8 +912,7 @@ class QueuedOverflowComponentBase : //! Overflow hook for command CMD_PARAMS_PRIORITY_HOOK virtual void CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook( FwOpcodeType opCode, //!< The opcode - U32 cmdSeq, //!< The command sequence number - U32 u32 + U32 cmdSeq //!< The command sequence number ) = 0; PROTECTED: 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 944af7728..2994bcebe 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 @@ -201,8 +201,7 @@ void ActiveOverflow :: void ActiveOverflow :: CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook( FwOpcodeType opCode, - U32 cmdSeq, - U32 u32 + U32 cmdSeq ) { // 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 0f503417b..afbfa08ca 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 @@ -193,8 +193,7 @@ class ActiveOverflow : //! Overflow hook implementation for CMD_PARAMS_PRIORITY_HOOK void CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook( FwOpcodeType opCode, //!< The opcode - U32 cmdSeq, //!< The command sequence number - U32 u32 + U32 cmdSeq //!< The command sequence number ) override; }; 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 9fc11c94d..5dcb7a358 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 @@ -201,8 +201,7 @@ void QueuedOverflow :: void QueuedOverflow :: CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook( FwOpcodeType opCode, - U32 cmdSeq, - U32 u32 + U32 cmdSeq ) { // 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 898595922..2bf11b03b 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 @@ -193,8 +193,7 @@ class QueuedOverflow : //! Overflow hook implementation for CMD_PARAMS_PRIORITY_HOOK void CMD_PARAMS_PRIORITY_HOOK_cmdOverflowHook( FwOpcodeType opCode, //!< The opcode - U32 cmdSeq, //!< The command sequence number - U32 u32 + U32 cmdSeq //!< The command sequence number ) override; }; diff --git a/docs/fpp-spec.html b/docs/fpp-spec.html index 06d2d3c6f..bc3e318e9 100644 --- a/docs/fpp-spec.html +++ b/docs/fpp-spec.html @@ -5,7 +5,7 @@ -