diff --git a/zh-cn/device-dev/reference/hdi-apis/_u_s_b.md b/zh-cn/device-dev/reference/hdi-apis/_u_s_b.md index 451ef796db779d80aff06641c02ef9b552d14d96..fff5a66b1ece6c83746c75948898df4a293329e3 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_u_s_b.md +++ b/zh-cn/device-dev/reference/hdi-apis/_u_s_b.md @@ -96,6 +96,8 @@ | [OHOS::USB::UsbdSubscriber::DeviceEvent](#deviceevent) (const [UsbInfo](_o_h_o_s_1_1_u_s_b_1_1_usb_info.md) &info)=0 | 设备事件。 [更多...](#deviceevent) | | [OHOS::USB::UsbdSubscriber::PortChangedEvent](#portchangedevent) (int32_t portId, int32_t powerRole, int32_t dataRole, int32_t mode)=0 | 端口改变事件。 [更多...](#portchangedevent) | | [OHOS::USB::UsbdSubscriber::OnRemoteRequest](#onremoterequest) (uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override | 远程请求。 [更多...](#onremoterequest) | +| [OHOS::USB::UsbdSubscriber::ParserUsbInfo](#parserusbinfo) (MessageParcel &data, MessageParcel &reply, MessageOption &option, UsbInfo &info) | 解析USB设备信息。 [更多...](#parserusbinfo) | +| [OHOS::USB::UsbdSubscriber::ParserPortInfo](#parserportinfo) (MessageParcel &data, MessageParcel &reply, MessageOption &option, PortInfo &info) | 解析USB设备端口信息。 [更多...](#parserportinfo) | ### 变量 @@ -1055,6 +1057,75 @@ int32_t OHOS::USB::UsbdClient::OpenDevice (const UsbDev & dev) 1.0 +### ParserUsbInfo() + + +``` +static int32_t OHOS::USB::UsbdSubscriber::ParserUsbInfo(MessageParcel &data, MessageParcel &reply, MessageOption &option, UsbInfo &info) +``` + +**描述:** + +解析USB设备信息。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| data | 输入参数,命令字。| +| reply | 输出参数,返回的数据。 | +| option | 输入参数,选项数据。| +| info | 输出参数,USB设备信息。| + +**返回:** + +0 表示操作成功。 + +非零值 表示操作失败。 + +**Since:** + +3.0 + +**Version:** + +1.0 + +### ParserPortInfo() + + +``` +static int32_t OHOS::USB::UsbdSubscriber::ParserPortInfo(MessageParcel &data, MessageParcel &reply, MessageOption &option, PortInfo &info) +``` + +**描述:** + +解析USB设备端口信息。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| data | 输入参数,命令字。| +| reply | 输出参数,返回的数据。 | +| option | 输入参数,选项数据。| +| info | 输出参数,USB设备端口信息。| + +**返回:** + +0 表示操作成功。 + +非零值 表示操作失败。 + +**Since:** + +3.0 + +**Version:** + +1.0 + + ### PortChangedEvent()