Пример #1
0
 public Signal(int byteIndex, PointDataTypeConstants dataType, string title)
 {
     ByteIndex = byteIndex;
     DataType  = dataType;
     Data      = BitConverter.GetBytes(0);
     Title     = title;
 }
Пример #2
0
        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;
 }