Added support for scsi commands with no data. #12
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.
Currently there is only support for scsi commands that either send or receive data, but some commands do not send or receive any data. I added support for these "no data" commands. A common example is the "Test Unit Ready" scsi comand, which is 6 bytes of all 00. The result of this command is gotten from the sense data bytes.
https://docs.oracle.com/en/storage/tape-storage/sl4000/slksr/test-unit-ready-00h.html
I succesfully tested the windows version of these changes but did not test the linux version.
Since no data is sent I would expect to pass "None" for the "data" parameter in the SCSIDevice::issue_command() methods. So I added checks for None and create an empty data buffer inside the method. I wasn't sure if I should add "None" in the parameter specification here: "data: Union[ctypes.Array, ctypes.Structure],"