-
Notifications
You must be signed in to change notification settings - Fork 70
iSCSI commands and enum values to support DVD-ROM devices #10
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
base: master
Are you sure you want to change the base?
Conversation
| ControlModePage = 0x0A, | ||
| PowerConditionModePage = 0x1A, | ||
| InformationalExceptionsControlModePage = 0x1C, | ||
| MMCapabilitiesAndMechanicalStatus = 0x2A, |
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 device specific, right? which specification covers that 0x2A 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.
This is CD/DVD device specific (MMC), Windows requests it, for example, when peripheral device type is 0x5.
You can find it's description in scsi spec paragraph 5.2.3.4 (http://www.13thmonkey.org/documentation/SCSI/x3_304_1997.pdf)
| TransferLength = (uint)AllocationLength; | ||
| } | ||
|
|
||
| public override byte[] GetBytes() => throw new NotImplementedException(); |
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 would probably implement GetBytes for completeness,
Also, it would be easier for me if you add this command implementation as a separate PR - it's hard to find time to sit and review large PRs
| // Request Type | ||
| public byte RT; | ||
| // Starting Feature Number | ||
| public ushort SFN; |
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.
StartingFeatureNumber is more easily understandable than SFN
|
|
||
| namespace SCSI | ||
| { | ||
| internal class GetConfigurationCommand : SCSICommandDescriptorBlock |
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.
Shouldn't this inherit from SCSICommandDescriptorBlock10? and than you can use some of the fields...
|
|
||
| namespace SCSI | ||
| { | ||
| internal class ReadTocCommand : SCSICommandDescriptorBlock |
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.
Shouldn't this inherit from SCSICommandDescriptorBlock10? and than you can use some of the fields...
| TransferLength = (uint)AllocationLength; | ||
| } | ||
|
|
||
| public override byte[] GetBytes() => throw new NotImplementedException(); |
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 would prefer implementing GetBytes for completeness, as it shouldn't take too much work
|
|
||
| namespace SCSI | ||
| { | ||
| public class ModeSense10CommandDescriptorBlock : SCSICommandDescriptorBlock |
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.
Should this inherit from SCSICommandDescriptorBlock10?
|
|
||
| public override byte[] GetBytes() | ||
| { | ||
| var buffer = new byte[PacketLength]; |
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.
"byte[] buffer" is better IMO
| @@ -0,0 +1,268 @@ | |||
| using System; | |||
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.
Not the prettiest class I've seen
| @@ -0,0 +1,34 @@ | |||
| using System; | |||
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 could have been a more detailed implementation
| { | ||
| switch(_format) | ||
| { | ||
| case 0: return GetFormattedTOC(); |
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.
shouldn't each format deserve a class?
* added GetBytes()
This PR contains only commands, parameters and their respective enum values to support DVD devices