示例#1
0
        public new async Task WritePortSpeedAsync(Port port, CSpeed speed)
        {
            // SyncLock ServiceStackJBC01_Lock
            if (connectErrorStatus != EnumConnectError.NO_ERROR)
            {
                return;
            }

            try
            {
                await m_hostService.SetPortSpeedAsync(m_hostStnUUID, (dc_EnumConstJBCdc_Port)port, speed.ToMillimetersPerSecond(), dc_EnumConstJBCdc_SpeedUnit.MILLIMETERS_PER_SECOND);

                Info_Port[port].ToolStatus.Speed = speed;
            }
            catch (FaultException <faultError> faultEx)
            {
                RaiseEventError(faultEx, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            catch (Exception ex)
            {
                RaiseEventError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }

            // End SyncLock
        }
示例#2
0
 public async Task SetPortSpeedAsync(Port port, CSpeed speed)
 {
     await stack.WritePortSpeedAsync(port, speed);
 }