public Item <float>[] Readfloats(DeviceAddress deviceAddress, ushort length) { var datas = readRegister(deviceAddress, 2 * length); var bdatas = UnsafeNetConvert.BytesToFloats(datas, 0, length, deviceAddress.ByteOrder); return(NetConvert.ToItems(bdatas, 0, length)); }
public Item <bool>[] ReadBools(DeviceAddress deviceAddress, ushort length) { var datas = readBool(deviceAddress, length); var bdatas = NetConvert.BytesToBools(datas, length); return(NetConvert.ToItems(bdatas, 0, length)); }
public Item <ushort>[] ReadUShorts(DeviceAddress deviceAddress, ushort length) { var datas = readyBytes(deviceAddress, 2 * length); var ushorts = UnsafeNetConvert.BytesToUShorts(datas, 0, length, deviceAddress.ByteOrder); return(NetConvert.ToItems(ushorts, 0, length)); }
public Item <int>[] ReadInts(DeviceAddress deviceAddress, ushort length) { var datas = readyBytes(deviceAddress, 4 * length); var ints = UnsafeNetConvert.BytesToInts(datas, 0, length, deviceAddress.ByteOrder); return(NetConvert.ToItems(ints, 0, length)); }
public Item <bool>[] ReadBools(DeviceAddress deviceAddress, ushort length) { var datas = readyBytes(deviceAddress, (int)Math.Ceiling((double)(deviceAddress.BitAddress + length) / 8)); var bools = NetConvert.BytesToBools(datas, deviceAddress.BitAddress, length); return(NetConvert.ToItems(bools, 0, length)); }
public Item <byte>[] ReadBytes(DeviceAddress deviceAddress, ushort length) { var datas = readyBytes(deviceAddress, length); return(NetConvert.ToItems(datas, 0, length)); }