C# Класс KFlopWebNC.Model.DeviceInteropHandler

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CheckAllEnabled ( ) : void
CheckEnabledA ( ) : void

Query command to determine whether the A axis is enabled

CheckEnabledB ( ) : void

Query command to determine whether the B axis is enabled

CheckEnabledC ( ) : void

Query command to determine whether the C axis is enabled

CheckEnabledX ( ) : void

Query command to determine whether the X axis is enabled

CheckEnabledY ( ) : void

Query command to determine whether the Y axis is enabled

CheckEnabledZ ( ) : void

Query command to determine whether the Z axis is enabled

CreateA ( int channel, double movespeed, double jogspeed ) : void
CreateB ( int channel, double movespeed, double jogspeed ) : void
CreateC ( int channel, double movespeed, double jogspeed ) : void
CreateX ( int channel, double movespeed, double jogspeed ) : void
CreateY ( int channel, double movespeed, double jogspeed ) : void
CreateZ ( int channel, double movespeed, double jogspeed ) : void
CyclePause ( ) : void

Command dispatcher for pausing/unpausing the interpreter

CycleStart ( ) : void

Command dispatcher for interpreting a gcode file

DeviceInteropHandler ( ZoomBrowser browser ) : System
ExecuteMDI ( ) : void

Command dispatcher to execute a single RS274 command

GetCommandOptions ( ) : string

Helper method to generate MCode Actions for an HTML select element

GetEditorForCommand ( CommandData command, bool showindex, bool editname ) : string

Generates the specific editor for a Mcode Action command based on its type

InitAxis ( ) : void

This method will create/update individual axis objects based on the Interpreter axis settings

InitInterpreterData ( ) : void

This will update the Interpreter TP params, axis, offset, tools and MCode Actions from the data file

JogANegative ( ) : void

Command dispatcher to jog the A axis in negative direction

JogAPositive ( ) : void

Command dispatcher to jog the A axis in positive direction

JogBNegative ( ) : void

Command dispatcher to jog the B axis in negative direction

JogBPositive ( ) : void

Command dispatcher to jog the B axis in positive direction

JogCNegative ( ) : void

Command dispatcher to jog the C axis in negative direction

JogCPositive ( ) : void

Command dispatcher to jog the C axis in positive direction

JogXNegative ( ) : void

Command dispatcher to jog the X axis in negative direction

JogXPositive ( ) : void

Command dispatcher to jog the X axis in positive direction

JogYNegative ( ) : void

Command dispatcher to jog the Y axis in negative direction

JogYPositive ( ) : void

Command dispatcher to jog the Y axis in positive direction

JogZNegative ( ) : void

Command dispatcher to jog the Z axis in negative direction

JogZPositive ( ) : void

Command dispatcher to jog the Z axis in positive direction

LoadCommandEditor ( int start, int count ) : void

Transfers command data from the data file to the HTML within the supplied range of elements

LoadGcodeFile ( ) : void

Command dispatcher to open a file dialog and select the gcode file

LoadInterpreterAxisEditor ( ) : void

Updates the axis editor HTML from the data file

LoadInterpreterTPEditor ( ) : void

Updates the trajectory planner editor HTML from the data file

LoadOffsetEditor ( int start, int count ) : void

Transfers offset data from the data file to the HTML within the supplied range of elements

LoadToolEditor ( int start, int count ) : void

Transfers tool data from the data file to the HTML within the supplied range of elements

MoveA ( double position ) : void

Moves the A axis to a commanded position

MoveB ( double position ) : void

Moves the B axis to a commanded position

MoveC ( double position ) : void

Moves the C axis to a commanded position

MoveX ( double position ) : void

Moves the X axis to a commanded position

MoveY ( double position ) : void

Moves the Y axis to a commanded position

MoveZ ( double position ) : void

Moves the Z axis to a commanded position

NavigateToPage ( string pagename ) : void
RefreshInterpreterState ( ) : void

Forces an update of the interpreter display settings

ResetGcodeDisplay ( ) : void

Discovers the maximum display lines and loads the Gcode file into the display buffer

RewindProgram ( ) : void

Command dispatcher 'rewind' the interpreter file

RunFromLine ( ) : void

