コード例 #1
0
        private string ReadFeedrateHandle(ref ushort flib, string para)
        {
            string message = null;

            var res = new ReadFeedrateResultModel();

            var ret = new FeedrateHelper().ReadFeedrate(flib, ref res);

            if (ret.Item1 == -16)
            {
                var ret_conn = ConnectHelper.BuildConnect(ref flib, m_ip, m_port, m_timeout);

                if (ret_conn == 0)
                {
                    ret = new FeedrateHelper().ReadFeedrate(flib, ref res);
                }
            }

            if (ret.Item1 != 0)
            {
                message = ret.Item2;
            }
            GetResultEvent?.Invoke(new BaseCNCResultModel <ReadFeedrateResultModel>()
            {
                Value = new List <ReadFeedrateResultModel>()
                {
                    res
                }, Id = para
            });

            return(message);
        }
コード例 #2
0
        protected override Tuple <short, string> PollRead(string item)
        {
            var ret = new FeedrateHelper().ReadFeedrate(flib, ref temp);

            if (ret.Item1 != 0)
            {
                message = ret.Item2;
            }
            return(ret);
        }