Manage the maxima session, connect maxima, manage configuration file, define all of the directories relevant to the plugin
More...
|
|
MaximaSocket | socket = null |
| |
|
string | gnuPlotImageFolder = "" |
| |
|
string | namedDrawImageFolder = "" |
| |
|
List< string > | settings |
| |
|
List< string > | commands |
| |
|
List< string > | customCommands |
| |
|
List< ExpressionStore > | exprSMathToMaxima |
| |
|
List< ExpressionStore > | exprMaximaToSMath |
| |
|
| List< Process > | GetProcesses () |
| | Gets the process objects of possible maxima processes. Possible process names are given in property ProcessNames. This was required, because different Maxima versions use different process names More...
|
| |
| void | StartAndConnectMaxima (int option) |
| | Establish connection and initialize Maxima (show a progress bar) Detect the process handle for the Maxima process for later closing More...
|
| |
|
| static void | RecursiveSearch (System.IO.DirectoryInfo root, string filename) |
| | The actual recursive search More...
|
| |
|
|
string | assemblyFolder = "" |
| |
|
string | workingFolder = "" |
| |
|
string | ConfigFileName = "" |
| |
|
string | XMLname = "maxima.xml" |
| |
|
string | MAXIMAname = "maxima.bat" |
| |
|
string | pathToMAXIMA = "" |
| |
|
string | pathToMAXIMArel = "" |
| |
|
int | majorV = 0 |
| |
|
int | minorV = 0 |
| |
|
int | buildV = 0 |
| |
|
int | revisionV = 0 |
| |
|
Process | maximaProcess = null |
| |
|
bool | maximaConnected = false |
| |
|
List< Process > | processesBeforeStart |
| |
|
List< Process > | processesAfterStart |
| |
|
Process | newMaximaProcess |
| |
|
string[] | ProcessNames = { "maxima", "lisp", "sbcl" } |
| |
|
string | maximaState = "\"Initializing error. Please check path to Maxima under Insert> Maxima> Settings.\"" |
| |
|
string | maximaStateClosed = "\"Maxima was closed.\"" |
| |
|
string | maximaStateRunning = "\"Maxima started successfully.\"" |
| |
|
string | maximaStateReInitialized = "\"Maxima was re-initialized\"" |
| |
|
string | maximaStateRestart = "\"Restart complete.\"" |
| |
|
string | maximaStateCleanup = "\"Cleanup complete.\"" |
| |
|
int | timeToWait = 100 |
| |
|
bool | firstCmd = false |
| |
|
int | RequiredConfigFormatID = 13 |
| |
|
int | FoundConfigFormatID = 0 |
| |
|
|
static string | pathToSearchFile = "" |
| |
|
static bool | searchSucces = false |
| |
Manage the maxima session, connect maxima, manage configuration file, define all of the directories relevant to the plugin
◆ checkForXMLandMAXIMA()
| bool MaximaPlugin.MaximaSession.checkForXMLandMAXIMA |
( |
| ) |
|
Check and read config file. Check if the path to maxima exists and valid
- Returns
- Returns true if the config file exists and the path to maxima from therein is valid.
◆ CleanupMaxima()
| string MaximaPlugin.MaximaSession.CleanupMaxima |
( |
| ) |
|
Implementation of MaximaControl("cleanup"). Maxima is reset without shutting down the session.
- Returns
- Maxima state message
◆ CloseMaxima()
| void MaximaPlugin.MaximaSession.CloseMaxima |
( |
| ) |
|
Close maxima session
- Returns
◆ DeleteFiles()
| static bool MaximaPlugin.MaximaSession.DeleteFiles |
( |
List< string > |
filePaths | ) |
|
|
static |
Helper function for migration from old style config files Returns true if just one file was found, more files were found, the user confirmed deletion and the files were deleted successfully
- Parameters
-
| filePaths | list of file names |
- Returns
- success flag
◆ FindMaximaPath()
| static string MaximaPlugin.MaximaSession.FindMaximaPath |
( |
string |
path | ) |
|
|
static |
Search for Maxima path in the given path
- Parameters
-
<return>full path to maxima<
- Returns
- >
◆ GetDirectories()
| static List< string > MaximaPlugin.MaximaSession.GetDirectories |
( |
string |
path, |
|
|
string |
searchPattern = "*", |
|
|
SearchOption |
searchOption = SearchOption.TopDirectoryOnly |
|
) |
| |
|
static |
Helper function for FindMaximaPath(). List all top level directories in the path
- Parameters
-
///
- Parameters
-
| searchPattern | Search pattern |
///
- Parameters
-
| searchOption | Search option |
<return>List directories in the path<
- Returns
- >
◆ GetLastLog()
| string MaximaPlugin.MaximaSession.GetLastLog |
( |
| ) |
|
Get the last log entry from maximaSocket
- Returns
- Last log from socket
◆ GetMaximaStateRunning()
| string MaximaPlugin.MaximaSession.GetMaximaStateRunning |
( |
| ) |
|
Value of maximaState if session is running
- Returns
◆ GetPathToMaximaAbs()
| string MaximaPlugin.MaximaSession.GetPathToMaximaAbs |
( |
| ) |
|
Path to maxima.bat relative to SMath dir.
- Returns
◆ GetProcesses()
| List< Process > MaximaPlugin.MaximaSession.GetProcesses |
( |
| ) |
|
|
private |
Gets the process objects of possible maxima processes. Possible process names are given in property ProcessNames. This was required, because different Maxima versions use different process names
- Returns
- List of processes
◆ GetRelativePath()
| static string MaximaPlugin.MaximaSession.GetRelativePath |
( |
string |
filespec, |
|
|
string |
folder |
|
) |
| |
|
static |
◆ GetState()
| string MaximaPlugin.MaximaSession.GetState |
( |
| ) |
|
Get the value of maximaState
- Returns
- value
◆ IsAlive()
| bool MaximaPlugin.MaximaSession.IsAlive |
( |
| ) |
|
Test if Maxima is responsive
- Returns
- result of the check
◆ IsAnAdministrator()
| static bool MaximaPlugin.MaximaSession.IsAnAdministrator |
( |
| ) |
|
|
static |
Check the privileges
- Returns
- true if the user is an admin
◆ IsConfigFileFromCurrentPluginVersion()
| bool MaximaPlugin.MaximaSession.IsConfigFileFromCurrentPluginVersion |
( |
| ) |
|
Check if Config file was generated with the current plugin version
- Returns
- Returns true if config file is up to date
◆ ReceiveSingleCommandFromSocket()
| string MaximaPlugin.MaximaSession.ReceiveSingleCommandFromSocket |
( |
| ) |
|
◆ RecursiveSearch()
| static void MaximaPlugin.MaximaSession.RecursiveSearch |
( |
System.IO.DirectoryInfo |
root, |
|
|
string |
filename |
|
) |
| |
|
staticprivate |
The actual recursive search
- Parameters
-
| root | Dirinfo object |
| filename | Filename |
◆ RestartMaxima()
| string MaximaPlugin.MaximaSession.RestartMaxima |
( |
| ) |
|
Implementation of MaximaControl("restart"). The Maxima session is closed, the logs are reset and a new session is established.
- Returns
- Maxima state message
◆ SearchFile()
| static string MaximaPlugin.MaximaSession.SearchFile |
( |
string |
path, |
|
|
string |
name |
|
) |
| |
|
static |
File search function for AutoMaxima, function better goes to AutoMaxima.cs, because it is only used there.
- Parameters
-
| path | Path name |
| name | File name |
- Returns
- Full filename if file exists, null otherwise
◆ SendAndReceiveFromSocket()
| string MaximaPlugin.MaximaSession.SendAndReceiveFromSocket |
( |
string |
sendString, |
|
|
string |
option = "none" |
|
) |
| |
Sends a command to Maxima and gets the result if Maxima is running, otherwise the state description is returned
- Parameters
-
- Returns
- If maxima is connected, return response from Maxima. If maxima is not connected, return maxima state message
◆ SendInitCmd()
| string MaximaPlugin.MaximaSession.SendInitCmd |
( |
| ) |
|
Submit configuration commands to a running Maxima session
- Returns
- Initializing message
◆ SendSingleCommandToSocket()
| void MaximaPlugin.MaximaSession.SendSingleCommandToSocket |
( |
string |
data | ) |
|
◆ SetNewPathToMaxima()
| string MaximaPlugin.MaximaSession.SetNewPathToMaxima |
( |
string |
StartPath | ) |
|
Try to get the path to Maxima
- Parameters
-
- Returns
- Relative path or error message
◆ StartAndConnectMaxima()
| void MaximaPlugin.MaximaSession.StartAndConnectMaxima |
( |
int |
option | ) |
|
|
private |
Establish connection and initialize Maxima (show a progress bar) Detect the process handle for the Maxima process for later closing
- Parameters
-
- Returns
The documentation for this class was generated from the following file:
- SessionManager/MaximaSession.cs