Command dispatcher to execute the gcode from a specific line

RunUserCommand ( int command ) : void

Command dispatcher to invoke a command via the interpreter buffer

SaveCommandEditor ( int start, int count ) : void

Updates the data file commands from the HTML document within the supplied range

SaveInterpreterAxisEditor ( ) : void

Updates the data file axis settings from the HTML document

SaveInterpreterData ( ) : void

Persists Interpreter data to the file

SaveInterpreterTPEditor ( ) : void

Updates the data file trajectory planner from the HTML document

SaveOffsetEditor ( int start, int count ) : void

Updates the data file offsets from the HTML document within the supplied range

SaveToolEditor ( int start, int count ) : void

Updates the data file tools from the HTML document within the supplied range

SetAxis ( string axisname, int channel, double movespeed, double jogspeed ) : void
SetCommandFileName ( int commandindex ) : void

Opens a file dialog and inserts the selection into the command's filename property

SetFeedRate ( double percent ) : void

Command dispatcher to set the Interpreter's feed rate override

SetJogPercentA ( double percent ) : void

Command dispatcher to update the A axis feedrate percentage

SetJogPercentB ( double percent ) : void

Command dispatcher to update the B axis feedrate percentage

SetJogPercentC ( double percent ) : void

Command dispatcher to update the C axis feedrate percentage

SetJogPercentX ( double percent ) : void

Command dispatcher to update the X axis feedrate percentage

SetJogPercentY ( double percent ) : void

Command dispatcher to update the Y axis feedrate percentage

SetJogPercentZ ( double percent ) : void

Command dispatcher to update the Z axis feedrate percentage

StartMonitor ( ) : void

Starts the monitor thread

StopA ( ) : void

Command dispatcher to stop A axis motion

StopB ( ) : void

Command dispatcher to stop B axis motion

StopC ( ) : void

Command dispatcher to stop C axis motion

StopInterpreter ( ) : void

Command dispatcher for halting the interpreter

StopMonitor ( ) : void

Stops the monitor thread

StopX ( ) : void

Command dispatcher to stop X axis motion

StopY ( ) : void

Command dispatcher to stop Y axis motion

StopZ ( ) : void

Command dispatcher to stop Z axis motion

ToggleBlockDelete ( ) : void

Command dispatcher to toggle whether the interpreter will skip escaped blocks

ToggleEnableA ( ) : void

Command dispatcher to enable/disable A

ToggleEnableB ( ) : void

Command dispatcher to enable/disable B

ToggleEnableC ( ) : void

Command dispatcher to enable/disable C

ToggleEnableX ( ) : void

Command dispatcher to enable/disable X

ToggleEnableY ( ) : void

Command dispatcher to enable/disable Y

ToggleEnableZ ( ) : void

Command dispatcher to enable/disable Z

ToggleSimulate ( ) : void

Command dispatcher to toggle whether the interpreter should simulate the file

UpdateAxisData ( ) : void

Updates the axis positions

UpdateBoadVersion ( ) : void

Updates the HTML element designated to display the kflop version

UpdateCommandButtonText ( int start, int count ) : void

Updates the button text for user commands within the supplied range of elements

UpdateConnectionStatus ( ) : void

Updates the HTML element designated to display the connection status

UpdateDocument ( Action action ) : void
UpdateFeedRate ( ) : void

Forces an update to the element designated

UpdateGcodeDisplay ( ) : void

Updates the designated gcode display dv with the current gcode being executed

UpdateJogRates ( ) : void

Forces the text of designated elements to display the jog override percentage for each axis

UpdateSecondaryControls ( ) : void

Updates the secondary controls that do not need to be updated as frequently

ZeroA ( ) : void

Command dispatcher to reset the A axis dest to 0.0

ZeroB ( ) : void

Command dispatcher to reset the B axis dest to 0.0

ZeroC ( ) : void

Command dispatcher to reset the C axis dest to 0.0

ZeroX ( ) : void

Command dispatcher to reset the X axis dest to 0.0

ZeroY ( ) : void

Command dispatcher to reset the Y axis dest to 0.0

ZeroZ ( ) : void

Command dispatcher to reset the Z axis dest to 0.0

