public ItemData <ushort> ReadUInt16(DeviceAddress address) { if (IsClosed) { return(new ItemData <ushort>(0, 0, QUALITIES.QUALITY_NOT_CONNECTED)); } else { LGX_Read *data = Tuxeip_Class._ReadLgxData(session, connection, GetAddress(address), 1); return(new ItemData <ushort>((ushort)Tuxeip_Class._GetLGXValueAsInteger(data, 0), 0, QUALITIES.QUALITY_GOOD)); } }
public ItemData <bool> ReadBit(DeviceAddress address) { if (IsClosed) { return(new ItemData <bool>(false, 0, QUALITIES.QUALITY_NOT_CONNECTED)); } else { LGX_Read *data = Tuxeip_Class._ReadLgxData(session, connection, GetAddress(address), 1); return(new ItemData <bool>(Tuxeip_Class._GetLGXValueAsInteger(data, 0) > 0, 0, QUALITIES.QUALITY_GOOD)); } }