Skip to content

Conversation

@sahilfidha
Copy link
Contributor

EPS ON/OFF Functionality:

  • Added the ability to toggle the EPS state (ON/OFF).
  • All executable commands return an error if attempted while the EPS is turned OFF.
  • Note: This restriction currently applies only to executable commands. Update and request command types are unaffected.

Subsystem ON/OFF Functionality:

  • Added the capability to toggle the state of other subsystems (e.g., ADCS, GPS, etc.) via EPS commands.
  • These changes are visual-only and do not impact functionality outside this file.

Notes:

  • The new functionality is isolated within the EPS subsystem and does not affect other files or components.

@sahilfidha sahilfidha marked this pull request as draft December 9, 2024 05:39
@sahilfidha sahilfidha marked this pull request as ready for review December 9, 2024 05:44
Copy link
Contributor

@rrasmuss4200 rrasmuss4200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome start overall.

Could you also include a little readme or text with about how to use it? i.e How to send commands and see the updates on the client side.

You can also consider looking into the GPIO library in Python for this if it fits in well

@sahilfidha sahilfidha marked this pull request as draft December 9, 2024 23:35
@sahilfidha sahilfidha self-assigned this Dec 9, 2024
@sahilfidha sahilfidha requested a review from DrakBoul January 12, 2025 20:28
@sahilfidha
Copy link
Contributor Author

Awesome start overall.

Could you also include a little readme or text with about how to use it? i.e How to send commands and see the updates on the client side.

You can also consider looking into the GPIO library in Python for this if it fits in well

Thank you for the feedback!

  • Added a README: I've created a README file that explains how to send commands and view updates on the client side. Please let me know if it covers everything you had in mind or if there's anything more you'd like included.

  • Regarding GPIO: I was unsure how the GPIO library would fit into this context, especially since these appear to be standalone programs that do not currently interact with any external hardware or systems. If there’s additional work required or a specific direction you’d like me to explore, I would appreciate some further explanation, as I don’t fully understand how everything works yet.

@sahilfidha sahilfidha closed this Jan 12, 2025
@sahilfidha sahilfidha reopened this Jan 12, 2025
@sahilfidha sahilfidha marked this pull request as ready for review January 12, 2025 20:33
Copy link
Contributor

@rrasmuss4200 rrasmuss4200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good Sahil. Sorry I don't have my laptop to run it so I can approve it now but hopefully someone can do this quick and we can use it for simulating functionalities onboard with the EPS. Good work

@rrasmuss4200 rrasmuss4200 requested a review from kulovac January 14, 2025 01:39
@kulovac
Copy link
Contributor

kulovac commented Jan 14, 2025

Your README looks excellent, but I couldn't get the last two commands to give me the expected output stated in your README. Instead, I got ERROR: Invalid execute command for both, which I think should give me a different error at least. This may be an issue with my computer so if @DrakBoul could also take a look that would be great.

I'm not sure if I just couldn't find it either but what is the ON/OFF command for the EPS?

Also for a future PR, I'm pretty sure the CommandFactory and CommandHandler should be deprecated.

@rrasmuss4200
Copy link
Contributor

Yes that's right. Those are deprecated. Should definitely get rid of those

@shellbertt
Copy link

@kulovac were you testing this with the eps_handler in ex3_software? If not, I think that is something we should do. @sahilfidha I can show you how to get that repo built and how to run the scripts we were using for testing there sometime today or at the meeting tonight, let me know.

@shellbertt
Copy link

The idea with GPIO is that it is what we will be using to communicate with the real EPS opposed to TCP so we could try to use some sort of virtual GPIO with the simulated EPS to make it more realistic.

@sahilfidha
Copy link
Contributor Author

Your README looks excellent, but I couldn't get the last two commands to give me the expected output stated in your README. Instead, I got ERROR: Invalid execute command for both, which I think should give me a different error at least. This may be an issue with my computer so if @DrakBoul could also take a look that would be great.

I'm not sure if I just couldn't find it either but what is the ON/OFF command for the EPS?

Also for a future PR, I'm pretty sure the CommandFactory and CommandHandler should be deprecated.

I forgot to add the EPS ON/OFF command to the README. It should work now. I'm unsure why you are getting the last two commands, but the code may have a flaw. I haven't been able to test it because I do not have the sort of environment set up on my laptop, so I am sort of winging it.

About the 'CommandFactory' and 'CommandHandler', how are we handling commands if these are not used? Are we looking to refactor these files, create new ones, or have each subsystem handle commands internally? I am unsure of what was planned.

@sahilfidha
Copy link
Contributor Author