_StatusMonitor_DoWork ( object sender, DoWorkEventArgs e ) : void

Updates the status objects from the board

Приватные методы

Метод Описание
InitDevice ( ) : void
Interpreter_InterpreterCompleted ( int status, int lineno, int sequence_number, string err ) : void
Interpreter_InterpreterStatusUpdated ( int lineno, string msg ) : void
Interpreter_InterpreterUserCallbackRequested ( string msg ) : void
Interpreter_InterpreterUserMCodeCallbackRequested ( int code ) : int
Interpreter_Interpreter_CoordMotionArcFeed ( bool ZeroLenAsFullCircles, double DesiredFeedRate_in_per_sec, int plane, double first_end, double second_end, double first_axis, double second_axis, int rotation, double axis_end_point, double first_start, double second_start, double axis_start_point, int sequence_number, int ID ) : void
Interpreter_Interpreter_CoordMotionStraightFeed ( double DesiredFeedRate_in_per_sec, double x, double y, double z, int sequence_number, int ID ) : void
Interpreter_Interpreter_CoordMotionStraightTraverse ( double x, double y, double z, int sequence_number ) : void
LoadUI ( ) : void
ValidateFolders ( ) : void
_Controller_ErrorReceived ( string message ) : void
_Controller_MessageUpdated ( string message ) : int
_GuiHost_DocumentCompleted ( object sender, WebBrowserDocumentCompletedEventArgs e ) : void
_GuiHost_DocumentTitleChanged ( object sender, EventArgs e ) : void
_GuiHost_Navigated ( object sender, WebBrowserNavigatedEventArgs e ) : void
_GuiHost_Navigating ( object sender, WebBrowserNavigatingEventArgs e ) : void

Описание методов

CheckAllEnabled() публичный Метод

public CheckAllEnabled ( ) : void
Результат void

CheckEnabledA() публичный Метод

Query command to determine whether the A axis is enabled
public CheckEnabledA ( ) : void
Результат void

CheckEnabledB() публичный Метод

Query command to determine whether the B axis is enabled
public CheckEnabledB ( ) : void
Результат void

CheckEnabledC() публичный Метод

Query command to determine whether the C axis is enabled
public CheckEnabledC ( ) : void
Результат void

CheckEnabledX() публичный Метод

Query command to determine whether the X axis is enabled
public CheckEnabledX ( ) : void
Результат void

CheckEnabledY() публичный Метод

Query command to determine whether the Y axis is enabled
public CheckEnabledY ( ) : void
Результат void

CheckEnabledZ() публичный Метод

Query command to determine whether the Z axis is enabled
public CheckEnabledZ ( ) : void
Результат void

CreateA() публичный Метод

public CreateA ( int channel, double movespeed, double jogspeed ) : void
channel int
movespeed double
jogspeed double
Результат void

CreateB() публичный Метод

public CreateB ( int channel, double movespeed, double jogspeed ) : void
channel int
movespeed double
jogspeed double
Результат void

CreateC() публичный Метод

public CreateC ( int channel, double movespeed, double jogspeed ) : void
channel int
movespeed double
jogspeed double
Результат void

CreateX() публичный Метод

public CreateX ( int channel, double movespeed, double jogspeed ) : void
channel int
movespeed double
jogspeed double
Результат void

CreateY() публичный Метод

public CreateY ( int channel, double movespeed, double jogspeed ) : void
channel int
movespeed double
jogspeed double
Результат void

CreateZ() публичный Метод

public CreateZ ( int channel, double movespeed, double jogspeed ) : void
channel int
movespeed double
jogspeed double
Результат void

CyclePause() публичный Метод

Command dispatcher for pausing/unpausing the interpreter
public CyclePause ( ) : void
Результат void

CycleStart() публичный Метод

Command dispatcher for interpreting a gcode file
public CycleStart ( ) : void
Результат void

DeviceInteropHandler() публичный Метод

public DeviceInteropHandler ( ZoomBrowser browser ) : System
browser ZoomBrowser
Результат System

ExecuteMDI() публичный Метод

Command dispatcher to execute a single RS274 command
public ExecuteMDI ( ) : void
Результат void

GetCommandOptions() публичный Метод

