private void ParseAxisResponse(string line)
{
string key = line.Length >= 6 ? line.Substring(0, 6) : string.Empty;
switch (key)
{
#region axis mode
case "[xam] ": ParseAM(ref line, "[xam] x", 0); break;
case "[yam] ": ParseAM(ref line, "[yam] y", 1); break;
case "[zam] ": ParseAM(ref line, "[zam] z", 2); break;
case "[aam] ": ParseAM(ref line, "[aam] a", 3); break;
case "[bam] ": ParseAM(ref line, "[bam] b", 4); break;
case "[cam] ": ParseAM(ref line, "[cam] c", 5); break;
#endregion
#region velocity maximum
case "[xvm] ": ParseVM(ref line, "[xvm] x", 0); break;
case "[yvm] ": ParseVM(ref line, "[yvm] y", 1); break;
case "[zvm] ": ParseVM(ref line, "[zvm] z", 2); break;
case "[avm] ": ParseVM(ref line, "[avm] a", 3); break;
case "[bvm] ": ParseVM(ref line, "[bvm] b", 4); break;
case "[cvm] ": ParseVM(ref line, "[cvm] c", 5); break;
#endregion
#region feedrate maximum
case "[xfr] ": ParseFR(ref line, "[xfr] x", 0); break;
case "[yfr] ": ParseFR(ref line, "[yfr] y", 1); break;
case "[zfr] ": ParseFR(ref line, "[zfr] z", 2); break;
case "[afr] ": ParseFR(ref line, "[afr] a", 3); break;
case "[bfr] ": ParseFR(ref line, "[bfr] b", 4); break;
case "[cfr] ": ParseFR(ref line, "[cfr] c", 5); break;
#endregion
#region jerk homing
case "[xjh] ": ParseJH(ref line, "[xjh] x", 0); break;
case "[yjh] ": ParseJH(ref line, "[yjh] y", 1); break;
case "[zjh] ": ParseJH(ref line, "[zjh] z", 2); break;
case "[ajh] ": ParseJH(ref line, "[ajh] a", 3); break;
case "[bjh] ": ParseJH(ref line, "[bjh] b", 4); break;
case "[cjh] ": ParseJH(ref line, "[cjh] c", 5); break;
#endregion
#region junction deviation
case "[xjd] ": ParseJD(ref line, "[xjd] x", 0); break;
case "[yjd] ": ParseJD(ref line, "[yjd] y", 1); break;
case "[zjd] ": ParseJD(ref line, "[zjd] z", 2); break;
case "[ajd] ": ParseJD(ref line, "[ajd] a", 3); break;
case "[bjd] ": ParseJD(ref line, "[bjd] b", 4); break;
case "[cjd] ": ParseJD(ref line, "[cjd] c", 5); break;
#endregion
#region switch min
case "[xsn] ": ParseSN(ref line, "[xsn] x", 0); break;
case "[ysn] ": ParseSN(ref line, "[ysn] y", 1); break;
case "[zsn] ": ParseSN(ref line, "[zsn] z", 2); break;
case "[asn] ": ParseSN(ref line, "[asn] a", 3); break;
case "[bsn] ": ParseSN(ref line, "[bsn] b", 4); break;
case "[csn] ": ParseSN(ref line, "[csn] c", 5); break;
#endregion
#region switch max
case "[xsx] ": ParseSX(ref line, "[xsx] x", 0); break;
case "[ysx] ": ParseSX(ref line, "[ysx] y", 1); break;
case "[zsx] ": ParseSX(ref line, "[zsx] z", 2); break;
case "[asx] ": ParseSX(ref line, "[asx] a", 3); break;
case "[bsx] ": ParseSX(ref line, "[bsx] b", 4); break;
case "[csx] ": ParseSX(ref line, "[csx] c", 5); break;
#endregion
#region search velocity
case "[xsv] ": ParseSV(ref line, "[xsv] x", 0); break;
case "[ysv] ": ParseSV(ref line, "[ysv] y", 0); break;
case "[zsv] ": ParseSV(ref line, "[zsv] z", 2); break;
case "[asv] ": ParseSV(ref line, "[asv] a", 3); break;
case "[bsv] ": ParseSV(ref line, "[bsv] b", 4); break;
case "[csv] ": ParseSV(ref line, "[csv] c", 5); break;
#endregion
#region latch velocity
case "[xlv] ": ParseLV(ref line, "[xlv] x", 0); break;
case "[ylv] ": ParseLV(ref line, "[ylv] y", 1); break;
case "[zlv] ": ParseLV(ref line, "[zlv] z", 2); break;
case "[alv] ": ParseLV(ref line, "[alv] a", 3); break;
case "[blv] ": ParseLV(ref line, "[blv] b", 4); break;
case "[clv] ": ParseLV(ref line, "[clv] c", 5); break;
#endregion
#region latch backoff
case "[xlb] ": ParseLB(ref line, "[xlb] x", 0); break;
case "[ylb] ": ParseLB(ref line, "[ylb] y", 1); break;
case "[zlb] ": ParseLB(ref line, "[zlb] z", 2); break;
case "[alb] ": ParseLB(ref line, "[alb] a", 3); break;
case "[blb] ": ParseLB(ref line, "[blb] b", 4); break;
case "[clb] ": ParseLB(ref line, "[clb] c", 5); break;
#endregion
#region zero backoff
case "[xzb] ": ParseZB(ref line, "[xzb] x", 0); break;
case "[yzb] ": ParseZB(ref line, "[yzb] y", 1); break;
case "[zzb] ": ParseZB(ref line, "[zzb] z", 2); break;
case "[azb] ": ParseZB(ref line, "[azb] a", 3); break;
case "[bzb] ": ParseZB(ref line, "[bzb] b", 4); break;
case "[czb] ": ParseZB(ref line, "[czb] c", 5); break;
#endregion
#region travel maximum
case "[xtm] ": ParseTM(ref line, "[xtm] x", 0); break;
case "[ytm] ": ParseTM(ref line, "[ytm] y", 1); break;
case "[ztm] ": ParseTM(ref line, "[ztm] z", 2); break;
case "[atm] ": ParseTM(ref line, "[atm] a", 3); break;
case "[btm] ": ParseTM(ref line, "[btm] b", 4); break;
case "[ctm] ": ParseTM(ref line, "[ctm] c", 5); break;
#endregion
#region jerk maximum
case "[xjm] ": ParseJM(ref line, "[xjm] x", 0); break;
case "[yjm] ": ParseJM(ref line, "[yjm] y", 1); break;
case "[zjm] ": ParseJM(ref line, "[zjm] z", 2); break;
case "[ajm] ": ParseJM(ref line, "[ajm] a", 3); break;
case "[bjm] ": ParseJM(ref line, "[bjm] b", 4); break;
case "[cjm] ": ParseJM(ref line, "[cjm] c", 5); break;
#endregion
#region radius value
case "[ara] ": ParseRA(ref line, "[ara] a", 3); break;
case "[bra] ": ParseRA(ref line, "[bra] b", 4); break;
case "[cra] ": ParseRA(ref line, "[cra] c", 5); break;
#endregion
default:
LogAppend("Unknown:" + line, Color.OrangeRed);
break;
}
}