• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# scsi_peripheral_types.h
2<!--Kit: Driver Development Kit-->
3<!--Subsystem: Driver-->
4<!--Owner: @lixinsheng2-->
5<!--Designer: @w00373942-->
6<!--Tester: @dong-dongzhen-->
7<!--Adviser: @w_Machine_cc-->
8
9## Overview
10
11Provides the enum variables, structures, and macros used in the SCSI Peripheral DDK APIs.
12
13**File to include**: &lt;scsi_peripheral/scsi_peripheral_types.h&gt;
14
15**Library**: libscsi.z.so
16
17**System capability**: SystemCapability.Driver.SCSI.Extension
18
19**Since**: 18
20
21**Related module**: [SCSIPeripheralDDK](capi-scsiperipheralddk.md)
22
23## Summary
24
25### Structs
26
27| Name                                                                                  | typedef Keyword| Description|
28|--------------------------------------------------------------------------------------| -- | -- |
29| [ScsiPeripheral_DeviceMemMap](capi-scsiperipheralddk-scsiperipheral-devicememmap.md) | ScsiPeripheral_DeviceMemMap | Represents the device memory mapping created by calling **OH_ScsiPeripheral_CreateDeviceMemMap**. The buffer that uses the device memory mapping can provide better performance.|
30| [ScsiPeripheral_IORequest](capi-scsiperipheralddk-scsiperipheral-iorequest.md)       | ScsiPeripheral_IORequest | Read/write operation request.|
31| [ScsiPeripheral_Request](capi-scsiperipheralddk-scsiperipheral-request.md)           | ScsiPeripheral_Request | Request structure.|
32| [ScsiPeripheral_Response](capi-scsiperipheralddk-scsiperipheral-response.md)         | ScsiPeripheral_Response | Response structure.|
33| [ScsiPeripheral_TestUnitReadyRequest](capi-scsiperipheralddk-scsiperipheral-testunitreadyrequest.md) | ScsiPeripheral_TestUnitReadyRequest | Request structure of the **test unit ready** command.|
34| [ScsiPeripheral_InquiryRequest](capi-scsiperipheralddk-scsiperipheral-inquiryrequest.md)            | ScsiPeripheral_InquiryRequest | Request structure of the **inquiry** command.|
35| [ScsiPeripheral_InquiryInfo](capi-scsiperipheralddk-scsiperipheral-inquiryinfo.md)                  | ScsiPeripheral_InquiryInfo | SCSI inquiry data.|
36| [ScsiPeripheral_ReadCapacityRequest](capi-scsiperipheralddk-scsiperipheral-readcapacityrequest.md)  | ScsiPeripheral_ReadCapacityRequest | Request structure of the **read capacity** command.|
37| [ScsiPeripheral_CapacityInfo](capi-scsiperipheralddk-scsiperipheral-capacityinfo.md)                | ScsiPeripheral_CapacityInfo | SCSI read capacity.|
38| [ScsiPeripheral_RequestSenseRequest](capi-scsiperipheralddk-scsiperipheral-requestsenserequest.md)  | ScsiPeripheral_RequestSenseRequest | Request structure of the **request sense** command.|
39| [ScsiPeripheral_BasicSenseInfo](capi-scsiperipheralddk-scsiperipheral-basicsenseinfo.md)            | ScsiPeripheral_BasicSenseInfo | Basic information about the sense data.|
40| [ScsiPeripheral_VerifyRequest](capi-scsiperipheralddk-scsiperipheral-verifyrequest.md)              | ScsiPeripheral_VerifyRequest | Request structure of the **verify** command.|
41| [ScsiPeripheral_Device](capi-scsiperipheralddk-scsiperipheral-device.md)                            | ScsiPeripheral_Device | Opaque SCSI device structure.|
42
43### Enums
44
45| Name| typedef Keyword| Description|
46| -- | -- | -- |
47| [ScsiPeripheral_DdkErrCode](#scsiperipheral_ddkerrcode) | ScsiPeripheral_DdkErrCode | SCSI Peripheral DDK error codes.|
48| [ScsiPeripheral_Status](#scsiperipheral_status) | ScsiPeripheral_Status | SCSI status used for the response.|
49
50## Enum Description
51
52### ScsiPeripheral_DdkErrCode
53
54```
55enum ScsiPeripheral_DdkErrCode
56```
57
58**Description**
59
60SCSI Peripheral DDK error codes.
61
62**Since**: 18
63
64| Enum| Description|
65| -- | -- |
66| SCSIPERIPHERAL_DDK_NO_PERM = 201 | Permission denied.|
67| SCSIPERIPHERAL_DDK_INVALID_PARAMETER = 401 | Invalid parameter.|
68| SCSIPERIPHERAL_DDK_SUCCESS = 31700000 | Operation success.|
69| SCSIPERIPHERAL_DDK_MEMORY_ERROR = 31700001 | Memory-related errors, such as insufficient memory, memory data replication failure, or memory request failure.|
70| SCSIPERIPHERAL_DDK_INVALID_OPERATION = 31700002 | Invalid operation.|
71| SCSIPERIPHERAL_DDK_IO_ERROR = 31700003 | Device input/output operation failed.|
72| SCSIPERIPHERAL_DDK_TIMEOUT = 31700004 | Transfer timeout.|
73| SCSIPERIPHERAL_DDK_INIT_ERROR = 31700005 | DDK initialization error, or DDK uninitialized.|
74| SCSIPERIPHERAL_DDK_SERVICE_ERROR = 31700006 | Communication with the SCSI Peripheral DDK failed.|
75| SCSIPERIPHERAL_DDK_DEVICE_NOT_FOUND = 31700007 | Device not found.|
76
77### ScsiPeripheral_Status
78
79```
80enum ScsiPeripheral_Status
81```
82
83**Description**
84
85Enumerates the SCSI status codes used for the response.
86
87**Since**: 18
88
89| Enum| Description|
90| -- | -- |
91| SCSIPERIPHERAL_STATUS_GOOD = 0x00 | Normal state.|
92| SCSIPERIPHERAL_STATUS_CHECK_CONDITION_NEEDED = 0x02 | Status check required.|
93| SCSIPERIPHERAL_STATUS_CONDITION_MET = 0x04 | Conditions met.|
94| SCSIPERIPHERAL_STATUS_BUSY = 0x08 | Occupying.|
95| SCSIPERIPHERAL_STATUS_RESERVATION_CONFLICT = 0x18 | Resource reservation conflict.|
96| SCSIPERIPHERAL_STATUS_TASK_SET_FULL = 0x28 | Task set already full.|
97| SCSIPERIPHERAL_STATUS_ACA_ACTIVE = 0x30 | ACA activity status.|
98| SCSIPERIPHERAL_STATUS_TASK_ABORTED = 0x40 | Task aborted.|
99