diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCppWriter.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCppWriter.scala index e9f58f733..3d68a12dd 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCppWriter.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentCppWriter.scala @@ -164,7 +164,7 @@ case class ComponentCppWriter ( } private def getClassMembers: List[CppDoc.Class.Member] = { - List( + List.concat( // Friend classes getFriendClassMembers, @@ -205,7 +205,7 @@ case class ComponentCppWriter ( paramWriter.getVariableMembers, getMsgSizeVariableMember, getMutexVariableMembers, - ).flatten + ) } private def getConstantMembers: List[CppDoc.Class.Member] = { @@ -251,79 +251,85 @@ case class ComponentCppWriter ( ) } - private def getAnonymousNamespaceMembers: List[CppDoc.Class.Member] = { - List( - linesClassMember( - Line.blank :: wrapInAnonymousNamespace( - intersperseBlankLines( - List( - getMsgTypeEnum, - getBuffUnion, - getComponentIpcSerializableBufferClass + private def getAnonymousNamespaceMembers: List[CppDoc.Class.Member] = + data.kind match { + case Ast.ComponentKind.Passive => Nil + case _ => List( + linesClassMember( + Line.blank :: wrapInAnonymousNamespace( + intersperseBlankLines( + List( + getMsgTypeEnum, + getBuffUnion, + getComponentIpcSerializableBufferClass + ) ) - ) - ), - CppDoc.Lines.Cpp + ), + CppDoc.Lines.Cpp + ) ) - ) - } + } private def getMsgTypeEnum: List[Line] = { wrapInScope( "enum MsgTypeEnum {", - List( - if data.kind != Ast.ComponentKind.Passive then lines( - s"$exitConstantName = Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT," - ) - else Nil, - List( - typedAsyncInputPorts.map(portCppConstantName), - serialAsyncInputPorts.map(portCppConstantName), - asyncCmds.map((_, cmd) => commandCppConstantName(cmd)), - internalPorts.map(internalPortCppConstantName), - ).flatten.map(s => line(s"$s,")) - ).flatten, + List.concat( + lines(s"$exitConstantName = Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT"), + typedAsyncInputPorts.map(portCppConstantName), + serialAsyncInputPorts.map(portCppConstantName), + asyncCmds.map((_, cmd) => commandCppConstantName(cmd)), + internalPorts.map(internalPortCppConstantName), + ).map(s => line(s"$s,")), "};" ) } + /** Generates a union type that lets the compiler calculate + * the max serialized size of any list of arguments that goes + * on the queue */ private def getBuffUnion: List[Line] = { - line("// Get the max size by doing a union of the input and internal port serialization sizes") :: + // Collect the serialized sizes of all the async port arguments + // For each one, add a byte array of that size as a member + val members = List.concat( + // Typed async input ports + typedAsyncInputPorts.flatMap(p => { + val portName = p.getUnqualifiedName + val portTypeName = getQualifiedPortTypeName(p, p.getDirection.get) + lines(s"BYTE ${portName}PortSize[${portTypeName}::SERIALIZED_SIZE];") + }), + // Command input port + guardedList (cmdRecvPort.isDefined) + (lines(s"BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE];")), + // Internal ports + // Sum the sizes of the port arguments + internalPorts.flatMap(p => + line(s"// Size of ${p.getUnqualifiedName} argument list") :: + (p.aNode._2.data.params match { + case Nil => lines("// [ no port arguments ]") + case _ => wrapInScope( + s"BYTE ${p.getUnqualifiedName}IntIfSize[", + lines( + p.aNode._2.data.params.map(param => + s.getSerializedSizeExpr( + s.a.typeMap(param._2.data.typeName.id), + writeInternalPortParamType(param._2.data) + ) + ).mkString(" +\n") + ), + "];" + ) + }) + ) + ) + List.concat( + lines("""|// Get the max size by constructing a union of the async input, command, and + |// internal port serialization sizes"""), wrapInScope( "union BuffUnion {", - List( - lines( - typedInputPorts.map(p => - s"BYTE ${p.getUnqualifiedName}PortSize[${getQualifiedPortTypeName(p, p.getDirection.get)}::SERIALIZED_SIZE];" - ).mkString("\n"), - ), - cmdRespPort match { - case Some(p) => lines( - s"BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE];" - ) - case None => Nil - }, - internalPorts.flatMap(p => - line(s"// Size of ${p.getUnqualifiedName} argument list") :: - (p.aNode._2.data.params match { - case Nil => lines(s"BYTE ${p.getUnqualifiedName}IntIfSize[0];") - case _ => wrapInScope( - s"BYTE ${p.getUnqualifiedName}IntIfSize[", - lines( - p.aNode._2.data.params.map(param => - s.getSerializedSizeExpr( - s.a.typeMap(param._2.data.typeName.id), - writeInternalPortParamType(param._2.data) - ) - ).mkString(" +\n") - ), - "];" - ) - }) - ) - ).flatten, + members, "};" ) + ) } private def getComponentIpcSerializableBufferClass: List[Line] = { diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveCommandsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveCommandsComponentAc.ref.cpp index 8741a1cd7..2fdf93e1c 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveCommandsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveCommandsComponentAc.ref.cpp @@ -27,21 +27,14 @@ namespace { CMD_CMD_PARAMS_PRIORITY_DROP, }; - // Get the max size by doing a union of the input and internal port serialization sizes + // Get the max size by constructing a union of the async input, command, and + // internal port serialization sizes union BuffUnion { BYTE noArgsAsyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; BYTE typedAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncAssertPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncBlockPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncDropPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE]; }; diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveEventsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveEventsComponentAc.ref.cpp index 1f9b0cba8..0f8e15d43 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveEventsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveEventsComponentAc.ref.cpp @@ -22,21 +22,14 @@ namespace { TYPEDASYNCDROPPRIORITY_TYPED, }; - // Get the max size by doing a union of the input and internal port serialization sizes + // Get the max size by constructing a union of the async input, command, and + // internal port serialization sizes union BuffUnion { BYTE noArgsAsyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; BYTE typedAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncAssertPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncBlockPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncDropPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE]; }; diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveParamsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveParamsComponentAc.ref.cpp index cc8f72d90..24ba15288 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveParamsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveParamsComponentAc.ref.cpp @@ -22,21 +22,14 @@ namespace { TYPEDASYNCDROPPRIORITY_TYPED, }; - // Get the max size by doing a union of the input and internal port serialization sizes + // Get the max size by constructing a union of the async input, command, and + // internal port serialization sizes union BuffUnion { BYTE noArgsAsyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; BYTE typedAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncAssertPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncBlockPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncDropPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE]; }; diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveSerialComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveSerialComponentAc.ref.cpp index b8aa03848..47b60074c 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveSerialComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveSerialComponentAc.ref.cpp @@ -37,21 +37,14 @@ namespace { INT_IF_INTERNALSTRUCT, }; - // Get the max size by doing a union of the input and internal port serialization sizes + // Get the max size by constructing a union of the async input, command, and + // internal port serialization sizes union BuffUnion { BYTE noArgsAsyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; BYTE typedAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncAssertPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncBlockPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncDropPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE]; // Size of internalArray argument list BYTE internalArrayIntIfSize[ @@ -68,7 +61,7 @@ namespace { sizeof(U8) ]; // Size of internalPriorityDrop argument list - BYTE internalPriorityDropIntIfSize[0]; + // [ no port arguments ] // Size of internalString argument list BYTE internalStringIntIfSize[ Fw::InternalInterfaceString::SERIALIZED_SIZE + diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveTelemetryComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveTelemetryComponentAc.ref.cpp index a2a65e225..997710f25 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveTelemetryComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveTelemetryComponentAc.ref.cpp @@ -22,21 +22,14 @@ namespace { TYPEDASYNCDROPPRIORITY_TYPED, }; - // Get the max size by doing a union of the input and internal port serialization sizes + // Get the max size by constructing a union of the async input, command, and + // internal port serialization sizes union BuffUnion { BYTE noArgsAsyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; BYTE typedAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncAssertPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncBlockPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncDropPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE]; }; diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp index ee4bd6789..b8bd8f4f0 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp @@ -35,21 +35,14 @@ namespace M { INT_IF_INTERNALSTRUCT, }; - // Get the max size by doing a union of the input and internal port serialization sizes + // Get the max size by constructing a union of the async input, command, and + // internal port serialization sizes union BuffUnion { BYTE noArgsAsyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; BYTE typedAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncAssertPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncBlockPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncDropPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE]; // Size of internalArray argument list BYTE internalArrayIntIfSize[ @@ -66,7 +59,7 @@ namespace M { sizeof(U8) ]; // Size of internalPriorityDrop argument list - BYTE internalPriorityDropIntIfSize[0]; + // [ no port arguments ] // Size of internalString argument list BYTE internalStringIntIfSize[ Fw::InternalInterfaceString::SERIALIZED_SIZE + diff --git a/compiler/tools/fpp-to-cpp/test/component/base/EmptyComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/EmptyComponentAc.ref.cpp index 19b0fd3b1..d75055022 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/EmptyComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/EmptyComponentAc.ref.cpp @@ -12,47 +12,6 @@ #endif #include "base/EmptyComponentAc.hpp" -namespace { - // Get the max size by doing a union of the input and internal port serialization sizes - union BuffUnion { - - }; - - // 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(NATIVE_INT_TYPE) + - sizeof(NATIVE_INT_TYPE) - }; - - NATIVE_UINT_TYPE 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 // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveCommandsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveCommandsComponentAc.ref.cpp index d1e2f61a2..266fd3f21 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveCommandsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveCommandsComponentAc.ref.cpp @@ -12,55 +12,6 @@ #endif #include "base/PassiveCommandsComponentAc.hpp" -namespace { - // Get the max size by doing a union of the input and internal port serialization sizes - union BuffUnion { - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[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(NATIVE_INT_TYPE) + - sizeof(NATIVE_INT_TYPE) - }; - - NATIVE_UINT_TYPE 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 // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveEventsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveEventsComponentAc.ref.cpp index 85af4cbb4..7b50cb2ed 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveEventsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveEventsComponentAc.ref.cpp @@ -12,55 +12,6 @@ #endif #include "base/PassiveEventsComponentAc.hpp" -namespace { - // Get the max size by doing a union of the input and internal port serialization sizes - union BuffUnion { - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[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(NATIVE_INT_TYPE) + - sizeof(NATIVE_INT_TYPE) - }; - - NATIVE_UINT_TYPE 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 // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveParamsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveParamsComponentAc.ref.cpp index 7a05b7305..fe2b5edc7 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveParamsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveParamsComponentAc.ref.cpp @@ -12,55 +12,6 @@ #endif #include "base/PassiveParamsComponentAc.hpp" -namespace { - // Get the max size by doing a union of the input and internal port serialization sizes - union BuffUnion { - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[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(NATIVE_INT_TYPE) + - sizeof(NATIVE_INT_TYPE) - }; - - NATIVE_UINT_TYPE 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 // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveSerialComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveSerialComponentAc.ref.cpp index 8655bafbb..0a23279ad 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveSerialComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveSerialComponentAc.ref.cpp @@ -12,55 +12,6 @@ #endif #include "base/PassiveSerialComponentAc.hpp" -namespace { - // Get the max size by doing a union of the input and internal port serialization sizes - union BuffUnion { - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[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(NATIVE_INT_TYPE) + - sizeof(NATIVE_INT_TYPE) - }; - - NATIVE_UINT_TYPE 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 // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveTelemetryComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveTelemetryComponentAc.ref.cpp index 5e05edbdd..b2a7d7562 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveTelemetryComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveTelemetryComponentAc.ref.cpp @@ -12,55 +12,6 @@ #endif #include "base/PassiveTelemetryComponentAc.hpp" -namespace { - // Get the max size by doing a union of the input and internal port serialization sizes - union BuffUnion { - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[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(NATIVE_INT_TYPE) + - sizeof(NATIVE_INT_TYPE) - }; - - NATIVE_UINT_TYPE 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 // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp index 086e03888..a76e505bf 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp @@ -12,55 +12,6 @@ #endif #include "base/PassiveTestComponentAc.hpp" -namespace { - // Get the max size by doing a union of the input and internal port serialization sizes - union BuffUnion { - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[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(NATIVE_INT_TYPE) + - sizeof(NATIVE_INT_TYPE) - }; - - NATIVE_UINT_TYPE 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 // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedCommandsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedCommandsComponentAc.ref.cpp index f23eb4ff9..238683cee 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedCommandsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedCommandsComponentAc.ref.cpp @@ -27,21 +27,14 @@ namespace { CMD_CMD_PARAMS_PRIORITY_DROP, }; - // Get the max size by doing a union of the input and internal port serialization sizes + // Get the max size by constructing a union of the async input, command, and + // internal port serialization sizes union BuffUnion { BYTE noArgsAsyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; BYTE typedAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncAssertPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncBlockPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncDropPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE]; }; diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedEventsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedEventsComponentAc.ref.cpp index d89b06786..f7602b09a 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedEventsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedEventsComponentAc.ref.cpp @@ -22,21 +22,14 @@ namespace { TYPEDASYNCDROPPRIORITY_TYPED, }; - // Get the max size by doing a union of the input and internal port serialization sizes + // Get the max size by constructing a union of the async input, command, and + // internal port serialization sizes union BuffUnion { BYTE noArgsAsyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; BYTE typedAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncAssertPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncBlockPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncDropPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE]; }; diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedParamsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedParamsComponentAc.ref.cpp index 4b87a0ca8..8d5e7c72e 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedParamsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedParamsComponentAc.ref.cpp @@ -22,21 +22,14 @@ namespace { TYPEDASYNCDROPPRIORITY_TYPED, }; - // Get the max size by doing a union of the input and internal port serialization sizes + // Get the max size by constructing a union of the async input, command, and + // internal port serialization sizes union BuffUnion { BYTE noArgsAsyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; BYTE typedAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncAssertPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncBlockPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncDropPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE]; }; diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedSerialComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedSerialComponentAc.ref.cpp index 22ad91ffa..3d1e9050e 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedSerialComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedSerialComponentAc.ref.cpp @@ -37,21 +37,14 @@ namespace { INT_IF_INTERNALSTRUCT, }; - // Get the max size by doing a union of the input and internal port serialization sizes + // Get the max size by constructing a union of the async input, command, and + // internal port serialization sizes union BuffUnion { BYTE noArgsAsyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; BYTE typedAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncAssertPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncBlockPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncDropPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE]; // Size of internalArray argument list BYTE internalArrayIntIfSize[ @@ -68,7 +61,7 @@ namespace { sizeof(U8) ]; // Size of internalPriorityDrop argument list - BYTE internalPriorityDropIntIfSize[0]; + // [ no port arguments ] // Size of internalString argument list BYTE internalStringIntIfSize[ Fw::InternalInterfaceString::SERIALIZED_SIZE + diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedTelemetryComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedTelemetryComponentAc.ref.cpp index c2377cd94..75b054559 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedTelemetryComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedTelemetryComponentAc.ref.cpp @@ -22,21 +22,14 @@ namespace { TYPEDASYNCDROPPRIORITY_TYPED, }; - // Get the max size by doing a union of the input and internal port serialization sizes + // Get the max size by constructing a union of the async input, command, and + // internal port serialization sizes union BuffUnion { BYTE noArgsAsyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; BYTE typedAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncAssertPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncBlockPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncDropPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE]; }; diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp index 1960227e4..0f3b87ab2 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp @@ -33,21 +33,14 @@ namespace { INT_IF_INTERNALSTRUCT, }; - // Get the max size by doing a union of the input and internal port serialization sizes + // Get the max size by constructing a union of the async input, command, and + // internal port serialization sizes union BuffUnion { BYTE noArgsAsyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsGuardedPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; - BYTE noArgsReturnGuardedPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsReturnSyncPortSize[Ports::InputNoArgsReturnPort::SERIALIZED_SIZE]; - BYTE noArgsSyncPortSize[Ports::InputNoArgsPort::SERIALIZED_SIZE]; BYTE typedAsyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncAssertPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncBlockPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE typedAsyncDropPriorityPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedGuardedPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; - BYTE typedReturnGuardedPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedReturnSyncPortSize[Ports::InputTypedReturnPort::SERIALIZED_SIZE]; - BYTE typedSyncPortSize[Ports::InputTypedPort::SERIALIZED_SIZE]; BYTE cmdPortSize[Fw::InputCmdPort::SERIALIZED_SIZE]; // Size of internalArray argument list BYTE internalArrayIntIfSize[ @@ -64,7 +57,7 @@ namespace { sizeof(U8) ]; // Size of internalPriorityDrop argument list - BYTE internalPriorityDropIntIfSize[0]; + // [ no port arguments ] // Size of internalString argument list BYTE internalStringIntIfSize[ Fw::InternalInterfaceString::SERIALIZED_SIZE +