Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDS won't pass an array as a value for a command #2273

Closed
neel-puri opened this issue Sep 13, 2023 · 7 comments
Closed

GDS won't pass an array as a value for a command #2273

neel-puri opened this issue Sep 13, 2023 · 7 comments
Labels
bug F´ GDS Issues pertaining to the F´ GDS

Comments

@neel-puri
Copy link

F´ Version 3.3.2
Affected Component fprime-gds

Problem Description

If a custom array type is defined (i.e. an array of 2 F32's) the gds won't accept the input. If a command is defined such that it only has one input, the array of 2 F32's, then the system is capable of building everything and starting the gds. When attempting to send that defined command, after pressing "send command" the gds simply displays "unknown error" under the "mnemonic" drop down menu.

In the console of the web-browser developer tools, an error is sent with the message "Failed to validate all arguments" without any further context or information.

There are no issues with any other commands.

How to Reproduce

  1. Create a custom data type (the one I did was arrType = [4] F32)
  2. In a new component define an asynchronous command that takes the arrType as a value (what I did was async command TEST_COMMAND(Vals: arrType @< just a test of the type)
  3. The command handler can be the simple auto coded one. It doesn't need to do anything (this was mine:
    void <component> :: TEST_COMMAND_cmdHandler( const FwOpcodeType opCode, const U32 cmdSeq, Components::arrType vals ) { // Release Event about data being sent to process this->log_ACTIVITY_LO_JUST_ANNOUNCE_AN_EVENT(); // TODO this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); }
  4. Start the fprime-gds in the normal way
  5. Click on the <component>.TEST_COMMAND option in the mnemonic drop down
  6. Fill out the fields and send the command
  7. The described error should appear

Expected Behavior

The expected behavior is announces the given event. The event does nothing other than post an event to the event's tab that says "it worked."

In the long term sense, it should provide the function with the data provided in the command array as a series of F32s so that the function can manipulate it at will.

@neel-puri neel-puri added the bug label Sep 13, 2023
@thomas-bc thomas-bc added the F´ GDS Issues pertaining to the F´ GDS label Sep 13, 2023
@SMorettini
Copy link
Contributor

@neel-puri can you check if my pull request nasa/fprime-gds#141 solves your problem?

@neel-puri
Copy link
Author

neel-puri commented Sep 18, 2023

@SMorettini I have a question. How do I test your pull request? If the answer is to re-install the fprime-tools from scratch and start a new project, then the new changes did not fix the issue.

So the issue persists, but I have a feeling I am just not properly testing the pull request.

@thomas-bc
Copy link
Collaborator

thomas-bc commented Sep 21, 2023

Hey @neel-puri, the process to test a PR would be to clone the code and install locally. So in this case, since it's in SMorettini's repo, you would do the following:

git clone https://github.com/SMorettini/fprime-gds
cd fprime-gds
git checkout Fix-scalar-input-forms
pip install .

Then go back to your project (no need to rebuild since this is a change to the GDS only), and re-run the fprime-gds command.
I'll also be taking a look at this

@neel-puri
Copy link
Author

neel-puri commented Sep 25, 2023

Hi @thomas-bc, thanks for the help! I'm still new so I really appreciate it.

Unfortunately, I tried this and it still doesn't work. I checked the console and the same issue occurred. I even re-built (even though I know I don't need to) and got the same result.

@thomas-bc
Copy link
Collaborator

You may want to double check that you're actually using the version of the GDS you just installed. Did you run fprime-gds in the same shell session? I tested myself and it seemed to work fine.

@neel-puri
Copy link
Author

Ok yes. That change fixed the issue. The mistake I made was that I didn't do "pip install ." within the virtual environment. A very silly mistake in hindsight, but oh well I guess.

Thank you so much @thomas-bc. The change in that branch fixes the issue. Should I close the issue? or should I wait for the change to migrate to devel branch?

@thomas-bc
Copy link
Collaborator

We'll take care of closing the issue once the fix is merged in! Thanks for confirming @neel-puri

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug F´ GDS Issues pertaining to the F´ GDS
Projects
None yet
Development

No branches or pull requests

3 participants