示例#1
0
 public Signal(int byteIndex, PointDataTypeConstants dataType, string title)
 {
     ByteIndex = byteIndex;
     DataType  = dataType;
     Data      = BitConverter.GetBytes(0);
     Title     = title;
 }
示例#2
0
文件: Plcsim.cs 项目: cobrce/Elevator
        public int?Read(IPoint output)
        {
            object data = null;
            PointDataTypeConstants DataType = GetDataType(output);

            switch (output.Segment)
            {
            case MemorySegment.output:
                sim.ReadOutputPoint(output.ByteIndex, output.BitIndex, DataType, ref data);
                break;

            case MemorySegment.datablock:
                sim.ReadDataBlockValue(output.DeviceIndex, output.ByteIndex, output.BitIndex, DataType, ref data);
                break;

            case MemorySegment.memory:
                sim.ReadFlagValue(output.ByteIndex, output.BitIndex, DataType, ref data);
                break;

            default:
                return(null);
            }
            return(ParseObject(data));
        }
示例#3
0
 public SignalAnalog(int byteIndex, PointDataTypeConstants dataType, string title)
     : base(byteIndex, dataType, title)
 {
 }
示例#4
0
 public SignalDigital(int byteIndex, int bitIndex, PointDataTypeConstants dataType, string title)
     : base(byteIndex, dataType, title)
 {
     BitIndex = bitIndex;
 }
示例#5
0
 public SignalAnalogInput(int byteIndex, PointDataTypeConstants dataType, string title, IGenerationMethod method)
     : base(byteIndex, dataType, title)
 {
     mGenerationMethod = method;
 }