Helper method to generate MCode Actions for an HTML select element
public GetCommandOptions ( ) : string
Результат string

GetEditorForCommand() публичный Метод

Generates the specific editor for a Mcode Action command based on its type
public GetEditorForCommand ( CommandData command, bool showindex, bool editname ) : string
command CommandData command source to generate editor for
showindex bool flag to determine whether or not to create a p element displaying the command index
editname bool flag to determine whether the command name text is editable or not
Результат string

InitAxis() публичный Метод

This method will create/update individual axis objects based on the Interpreter axis settings
public InitAxis ( ) : void
Результат void

InitInterpreterData() публичный Метод

This will update the Interpreter TP params, axis, offset, tools and MCode Actions from the data file
public InitInterpreterData ( ) : void
Результат void

JogANegative() публичный Метод

Command dispatcher to jog the A axis in negative direction
public JogANegative ( ) : void
Результат void

JogAPositive() публичный Метод

Command dispatcher to jog the A axis in positive direction
public JogAPositive ( ) : void
Результат void

JogBNegative() публичный Метод

Command dispatcher to jog the B axis in negative direction
public JogBNegative ( ) : void
Результат void

JogBPositive() публичный Метод

Command dispatcher to jog the B axis in positive direction
public JogBPositive ( ) : void
Результат void

JogCNegative() публичный Метод

Command dispatcher to jog the C axis in negative direction
public JogCNegative ( ) : void
Результат void

JogCPositive() публичный Метод

Command dispatcher to jog the C axis in positive direction
public JogCPositive ( ) : void
Результат void

JogXNegative() публичный Метод

Command dispatcher to jog the X axis in negative direction
public JogXNegative ( ) : void
Результат void

JogXPositive() публичный Метод

Command dispatcher to jog the X axis in positive direction
public JogXPositive ( ) : void
Результат void

JogYNegative() публичный Метод

Command dispatcher to jog the Y axis in negative direction
public JogYNegative ( ) : void
Результат void

JogYPositive() публичный Метод

Command dispatcher to jog the Y axis in positive direction
public JogYPositive ( ) : void
Результат void

JogZNegative() публичный Метод

Command dispatcher to jog the Z axis in negative direction
public JogZNegative ( ) : void
Результат void

JogZPositive() публичный Метод

Command dispatcher to jog the Z axis in positive direction
public JogZPositive ( ) : void
Результат void

LoadCommandEditor() публичный Метод

Transfers command data from the data file to the HTML within the supplied range of elements
public LoadCommandEditor ( int start, int count ) : void
start int beginning command to load
count int last command to update
Результат void

LoadGcodeFile() публичный Метод

Command dispatcher to open a file dialog and select the gcode file
public LoadGcodeFile ( ) : void
Результат void

LoadInterpreterAxisEditor() публичный Метод

Updates the axis editor HTML from the data file
public LoadInterpreterAxisEditor ( ) : void
Результат void

LoadInterpreterTPEditor() публичный Метод

Updates the trajectory planner editor HTML from the data file
public LoadInterpreterTPEditor ( ) : void
Результат void

LoadOffsetEditor() публичный Метод

Transfers offset data from the data file to the HTML within the supplied range of elements
public LoadOffsetEditor ( int start, int count ) : void
start int beginning offset to load
count int last offset to load
Результат void

LoadToolEditor() публичный Метод

Transfers tool data from the data file to the HTML within the supplied range of elements
public LoadToolEditor ( int start, int count ) : void
start int beginning tool to load
count int last tool to load
Результат void

MoveA() публичный Метод

Moves the A axis to a commanded position
public MoveA ( double position ) : void
position double new position to move axis to
Результат void

MoveB() публичный Метод

Moves the B axis to a commanded position
public MoveB ( double position ) : void
position double new position to move axis to
Результат void

MoveC() публичный Метод

Moves the C axis to a commanded position
public MoveC ( double position ) : void
position double new position to move axis to
Результат void

MoveX() публичный Метод

Moves the X axis to a commanded position
public MoveX ( double position ) : void
position double new position to move axis to
Результат void

MoveY() публичный Метод

Moves the Y axis to a commanded position
public MoveY ( double position ) : void
position double new position to move axis to
Результат void