@kulovac were you testing this with the eps_handler in ex3_software? If not, I think that is something we should do. @sahilfidha I can show you how to get that repo built and how to run the scripts we were using for testing there sometime today or at the meeting tonight, let me know.

I would appreciate help in this matter! I haven't been able to test or run anything on my laptop and it would be really helpful to be able to run everything for future work.

@kulovac
Copy link
Contributor

kulovac commented Jan 14, 2025

@kulovac were you testing this with the eps_handler in ex3_software? If not, I think that is something we should do.

Not yet I've still been struggling with a build issue in the ipc.rs, but yes that is something we should do.

@kulovac
Copy link
Contributor

kulovac commented Jan 14, 2025

About the 'CommandFactory' and 'CommandHandler', how are we handling commands if these are not used? Are we looking to refactor these files, create new ones, or have each subsystem handle commands internally? I am unsure of what was planned.

For now I think it's fine to ignore that but if you take a look at the other simulated subsystems (e.g. DFGM IRIS ADCS) you'll see that they all define their own command format. There is a spreadsheet with all the command definitions. But in the future it would be nice to refactor the EPS simulated subsystem to not use the CommandHandler/CommandFactory, this can be a different PR.

Here is the spreadsheet if you haven't seen this.

@sahilfidha
Copy link
Contributor Author

About the 'CommandFactory' and 'CommandHandler', how are we handling commands if these are not used? Are we looking to refactor these files, create new ones, or have each subsystem handle commands internally? I am unsure of what was planned.

For now I think it's fine to ignore that but if you take a look at the other simulated subsystems (e.g. DFGM IRIS ADCS) you'll see that they all define their own command format. There is a spreadsheet with all the command definitions. But in the future it would be nice to refactor the EPS simulated subsystem to not use the CommandHandler/CommandFactory, this can be a different PR.

Here is the spreadsheet if you haven't seen this.

Sounds good. I am unable to merge it yet. Once I merge this, I will create another PR and work on this.

@sahilfidha
Copy link
Contributor Author

After finally being able to run it on my own laptop, I see a bunch of issues with the code. Especially with how the commands are being handled. Not how I expected it to run, so I'll tweak it a bit more before opening the PR again.

@sahilfidha sahilfidha marked this pull request as draft January 23, 2025 22:03
@sahilfidha sahilfidha closed this Feb 4, 2025
@sahilfidha sahilfidha reopened this Feb 4, 2025
@sahilfidha sahilfidha marked this pull request as ready for review February 4, 2025 07:58
@sahilfidha
Copy link
Contributor Author

I completely rewrote the EPS simulated subsystem. It does not use command_handler or command_factory and has its own logic for commands. I tested it on my laptop, and it works as mentioned in the README. Please let me know if this is good or if changes are required.

@sahilfidha
Copy link
Contributor Author

@rrasmuss4200 @kulovac @DrakBoul, could one of you review this PR and let me know if it looks good? I'm just commenting in case you folks were not aware of this.

@rrasmuss4200
Copy link
Contributor

Thanks for pinging us again. Will review it this week fs

@shellbertt
Copy link

Thanks for making some changes.

On main if I run bash test_eps_handler.sh <path to simulated repo> I can send commands and get:
image

Switching to your branch of the simulated repo it stops responding and the eps_handler dies:
image
image

This is consistent doing it several times each way so I think it is do to the simulated EPS.

Other than that I think there is something to be said about the plans for the simulated EPS which I will leave to others or for at the meeting.

@rrasmuss4200
Copy link
Contributor

Ok yes I got the same output as Kaaden. I assume the invalid command type error is happening because the eps_handler is not sending the simulated EPS the correct command to 'turn it on'. As for the eps_handler crashing after a couple failed commands, I do not know.

The next step would be for @sahilfidha to make a branch on ex3_software and make the eps_handler compatible with his simualted subsystem.

The plan for this simulated subsystem is to help with regression testing; to make sure our pipeline is passing data as expected. This can range from tests for turning it and other subsystems on and off, or even a LEOP regression test. At the end of the day, this subsystem will be useful for getting values from a 'dummy' EPS.

Copy link
Contributor

@rrasmuss4200 rrasmuss4200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last thing to look into. When I start a netcat session on
nc 127.0.0.1 8080
I send a command and then the session disconnects. Is this something with your subsystem or the way netcat communicates with it?

Priority would be making this work with the full test script on ex3_software so it can be hooked up to the whole pipeline. Overall great work though. Let's move forward with getting it working with the eps_handler.

@sahilfidha sahilfidha merged commit 8ec3a21 into main Feb 27, 2025
2 checks passed
@sahilfidha sahilfidha deleted the EPS branch February 27, 2025 02:15
@sahilfidha sahilfidha restored the EPS branch February 27, 2025 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants