コード例 #1
0
        protected SlaveModuleDevicePanelViewModelBase(IModbusTransferManager modbusTransferManager, SlaveModuleProcessBase slaveModuleProcess)
        {
            _modbusTransferManager = modbusTransferManager;
            _slaveModuleProcess    = slaveModuleProcess;

            PrepareUsageOfModbusTransferManager();
        }
コード例 #2
0
        protected SlaveModuleScadaPanelViewModelBase(
            IModbusTransferManager modbusTransferManager,
            IMasterModuleProcess masterModuleProcess,
            ISlaveModuleProcess slaveModuleProcess)
        {
            Logger = modbusTransferManager;
            _modbusTransferManager = modbusTransferManager;
            SlaveModuleProcess     = slaveModuleProcess;
            MasterModuleProcess    = masterModuleProcess;

            PrepareUsageOfModbusTransferManager();
        }
コード例 #3
0
        public WaterPumpModuleScadaPanelViewModel(
            IModbusTransferManager modbusTransferManager,
            IMasterModuleProcess masterModuleProcess,
            ISlaveModuleProcess slaveModuleProcess)
            : base(modbusTransferManager, masterModuleProcess, slaveModuleProcess)
        {
            ReadCoilsCommand            = new RelayCommand(() => ReadCoilsRequest((ushort)RequestAddress, (ushort)ReadRequestNumOfElements));
            ReadInputsCommand           = new RelayCommand(() => ReadInputsRequest((ushort)RequestAddress, (ushort)ReadRequestNumOfElements));
            ReadHoldingRegistersCommand = new RelayCommand(() => ReadHoldingRegistersRequest((ushort)RequestAddress, (ushort)ReadRequestNumOfElements));
            ReadInputRegistersCommand   = new RelayCommand(() => ReadInputRegistersRequest((ushort)RequestAddress, (ushort)ReadRequestNumOfElements));

            WriteSingleCoilCommand     = new RelayCommand(() => WriteSingleCoilRequest((ushort)RequestAddress, WriteSingleCoilSelectedOption == 0));
            WriteSingleRegisterCommand = new RelayCommand(() => WriteSingleRegisterRequest((ushort)RequestAddress, (ushort)WriteSingleRegisterContent));
            //WriteMultipleCoilsCommand = new RelayCommand(() => WriteMultipleCoilsRequest((ushort) RequestAddress, ));
            //WriteMultipleRegistersCommand = new RelayCommand(() => WriteMultipleRegistersRequest((ushort) RequestAddress, ));
        }
コード例 #4
0
 public WaterPumpModuleDevicePanelViewModel(IModbusTransferManager modbusTransferManager,
                                            SlaveModuleProcessBase slaveModuleProcess)
     : base(modbusTransferManager, slaveModuleProcess)
 {
     InitializeHoldingRegistersCheckboxes();
 }