MoveZ() публичный Метод

Moves the Z axis to a commanded position
public MoveZ ( double position ) : void
position double new position to move axis to
Результат void

NavigateToPage() публичный Метод

public NavigateToPage ( string pagename ) : void
pagename string
Результат void

RefreshInterpreterState() публичный Метод

Forces an update of the interpreter display settings
public RefreshInterpreterState ( ) : void
Результат void

ResetGcodeDisplay() публичный Метод

Discovers the maximum display lines and loads the Gcode file into the display buffer
public ResetGcodeDisplay ( ) : void
Результат void

RewindProgram() публичный Метод

Command dispatcher 'rewind' the interpreter file
public RewindProgram ( ) : void
Результат void

RunFromLine() публичный Метод

Command dispatcher to execute the gcode from a specific line
public RunFromLine ( ) : void
Результат void

RunUserCommand() публичный Метод

Command dispatcher to invoke a command via the interpreter buffer
public RunUserCommand ( int command ) : void
command int command to to run contained in the Mcode Action list
Результат void

SaveCommandEditor() публичный Метод

Updates the data file commands from the HTML document within the supplied range
public SaveCommandEditor ( int start, int count ) : void
start int beginning command to save
count int last command to update
Результат void

SaveInterpreterAxisEditor() публичный Метод

Updates the data file axis settings from the HTML document
public SaveInterpreterAxisEditor ( ) : void
Результат void

SaveInterpreterData() публичный Метод

Persists Interpreter data to the file
public SaveInterpreterData ( ) : void
Результат void

SaveInterpreterTPEditor() публичный Метод

Updates the data file trajectory planner from the HTML document
public SaveInterpreterTPEditor ( ) : void
Результат void

SaveOffsetEditor() публичный Метод

Updates the data file offsets from the HTML document within the supplied range
public SaveOffsetEditor ( int start, int count ) : void
start int beginning offset to save
count int last offset to update
Результат void

SaveToolEditor() публичный Метод

Updates the data file tools from the HTML document within the supplied range
public SaveToolEditor ( int start, int count ) : void
start int beginning tool to save
count int last tool to update
Результат void

SetAxis() публичный Метод

public SetAxis ( string axisname, int channel, double movespeed, double jogspeed ) : void
axisname string
channel int
movespeed double
jogspeed double
Результат void

SetCommandFileName() публичный Метод

Opens a file dialog and inserts the selection into the command's filename property
public SetCommandFileName ( int commandindex ) : void
commandindex int command to set file name for
Результат void

SetFeedRate() публичный Метод

Command dispatcher to set the Interpreter's feed rate override
public SetFeedRate ( double percent ) : void
percent double
Результат void

SetJogPercentA() публичный Метод

Command dispatcher to update the A axis feedrate percentage
public SetJogPercentA ( double percent ) : void
percent double percentage to derive jog speed
Результат void

SetJogPercentB() публичный Метод

Command dispatcher to update the B axis feedrate percentage
public SetJogPercentB ( double percent ) : void
percent double percentage to derive jog speed
Результат void

SetJogPercentC() публичный Метод

Command dispatcher to update the C axis feedrate percentage
public SetJogPercentC ( double percent ) : void
percent double percentage to derive jog speed
Результат void

SetJogPercentX() публичный Метод

Command dispatcher to update the X axis feedrate percentage
public SetJogPercentX ( double percent ) : void
percent double percentage to derive jog speed
Результат void

SetJogPercentY() публичный Метод

Command dispatcher to update the Y axis feedrate percentage
public SetJogPercentY ( double percent ) : void
percent double percentage to derive jog speed
Результат void

SetJogPercentZ() публичный Метод

Command dispatcher to update the Z axis feedrate percentage
public SetJogPercentZ ( double percent ) : void
percent double percentage to derive jog speed
Результат void

StartMonitor() публичный Метод

Starts the monitor thread
public StartMonitor ( ) : void
Результат void

StopA() публичный Метод

Command dispatcher to stop A axis motion
public StopA ( ) : void
Результат void

StopB() публичный Метод

Command dispatcher to stop B axis motion
public StopB ( ) : void
Результат void

StopC() публичный Метод

