GeSRTPNetReadAsync 方法 (String, UInt16) |
批量读取字节数组信息,需要指定地址和长度,返回原始的字节数组,支持 I,Q,M,T,SA,SB,SC,S,G 的位和字节读写,支持 AI,AQ,R 的字读写操作,地址示例:R1,M1
Batch read byte array information, need to specify the address and length, return the original byte array.
Support I, Q, M, T, SA, SB, SC, S, G bit and byte read and write, support AI, AQ, R word read and write operations, address examples: R1, M1
命名空间:
HslCommunication.Profinet.GE
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public override Task<OperateResult<byte[]>> ReadAsync(
string address,
ushort length
)
Public Overrides Function ReadAsync (
address As String,
length As UShort
) As Task(Of OperateResult(Of Byte()))
public:
virtual Task<OperateResult<array<unsigned char>^>^>^ ReadAsync(
String^ address,
unsigned short length
) override
abstract ReadAsync :
address : string *
length : uint16 -> Task<OperateResult<byte[]>>
override ReadAsync :
address : string *
length : uint16 -> Task<OperateResult<byte[]>>
参数
- address
- 类型:SystemString
数据地址 - length
- 类型:SystemUInt16
数据长度
返回值
类型:
TaskOperateResultByte带有成功标识的byte[]数组
实现
IReadWriteNetReadAsync(String, UInt16)备注
其中读取R,AI,AQ寄存器的原始字节时,传入的长度参数为字节长度。长度为10,返回10个字节数组信息,如果返回长度不满6个字节的,一律返回6个字节的数据
参见