DeviceCommunicationWait 方法 (String, UInt64, Int32, Int32) |
等待指定地址的UInt64值为指定的值,可以指定刷新数据的频率,等待的超时时间,如果超时时间为-1的话,则是无期限等待。
Waiting for the UInt64 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.Device
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public OperateResult<TimeSpan> Wait(
string address,
ulong waitValue,
int readInterval = 100,
int waitTimeout = -1
)
Public Function Wait (
address As String,
waitValue As ULong,
Optional readInterval As Integer = 100,
Optional waitTimeout As Integer = -1
) As OperateResult(Of TimeSpan)
public:
virtual OperateResult<TimeSpan>^ Wait(
String^ address,
unsigned long long waitValue,
int readInterval = 100,
int waitTimeout = -1
) sealed
abstract Wait :
address : string *
waitValue : uint64 *
?readInterval : int *
?waitTimeout : int
(* Defaults:
let _readInterval = defaultArg readInterval 100
let _waitTimeout = defaultArg waitTimeout -1
*)
-> OperateResult<TimeSpan>
override Wait :
address : string *
waitValue : uint64 *
?readInterval : int *
?waitTimeout : int
(* Defaults:
let _readInterval = defaultArg readInterval 100
let _waitTimeout = defaultArg waitTimeout -1
*)
-> OperateResult<TimeSpan>
参数
- address
- 类型:SystemString
其实地址 - waitValue
- 类型:SystemUInt64
等待检测是值 - readInterval (Optional)
- 类型:SystemInt32
读取的频率 - waitTimeout (Optional)
- 类型:SystemInt32
等待的超时时间,如果超时时间为-1的话,则是无期限等待。
返回值
类型:
OperateResultTimeSpan是否等待成功的结果对象,一旦通信失败,或是等待超时就返回失败。否则返回成功,并告知调用方等待了多久。
实现
IReadWriteNetWait(String, UInt64, Int32, Int32)参见