| | |
| | | using RJCP.IO.Ports; |
| | | using WIDESEA_ISerialPortRepository; |
| | | using WIDESEA_ISerialPortService; |
| | | using WIDESEA_SerialPortTestService; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Model.Models.SerialPort; |
| | |
| | | public SerialPortService(ISerialPortRepository BaseDal) : base(BaseDal) |
| | | { |
| | | |
| | | _serialPortTestService = new SerialPortTestService("COM3"); |
| | | //_serialPortTestService = new SerialPortTestService("COM3"); |
| | | // ä¼ é SerialPortService å° SerialPortTestService |
| | | _serialPortTestService = new SerialPortTestService("COM3", this); |
| | | } |
| | | |
| | | public WebResponseContent AddSerialPort(Dt_TorqueOp TorqueOp) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | BaseDal.Db.Insertable(TorqueOp).ExecuteCommand(); |
| | | //BaseDal.Db.Insertable(TorqueOp).ExecuteCommand(); |
| | | |
| | | BaseDal.AddData(TorqueOp); |
| | | |
| | | content = WebResponseContent.Instance.OK("æå"); |
| | | return content; |
| | | } |
| | | |
| | | //// å¯å¨ä¸²å£éä¿¡ |
| | | //public WebResponseContent StartSerialPortCom() |
| | | //{ |
| | | // WebResponseContent content = new WebResponseContent(); |
| | | |
| | | // // æå¼ä¸²å£å¹¶å¼å§åéæ°æ® |
| | | // _serialPortTestService.OpenSerialPort(); |
| | | |
| | | // return content; |
| | | //} |
| | | |
| | | // å¯å¨ä¸²å£éä¿¡ |
| | | public void StartSerialPortCom() |