Command dispatcher to stop C axis motion
public StopC ( ) : void
Результат void

StopInterpreter() публичный Метод

Command dispatcher for halting the interpreter
public StopInterpreter ( ) : void
Результат void

StopMonitor() публичный Метод

Stops the monitor thread
public StopMonitor ( ) : void
Результат void

StopX() публичный Метод

Command dispatcher to stop X axis motion
public StopX ( ) : void
Результат void

StopY() публичный Метод

Command dispatcher to stop Y axis motion
public StopY ( ) : void
Результат void

StopZ() публичный Метод

Command dispatcher to stop Z axis motion
public StopZ ( ) : void
Результат void

ToggleBlockDelete() публичный Метод

Command dispatcher to toggle whether the interpreter will skip escaped blocks
public ToggleBlockDelete ( ) : void
Результат void

ToggleEnableA() публичный Метод

Command dispatcher to enable/disable A
public ToggleEnableA ( ) : void
Результат void

ToggleEnableB() публичный Метод

Command dispatcher to enable/disable B
public ToggleEnableB ( ) : void
Результат void

ToggleEnableC() публичный Метод

Command dispatcher to enable/disable C
public ToggleEnableC ( ) : void
Результат void

ToggleEnableX() публичный Метод

Command dispatcher to enable/disable X
public ToggleEnableX ( ) : void
Результат void

ToggleEnableY() публичный Метод

Command dispatcher to enable/disable Y
public ToggleEnableY ( ) : void
Результат void

ToggleEnableZ() публичный Метод

Command dispatcher to enable/disable Z
public ToggleEnableZ ( ) : void
Результат void

ToggleSimulate() публичный Метод

Command dispatcher to toggle whether the interpreter should simulate the file
public ToggleSimulate ( ) : void
Результат void

UpdateAxisData() публичный Метод

Updates the axis positions
public UpdateAxisData ( ) : void
Результат void

UpdateBoadVersion() публичный Метод

Updates the HTML element designated to display the kflop version
public UpdateBoadVersion ( ) : void
Результат void

UpdateCommandButtonText() публичный Метод

Updates the button text for user commands within the supplied range of elements
public UpdateCommandButtonText ( int start, int count ) : void
start int beginning button to update
count int last button to update
Результат void

UpdateConnectionStatus() публичный Метод

Updates the HTML element designated to display the connection status
public UpdateConnectionStatus ( ) : void
Результат void

UpdateDocument() публичный Метод

public UpdateDocument ( Action action ) : void
action Action
Результат void

UpdateFeedRate() публичный Метод

Forces an update to the element designated
public UpdateFeedRate ( ) : void
Результат void

UpdateGcodeDisplay() публичный Метод

Updates the designated gcode display dv with the current gcode being executed
public UpdateGcodeDisplay ( ) : void
Результат void

UpdateJogRates() публичный Метод

Forces the text of designated elements to display the jog override percentage for each axis
public UpdateJogRates ( ) : void
Результат void

UpdateSecondaryControls() публичный Метод

Updates the secondary controls that do not need to be updated as frequently
public UpdateSecondaryControls ( ) : void
Результат void

ZeroA() публичный Метод

Command dispatcher to reset the A axis dest to 0.0
public ZeroA ( ) : void
Результат void

ZeroB() публичный Метод

Command dispatcher to reset the B axis dest to 0.0
public ZeroB ( ) : void
Результат void

ZeroC() публичный Метод

Command dispatcher to reset the C axis dest to 0.0
public ZeroC ( ) : void
Результат void

ZeroX() публичный Метод

Command dispatcher to reset the X axis dest to 0.0
public ZeroX ( ) : void
Результат void

ZeroY() публичный Метод

Command dispatcher to reset the Y axis dest to 0.0
public ZeroY ( ) : void
Результат void

ZeroZ() публичный Метод

Command dispatcher to reset the Z axis dest to 0.0
public ZeroZ ( ) : void
Результат void

_StatusMonitor_DoWork() публичный Метод

Updates the status objects from the board
public _StatusMonitor_DoWork ( object sender, DoWorkEventArgs e ) : void
sender object background worker's dispatch object
e DoWorkEventArgs background worker arguments
Результат void