Class ControllerParameterTableBase
- Namespace
- Hi.NcParsers.Dependencys
- Assembly
- HiMech.dll
Base class for brand-specific controller parameter tables. Provides shared data structures, XML IO, and IHomeMcConfig
- IMachineAxisConfig implementations. Subclasses define brand-specific parameter numbers, XML attribute names, and derived convenience properties.
public abstract class ControllerParameterTableBase : IHomeMcConfig, IMachineAxisConfig, INcDependency, IMakeXmlSource
- Inheritance
-
ControllerParameterTableBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Properties
AxisNames
Gets the configured axis names in order.
public IEnumerable<string> AxisNames { get; }
Property Value
AxisParams
Per-axis float parameters. Outer key = parameter number, inner key = axis name.
public Dictionary<int, Dictionary<string, double>> AxisParams { get; set; }
Property Value
AxisTypeParamId
Parameter/MD/MP number for axis type (linear/rotary/spindle).
protected abstract int AxisTypeParamId { get; }
Property Value
IdAttributeName
XML attribute name for the parameter ID (“ParamId”, “MdId”, “MpId”).
protected abstract string IdAttributeName { get; }
Property Value
IntAxisParams
Per-axis integer parameters. Outer key = parameter number, inner key = axis name.
public Dictionary<int, Dictionary<string, int>> IntAxisParams { get; set; }
Property Value
- Dictionary<int, Dictionary<string, int>>
ReferencePositionParamId
Parameter/MD/MP number for reference position (G28 home).
protected abstract int ReferencePositionParamId { get; }
Property Value
SystemParams
System-wide parameters. Key = parameter number.
public Dictionary<int, double> SystemParams { get; set; }
Property Value
Methods
AxisParam(int)
public Dictionary<string, double> AxisParam(int paramId)
Parameters
paramIdint
Returns
GetHomePosition(string)
Gets the home position for a specific axis. Returns null if the axis has no home position configured.
public double? GetHomePosition(string axisName)
Parameters
axisNamestring
Returns
IntAxisParam(int)
public Dictionary<string, int> IntAxisParam(int paramId)
Parameters
paramIdint
Returns
IsRotaryAxis(string)
Returns true if the axis is rotary or spindle, false if linear.
public bool IsRotaryAxis(string axisName)
Parameters
axisNamestring
Returns
MakeXmlSource(string, string, bool)
Creates an XML representation of the object. This method may also generate additional resources such as related files.
public abstract XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)
Parameters
baseDirectorystringThe base directory for resolving relative paths
relFilestringThe relative file path for the XML source
exhibitionOnlyboolif true, the extended file creation is suppressed.
Returns
- XElement
An XML element representing the object's state
Remarks
For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The baseDirectory is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.
ReadXml(XElement)
protected void ReadXml(XElement src)
Parameters
srcXElement
RemoveAxis(string)
Removes an axis from the configuration.
public void RemoveAxis(string axisName)
Parameters
axisNamestring
SetAxis(string, AxisType)
Adds or updates an axis with the specified type.
public void SetAxis(string axisName, AxisType type)
Parameters
SetHomePosition(string, double)
Sets the home position for a specific axis.
public void SetHomePosition(string axisName, double value)
Parameters
WriteXml(string)
protected XElement WriteXml(string xName)
Parameters
xNamestring