ReadWriteNetHelperWaitAsync 方法 (IReadWriteNet, String, UInt32, Int32, Int32) |
等待指定地址的UInt32值为指定的值,可以指定刷新数据的频率,等待的超时时间,如果超时时间为-1的话,则是无期限等待。
Waiting for the UInt32 value of the specified address to be the specified value, you can specify the frequency of refreshing the data,
and the timeout time to wait. If the timeout time is -1, it is an indefinite wait.
命名空间:
HslCommunication.Core.Net
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public static Task<OperateResult<TimeSpan>> WaitAsync(
IReadWriteNet readWriteNet,
string address,
uint waitValue,
int readInterval,
int waitTimeout
)
Public Shared Function WaitAsync (
readWriteNet As IReadWriteNet,
address As String,
waitValue As UInteger,
readInterval As Integer,
waitTimeout As Integer
) As Task(Of OperateResult(Of TimeSpan))
public:
static Task<OperateResult<TimeSpan>^>^ WaitAsync(
IReadWriteNet^ readWriteNet,
String^ address,
unsigned int waitValue,
int readInterval,
int waitTimeout
)
static member WaitAsync :
readWriteNet : IReadWriteNet *
address : string *
waitValue : uint32 *
readInterval : int *
waitTimeout : int -> Task<OperateResult<TimeSpan>>
参数
- readWriteNet
- 类型:HslCommunication.CoreIReadWriteNet
通信对象 - address
- 类型:SystemString
其实地址 - waitValue
- 类型:SystemUInt32
等待检测是值 - readInterval
- 类型:SystemInt32
读取的频率 - waitTimeout
- 类型:SystemInt32
等待的超时时间,如果超时时间为-1的话,则是无期限等待。
返回值
类型:
TaskOperateResultTimeSpan是否等待成功的结果对象,一旦通信失败,或是等待超时就返回失败。否则返回成功,并告知调用方等待了多久。
参见