Beispiel #1
0
 private void InitializerToThis(ModbusObjInitializer init)
 {
     this.deviceNumber  = init.deviceNum;
     this.readCmnd      = init.readCmnd;
     this.writeCmnd     = init.writeCmnd;
     this.addressHi     = init.addressHi;
     this.addressLo     = init.addressLo;
     this.countOutputHi = init.countOutputHi;
     this.countOutputLo = init.countOutputLo;
 }
Beispiel #2
0
        public MBBase GetModbusObj(ModbusObjInitializer initializer)
        {
            switch (initializer.type)
            {
            case ModbusObjType.Bit:
                return(new MBBit(initializer));

            case ModbusObjType.Int16:
                return(new MB16Bit(initializer));

            case ModbusObjType.Float:
            case ModbusObjType.Int32:
                return(new MB32Bit(initializer));

            default:
                throw new NotSupportedException();
            }
        }
Beispiel #3
0
 public MB16Bit(ModbusObjInitializer initializer) : base(initializer)
 {
     CompleteWrtieMsg();
 }
Beispiel #4
0
 public MBBase(ModbusObjInitializer initializer)
 {
     InitializerToThis(initializer);
     CreatWriteCmndMsg();
     CreateReadCmndMsg();
 }