123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- using StageController.M3H;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- #if false
- namespace StageController
- {
- /// <summary>
- /// 4.3 电脑控制指定电机停机指令
- /// </summary>
- public class CommandStop : CommandBase
- {
- private Axis m_axis;
- private HandLock m_handLock;
- public CommandStop(Axis axis, HandLock handLock)
- {
- m_axis = axis;
- m_handLock = handLock;
- }
- /// <summary>
- ///
- /// </summary>
- /// <returns>@XF!</returns>
- public override string Make()
- {
- return "@" + Enum.GetName(typeof(Axis), m_axis) + Enum.GetName(typeof(HandLock), m_handLock) + "!";
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="response">@XF!</param>
- /// <returns></returns>
- public override bool Parse(string response)
- {
- bool retVal = false;
- string tmpRes = "@" + Enum.GetName(typeof(Axis), m_axis) + Enum.GetName(typeof(HandLock), m_handLock) + "!";
- if (tmpRes.CompareTo(response) == 0)
- {
- retVal = true;
- }
- return retVal;
- }
- }
- }
- #else
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace StageController
- {
- /// <summary>
- /// 4.3 电脑控制指定电机停机指令
- /// </summary>
- public class CommandStop : CommandBase
- {
- private M3HAxisType m_axis;
- private HandLock m_handLock;
- public CommandStop(M3HAxisType axis, HandLock handLock)
- {
- m_axis = axis;
- m_handLock = handLock;
- }
- /// <summary>
- ///
- /// </summary>
- /// <returns>@XF!</returns>
- public override string Make()
- {
- return "@" + Enum.GetName(typeof(M3HAxisType), m_axis) + Enum.GetName(typeof(HandLock), m_handLock) + "!";
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="response">@XF!</param>
- /// <returns></returns>
- public override bool Parse(string response)
- {
- bool retVal = false;
- string tmpRes = "@" + Enum.GetName(typeof(M3HAxisType), m_axis) + Enum.GetName(typeof(HandLock), m_handLock) + "!";
- if (tmpRes.CompareTo(response) == 0)
- {
- retVal = true;
- }
- return retVal;
- }
- }
- }
- #endif
|