コード例 #1
0
ファイル: ABPLCDriver.cs プロジェクト: zz110/SharpSCADA
 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));
     }
 }
コード例 #2
0
ファイル: ABPLCDriver.cs プロジェクト: zz110/SharpSCADA
 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));
     }
 }