NetworkWebApiDeviceWaitAsync 方法 (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 中) 版本:11.8.2.0 (11.8.2.0)
语法public Task<OperateResult<TimeSpan>> WaitAsync(
string address,
uint waitValue,
int readInterval = 100,
int waitTimeout = -1
)
Public Function WaitAsync (
address As String,
waitValue As UInteger,
Optional readInterval As Integer = 100,
Optional waitTimeout As Integer = -1
) As Task(Of OperateResult(Of TimeSpan))
public:
virtual Task<OperateResult<TimeSpan>^>^ WaitAsync(
String^ address,
unsigned int waitValue,
int readInterval = 100,
int waitTimeout = -1
) sealed
abstract WaitAsync :
address : string *
waitValue : uint32 *
?readInterval : int *
?waitTimeout : int
(* Defaults:
let _readInterval = defaultArg readInterval 100
let _waitTimeout = defaultArg waitTimeout -1
*)
-> Task<OperateResult<TimeSpan>>
override WaitAsync :
address : string *
waitValue : uint32 *
?readInterval : int *
?waitTimeout : int
(* Defaults:
let _readInterval = defaultArg readInterval 100
let _waitTimeout = defaultArg waitTimeout -1
*)
-> Task<OperateResult<TimeSpan>>
参数
- address
- 类型:SystemString
其实地址 - waitValue
- 类型:SystemUInt32
等待检测是值 - readInterval (Optional)
- 类型:SystemInt32
读取的频率 - waitTimeout (Optional)
- 类型:SystemInt32
等待的超时时间,如果超时时间为-1的话,则是无期限等待。
返回值
类型:
TaskOperateResultTimeSpan是否等待成功的结果对象,一旦通信失败,或是等待超时就返回失败。否则返回成功,并告知调用方等待了多久。
实现
IReadWriteNetWaitAsync(String, UInt32, Int32, Int32)
参见