ProviderI2cTransferResult 结构

定义

提供有关 ReadPartialWritePartialWriteReadPartial 方法执行的数据传输是否成功的信息,以及该方法传输的实际字节数。

public value class ProviderI2cTransferResult
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.DevicesLowLevelContract, 131072)]
struct ProviderI2cTransferResult
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.DevicesLowLevelContract), 131072)]
public struct ProviderI2cTransferResult
var providerI2cTransferResult = {
status : /* Your value */,
bytesTransferred : /* Your value */
}
Public Structure ProviderI2cTransferResult
继承
ProviderI2cTransferResult
属性

Windows 要求

设备系列
Windows IoT Extension SDK (在 10.0.10586.0 中引入)
Windows 10 Anniversary Edition (在 10.0.14393.0 中引入)
API contract
Windows.Devices.DevicesLowLevelContract (在 v2.0 中引入)

字段

BytesTransferred

操作实际传输的实际字节数。 下表描述了此值对每个方法所表示的内容。

方法 说明
ReadPartial 读取操作读入缓冲区的实际字节数。 如果 Status 成员的值为 ProviderI2CTransferStatus.PartialTransfer,则此值可能小于在 buffer 参数中指定的 缓冲区 中的字节数。
WritePartial 写入操作传输到 I2 C 设备的实际字节数。 如果 Status 成员的值为 ProviderI2CTransferStatus.PartialTransfer,则此值可能小于在 buffer 参数中指定的 缓冲区 中的字节数。
WriteReadPartial 操作传输的实际字节数,即操作写入的字节数和操作读取的字节数之和。 如果 Status 成员的值为 ProviderI2CTransferStatus.PartialTransfer,则此值可能小于在 writeBuffer 和 readBuffer 参数中指定的缓冲区长度之和。
Status

一个 枚举值,该值指示读取或写入操作是否传输了方法请求的字节数,或者完全传输未成功的原因。 对于 WriteReadPartial,该值指示是否完全传输了写入和读取操作的数据。

适用于