Class NcStepMonitor
Monitors NC steps and provides functionality for step tracking and control.
public class NcStepMonitor : IMakeXmlSource
- Inheritance
-
NcStepMonitor
- Implements
- Inherited Members
- Extension Methods
Constructors
NcStepMonitor()
Initializes a new instance of the NcStepMonitor class.
public NcStepMonitor()
NcStepMonitor(XElement, string, IColorGuide)
Initializes a new instance of the NcStepMonitor class from XML.
public NcStepMonitor(XElement src, string baseDirectory, IColorGuide colorGuide)
Parameters
src
XElementThe XML source element.
baseDirectory
stringThe base directory for resolving relative paths.
colorGuide
IColorGuideThe color guide instance.
Fields
XName
Gets the XML element name for serialization.
public static string XName
Field Value
Properties
EnableReAsignWorkTimeFromBeginingTime
If true, set WorkTime by controller; Otherwise, set WorkTime from the first run of Hi.Numerical.INcStepMonitee.AquireNcStep to the current run.
public bool EnableReAsignWorkTimeFromBeginingTime { get; set; }
Property Value
IgnoreRepeatedStep
Gets or sets a value indicating whether repeated steps should be ignored.
public bool IgnoreRepeatedStep { get; set; }
Property Value
IsRunning
Gets a value indicating whether the monitoring task is currently running.
public bool IsRunning { get; }
Property Value
IsSaveNcStepProviderOnXElement
Gets or sets a value indicating whether the NcStepMonitee should be saved in XML.
public bool IsSaveNcStepProviderOnXElement { get; set; }
Property Value
NcStepMonitee
Gets or sets the NC step monitee instance.
public INcStepMonitee NcStepMonitee { get; set; }
Property Value
Period
Gets or sets the monitoring period.
public TimeSpan Period { get; set; }
Property Value
Methods
MakeXmlSource(string, string)
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)
Parameters
baseDirectory
stringThe base directory for resolving relative paths
relFile
stringThe relative file path for the XML source
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.
Reset()
Resets the monitor.
public void Reset()
Start()
Starts the monitoring task.
public void Start()
Stop()
Stops the monitoring task.
public void Stop()
Events
BeginOnRunningTaskEventHandler
Event raised when the monitoring task begins running.
public event EventHandler BeginOnRunningTaskEventHandler
Event Type
EndOnRunningTaskEventHandler
Event raised when the monitoring task ends running.
public event EventHandler EndOnRunningTaskEventHandler
Event Type
ExceptionEventHandler
Event raised when an exception occurs during monitoring.
public event EventHandler<Exception> ExceptionEventHandler
Event Type
ResetedEventHandler
Event raised when the monitor is reset.
public event EventHandler ResetedEventHandler
Event Type
StepAccptedEventHandler
Event raised when a step is accepted by the monitor.
public event EventHandler<INcStep0> StepAccptedEventHandler