HslHelperReadBoolAsync 方法 |
按照位为单位从设备中批量读取bool数组,如果地址中包含了小数点,则使用字的方式读取数据,然后解析出位数据
The BOOL array is read in batches from the device in bits, and if the address contains decimal points, the data is read in a word manner, and then the bit data is parsed
命名空间:
HslCommunication.Core
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public static Task<OperateResult<bool[]>> ReadBoolAsync(
IReadWriteNet device,
string address,
ushort length,
int addressLength = 16,
bool reverseByWord = false
)
Public Shared Function ReadBoolAsync (
device As IReadWriteNet,
address As String,
length As UShort,
Optional addressLength As Integer = 16,
Optional reverseByWord As Boolean = false
) As Task(Of OperateResult(Of Boolean()))
public:
static Task<OperateResult<array<bool>^>^>^ ReadBoolAsync(
IReadWriteNet^ device,
String^ address,
unsigned short length,
int addressLength = 16,
bool reverseByWord = false
)
static member ReadBoolAsync :
device : IReadWriteNet *
address : string *
length : uint16 *
?addressLength : int *
?reverseByWord : bool
(* Defaults:
let _addressLength = defaultArg addressLength 16
let _reverseByWord = defaultArg reverseByWord false
*)
-> Task<OperateResult<bool[]>>
参数
- device
- 类型:HslCommunication.CoreIReadWriteNet
设备的通信对象 - address
- 类型:SystemString
地址信息 - length
- 类型:SystemUInt16
读取的位长度信息 - addressLength (Optional)
- 类型:SystemInt32
单位地址的占位长度信息 - reverseByWord (Optional)
- 类型:SystemBoolean
是否根据字进行反转操作
返回值
类型:
TaskOperateResultBooleanbool数组的结果对象
参见