Class StepDiagnostic
- Namespace
- Hi.MachiningProcs
- Assembly
- HiMech.dll
An IMessage produced while constructing a MachiningStep, anchored to the step's execution-order StepIndex and (when available) its NC-source SentenceCarrier.
Decorator over an inner Message — the five IMessage members delegate to it — so a plain SimpleMessage emitted during step processing can be upgraded to a step-anchored diagnostic without the producer needing to know the step context.
public class StepDiagnostic : IMessage, IMotionStepIndex
- Inheritance
-
StepDiagnostic
- Implements
- Inherited Members
- Extension Methods
Constructors
StepDiagnostic(int, ISentenceCarrier, IMessage)
Initializes a new instance of the StepDiagnostic class.
public StepDiagnostic(int stepIndex, ISentenceCarrier sentenceCarrier, IMessage message)
Parameters
stepIndexintExecution-order index of the step.
sentenceCarrierISentenceCarrierNC-source carrier for the step; may be null.
messageIMessageThe wrapped inner message.
Properties
Message
The wrapped message supplying severity / category / id / notification / detail.
public IMessage Message { get; }
Property Value
SentenceCarrier
NC-source carrier for the step; null when the source is not an ISentenceCarrier (e.g. the legacy hard / CSV runners, which the soft runner is expected to supersede).
public ISentenceCarrier SentenceCarrier { get; }
Property Value
StepIndex
Execution-order index of the step this diagnostic belongs to.
public int StepIndex { get; }
Property Value
Methods
GetArgs()
Gets the values interpolated into GetFormat(); null when GetFormat() is null, possibly empty for a hole-less template. Default interface method so external implementers are unaffected.
public object[] GetArgs()
Returns
- object[]
The interpolation arguments, or null when untemplated.
GetCategory()
Gets the classification — see Category.
public Category GetCategory()
Returns
- Category
The category of this message.
GetDetail()
Gets the optional detail payload or exception; null when not applicable.
public object GetDetail()
Returns
- object
The detail object, or null.
GetFormat()
Gets the composite-format template behind GetNotification() — a
{0}-style .NET format string — when this message was produced from an
interpolated template; null when the notification has no structured template.
Together with GetArgs() this lets a consumer re-render the message
in another language without losing the interpolated live values, while
GetNotification() stays the invariant English rendering.
Default interface method so external implementers are unaffected.
public string GetFormat()
Returns
- string
The composite format string, or null when untemplated.
GetId()
Gets the structured id used for filtering / suppression; may be null.
public string GetId()
Returns
- string
The message id, or null when not applicable.
GetNotification()
Gets the end-user friendly notification text.
public string GetNotification()
Returns
- string
The notification text.
GetSeverity()
Gets the importance level — see Severity.
public Severity GetSeverity()
Returns
- Severity
The severity of this message.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.