iSCSI commands and enum values to support DVD-ROM devices#10
Conversation
| ControlModePage = 0x0A, | ||
| PowerConditionModePage = 0x1A, | ||
| InformationalExceptionsControlModePage = 0x1C, | ||
| MMCapabilitiesAndMechanicalStatus = 0x2A, |
There was a problem hiding this comment.
This is device specific, right? which specification covers that 0x2A code?
There was a problem hiding this comment.
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.
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.
StartingFeatureNumber is more easily understandable than SFN
|
|
||
| namespace SCSI | ||
| { | ||
| internal class GetConfigurationCommand : SCSICommandDescriptorBlock |
There was a problem hiding this comment.
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.
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.
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.
Should this inherit from SCSICommandDescriptorBlock10?
|
|
||
| public override byte[] GetBytes() | ||
| { | ||
| var buffer = new byte[PacketLength]; |
| @@ -0,0 +1,268 @@ | |||
| using System; | |||
There was a problem hiding this comment.
Not the prettiest class I've seen
| @@ -0,0 +1,34 @@ | |||
| using System; | |||
There was a problem hiding this comment.
This could have been a more detailed implementation
| { | ||
| switch(_format) | ||
| { | ||
| case 0: return GetFormattedTOC(); |
There was a problem hiding this comment.
shouldn't each format deserve a class?
* added GetBytes()
This PR contains only commands, parameters and their respective enum values to support DVD devices