Class SiemensSubProgramCallSyntax
- Namespace
- Hi.NcParsers.EvaluationSyntaxs.Siemens
- Assembly
- HiMech.dll
Consumes the Parsing.SiemensCall sub-object captured by
SiemensCallStatementSyntax and
either inlines the called subprogram or safe-skips the call:
- Resolved — the callee file (looked up through
InternalFolder with the
FilePatterns chain, default
{name}.SPF→{name}.MPF→{name}) is segmented and prepended intolayers[0]— the SubProgramCallSyntax (M98) mechanism verbatim, including theP-times repetition loop, per-repetition file indices, and a pushed CallStack frame that SiemensSubProgramReturnSyntax pops on M17/RET. Like M98 (and unlike G65), no MacroFrame is stamped — callee blocks share the caller's variable scope; DEF-local isolation is a later work item. - Unresolved — the corpus norm: OEM / measuring cycles
(
HQ_FC, RenishawL9810,L_ZYM91) whose definition files ship with the machine, not the NC program. The call is consumed whole with a block-root SiemensCall record (Skipped: true) and a single structuredSiemensCall--Skippedwarning — motion state untouched, replacing the rawUnparsedText--Remainingnoise.
Pipeline placement: head of the Siemens Evaluation bundle
(the Fanuc discipline — call/inline ahead of all variable and motion
machinery). Argument binding to PROC parameters is not implemented:
a resolved call carrying arguments emits
SiemensCall--ArgsNotBound and inlines without bindings.
public class SiemensSubProgramCallSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource
- Inheritance
-
SiemensSubProgramCallSyntax
- Implements
- Inherited Members
- Extension Methods
Constructors
SiemensSubProgramCallSyntax()
Parameterless instance with default settings.
public SiemensSubProgramCallSyntax()
SiemensSubProgramCallSyntax(XElement)
Initializes a new instance by deserializing from the given XML element.
public SiemensSubProgramCallSyntax(XElement src)
Parameters
srcXElementSource XML element.
Fields
DefaultMaxCallDepth
Default for MaxCallDepth. Sinumerik itself caps program levels far lower (16 on 840D); 32 leaves headroom for exotic post output while still catching recursion promptly.
public const int DefaultMaxCallDepth = 32
Field Value
Properties
FilePatterns
Filename-resolution fallback chain, formatted with the callee name
as the only positional arg. Default mirrors Sinumerik conventions:
.SPF subprogram, .MPF main-program-as-subprogram,
bare name. Case-insensitive match is delegated to the host
filesystem (Windows is, Linux is not).
public List<string> FilePatterns { get; set; }
Property Value
MaxCallDepth
Recursion rail: a self- or mutually-recursive callee re-captures
its own call statement inside every inlined body and would splice
forever (no iteration watchdog covers the call path). A call whose
host block already carries this many CallStack
frames is consumed as a structured safe-skip with
SiemensCall–DepthLimitExceeded instead of inlining.
public int MaxCallDepth { get; set; }
Property Value
Name
Syntax kind name (typically the concrete type name).
public string Name { get; }
Property Value
XName
XML element name used to register this syntax with XFactory.
public static string XName { get; }
Property Value
Methods
Build(LazyLinkedListNode<SyntaxPiece>, List<INcDependency>, NcDiagnosticProgress)
Build syntax arrangement into the
syntaxPieceNode in-place.
public void Build(LazyLinkedListNode<SyntaxPiece> syntaxPieceNode, List<INcDependency> ncDependencyList, NcDiagnosticProgress ncDiagnosticProgress)
Parameters
syntaxPieceNodeLazyLinkedListNode<SyntaxPiece>ncDependencyListList<INcDependency>ncDiagnosticProgressNcDiagnosticProgress
MakeXmlSource(string, string, bool)
Creates an XML representation of the object. This method may also generate additional resources such as related files.
public 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.
Reg(XFactory)
Registers this type's deserializer with the given XFactory
(or Default when factory is
null). Idempotent.
public static void Reg(XFactory factory = null)
Parameters
factoryXFactory