Example #1
0
 public void ResetProcess(string portName)
 {
     if ((this.serialPort != null) && ((this.serialPort.PortName == portName) && !this.processor.IsNew))
     {
         this.processor = new ModbusOperationProcessor(this.serialPort, this);
         this.processor.StartProcess();
     }
 }
Example #2
0
        public StationDataModel(string stationName, SerialPort serialPort, byte slaveID)
        {
            this.stationName = stationName;
            this.serialPort  = serialPort;
            this.slaveID     = slaveID;
            this.processor   = new ModbusOperationProcessor(this.serialPort, this);

            this.realTimeData = new DeviceRealTimeData();

            this.operationStatus = (serialPort == null) ? new OperationStatusData() : new OperationStatusData(stationName, serialPort.PortName);
        }