-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix up edl_cmd_shell for os commands #44
Merged
+21
−4
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5f961ed
Fix up edl_cmd_shell for os commands
ThirteenFish bc3a664
Fix cfdp-py to 0.1.2
ThirteenFish aba6d17
Print current sequence number in CFDP script
ThirteenFish 36f4d54
Handle sdo writes to type DOMAIN and OCTET_STRING in edl_cmd_shell
ThirteenFish File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
bitstring | ||
black | ||
build | ||
cfdp-py | ||
cfdp-py==0.1.2 | ||
dataclasses-json | ||
isort | ||
oresat-configs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assume the value is string, domain type are void, so this wont work in all cases. It would be more robust to expect the user to past a hex string for domain types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the quick encode a string will work for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good point, I would prefer to do it properly over quick hacks. Looking through CiA-301 and oresat-configs it feels like while officially undefined the intended use for
DOMAIN
is for file transfers; if the data is short enough to be written as a hex string easily it should generally beOCTET_STRING
. What if instead forDOMAIN
we expect a filename anddo_sdo_write()
opens and sends the contents?On the other hand it looks like the type is wrong for
OS command
in oresat-configs. Thecommand
should beOCTET_STRING
instead ofDOMAIN
(CiA-301 7.4.8.6). Additionally 7.5.2.26 sayscommand
should be "ISO8859 [ASCII] characters or binary". So given that, what if indo_sdo_write()
forOCTET_STRING
we try to decode the argument from a hex string tobytes
and if that fails then just.encode("ascii")
the given string? That way we cans still send shell commands directly throughsdo_write
.In code:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, that sounds like a good plan