Skip to content

Port handler and Command cmdHandler pass arguments using different types #894

@LeStarch

Description

@LeStarch

Here is an example of an autocode port handler:

      //! Handler for input port pythonInPort
      virtual void pythonInPort_handler(
          FwIndexType portNum, //!< The port number
          const FprimePythonReference::PythonEnumeration& arg1,
          const FprimePythonReference::PythonComplexStruct& arg2
      ) = 0;

Now look at the cmdHandler:

      //! Handler for command TYPES_COMMAND
      //!
      //! Enumeration and struct command test
      virtual void TYPES_COMMAND_cmdHandler(
          FwOpcodeType opCode, //!< The opcode
          U32 cmdSeq, //!< The command sequence number
          FprimePythonReference::PythonEnumeration enum_argument,
          FprimePythonReference::PythonComplexStruct struct_argument
      ) = 0;

The same types are passed in one case by const & an by value in the other. This is a confusing and inefficient inconsistency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    code generationIssues related to code generationinherited technical debtTechnical debt inherited from the XML autocoders

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions