public interface ISspIu {}
public record SspFrame<T> (
UInt32 HashedDestinationSASAddress,
UInt32 HashedSourceSASAddress,
UInt16 InitiatorPortTransferTag,
SspTLRControl TLRControl = SspTLRControl.UseModePage,
bool RetryDataFrames = false,
bool ChangingDataPointer = false,
UInt16 TargetPortTransferTag = 0,
byte NumberOfFillBytes = 0,
public enum SspFrameType : byte
public enum SspTLRControl : byte
public enum SspTaskAttribute : byte
public enum SspTaskManagementFunction : byte
LOGICAL_UNIT_RESET = 0x08,
QUERY_ASYNCHRONOUS_EVENT = 0x82,
public enum SspDataPres : byte
public enum SspResponseCode : byte
TASK_MANAGEMENT_FUNCTION_COMPLETE = 0x00,
TASK_MANAGEMENT_FUNCTION_NOT_SUPPORTED = 0x04,
TASK_MANAGEMENT_FUNCTION_FAILED = 0x05,
TASK_MANAGEMENT_FUNCTION_SUCCEEDED = 0x08,
INCORRECT_LOGICAL_UNIT_NUMBER = 0x09,
OVERLAPPED_INITIATOR_PORT_TRANSFER_TAG_ATTEMPTED = 0x0A,
public record CommandFrameIU(
Memory<byte> AdditionalCDBBytes,
UInt64 LogicalUnitNumber = 0,
byte EnableFirstBurst = 0,
byte CommandPriority = 0,
SspTaskAttribute TaskAttribute = 0,
byte AdditionalCDBLength = 0 ) : ISspIu;
public record TaskFrameIU(
UInt64 LogicalUnitNumber = 0,
SspTaskManagementFunction TaskManagementFunction = 0,
uint IntiatorPortTransferTagToManage = 0 ) : ISspIu;
public record Xfer_RdyFrameIU(
UInt32 WriteDataLength) : ISspIu;
public record DataFrameIU(Memory<byte> Data) : ISspIu;
public record ResponseFrameIU(
UInt32 ResponseDataLength,
Memory<byte> ResponseData,
Memory<byte> AdditionalResponseInformation,
SspResponseCode ResponseCode) : ISspIu;
public static void Main()
Console.WriteLine("Hello World");
var myXFer_RdyIU = new Xfer_RdyFrameIU(0,0x100);
var myXferRdyframe = new SspFrame<Xfer_RdyFrameIU>(SspFrameType.XFER_RDY, 1, 2, 3, myXFer_RdyIU, CRC = true);
var myXferRdyframe1 = new SspFrame<Xfer_RdyFrameIU>(SspFrameType.XFER_RDY, 1, 2, 3, new Xfer_RdyFrameIU(0,0x100));
var myResponseIU = new ResponseFrameIU();
Console.WriteLine(myXferRdyframe);
Console.WriteLine(myXferRdyframe.IU);
Console.WriteLine(myXferRdyframe1);
Console.WriteLine(myXferRdyframe1.IU);