SiemensS7ServerReadStringAsync 方法 (String, Encoding) |
读取西门子的地址的字符串信息,这个信息是和西门子绑定在一起,长度随西门子的信息动态变化的
Read the Siemens address string information. This information is bound to Siemens and its length changes dynamically with the Siemens information
命名空间:
HslCommunication.Profinet.Siemens
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public Task<OperateResult<string>> ReadStringAsync(
string address,
Encoding encoding
)
Public Function ReadStringAsync (
address As String,
encoding As Encoding
) As Task(Of OperateResult(Of String))
public:
Task<OperateResult<String^>^>^ ReadStringAsync(
String^ address,
Encoding^ encoding
)
member ReadStringAsync :
address : string *
encoding : Encoding -> Task<OperateResult<string>>
参数
- address
- 类型:SystemString
数据地址,具体的格式需要参照类的说明文档 - encoding
- 类型:System.TextEncoding
自定的编码信息,一般ASCII即可,中文需要 Encoding.GetEncoding("gb2312")
返回值
类型:
TaskOperateResultString带有是否成功的字符串结果类对象
备注
如果指定编码,一般ASCII即可,中文需要 Encoding.GetEncoding("gb2312")
参见