You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
830 B
C#
37 lines
830 B
C#
using DataBlockHelper.DBHelpers;
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace DataBlockHelper.Entity
|
|
{
|
|
public class Db2101Entity
|
|
{
|
|
public Db2101Entity() { }
|
|
|
|
|
|
public Db2101Entity(ushort startSet, byte[] bytes)
|
|
{
|
|
byte[] content = bytes.Skip(startSet).Take(4).ToArray();
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
var a = content[0];
|
|
var b = content[1];
|
|
enable = a.GetBit(0);
|
|
finished = a.GetBit(1);
|
|
time= trans.TransInt16(content,2);
|
|
|
|
}
|
|
|
|
|
|
public bool enable { get; set; }
|
|
public bool finished { get; set; }
|
|
public short time { get; set; }
|
|
}
|
|
}
|