Table of Contents

Class SessionMessage

Namespace
Hi.MachiningProcs
Assembly
HiMech.dll

Represents a message in the machining process that can contain various types of data such as source commands, machining steps, exceptions, and tagged messages.

public class SessionMessage
Inheritance
SessionMessage
Inherited Members
Extension Methods

Constructors

SessionMessage(int, object)

Initializes a new instance of the SessionMessage class.

public SessionMessage(int index, object src)

Parameters

index int

The index of the message.

src object

The source data.

Properties

ClStripPos

Gets or sets the cutter location strip position. gets null if the Data is not ClStripPos.

public ClStripPos ClStripPos { get; set; }

Property Value

ClStripPos

Data

Gets or sets the data contained in the message.

public object Data { get; set; }

Property Value

object

DirectInstantSourceCommand

Gets or sets the direct source command from the data. gets null if the Data is not ISourceCommand.

public ISourceCommand DirectInstantSourceCommand { get; set; }

Property Value

ISourceCommand

Exception

Gets or sets the exception. gets null if the Data is not Exception.

public Exception Exception { get; set; }

Property Value

Exception

Index

Gets or sets the index of the message. The UI name is 'Serial.'.

[Present("Message Index", "M.I.", PhysicsUnit.None, "G")]
public int Index { get; set; }

Property Value

int

InstantSourceCommand

Gets the source command, either directly or from the associated milling step. gets null if both DirectInstantSourceCommand and the SourceCommand from ClStripPos's State are null.

public ISourceCommand InstantSourceCommand { get; }

Property Value

ISourceCommand

MachiningStep

Gets the milling step from the cutter location strip position. gets null if ClStripPos is null or its State is not a MachiningStep.

public MachiningStep MachiningStep { get; }

Property Value

MachiningStep

Message

Gets the message text from either the multi-tag message or exception. gets null if both MultiTagMessage and Exception are null, or if MultiTagMessage.Message is null.

[Present("Message", "Msg", PhysicsUnit.None, "G")]
public string Message { get; }

Property Value

string

MessageOrNcText

Gets the message text or NC code text. gets null if all sources (InstantSourceCommand, MultiTagMessage, Exception, and Data) are null or cannot provide text.

[Present("Message/NC", "Msg/NC", PhysicsUnit.None, "G")]
public string MessageOrNcText { get; }

Property Value

string

MessageRoleText

Gets the message type text for UI display.

[Present("Role", "Role", PhysicsUnit.None, "G")]
public string MessageRoleText { get; }

Property Value

string

MultiTagMessage

Gets or sets the multi-tag message. gets null if the Data is not MultiTagMessage.

public MultiTagMessage MultiTagMessage { get; set; }

Property Value

MultiTagMessage

Tags

Gets the tags associated with the message.

public HashSet<string> Tags { get; }

Property Value

HashSet<string>

Remarks

Different from MultiTagMessage.Tags, the Tags here includes the infomation of the Data.

Methods

ToString()

Returns a string representation of the message data.

public override string ToString()

Returns

string

A string representation of the message data.