Maxima Plugin
A SMath Plugin
Loading...
Searching...
No Matches
MaximaPlugin.MaximaSocket Class Reference

Create, delete and manage the socket communication More...

Public Member Functions

 MaximaSocket ()
 Constructor
 
void ConnectClient ()
 Connect client
 
int GetPort ()
 Expose socket port number More...
 
string GetLastLog ()
 Expose log entry for last command More...
 
void ClearFullLog (string message)
 Clears the full log More...
 
void SendSingleCommand (string sendString, string option="none")
 Send and log a command to Maxima. More...
 
string ReceiveSingleResponse (string option="none")
 Receive and log a single response from Maxima. More...
 

Static Public Member Functions

static string WriteWXM ()
 Write session log as wxMaxima file (e.g. for further examination in Maxima). This consists of three parts: More...
 

Public Attributes

string fullLog = ""
 

Static Public Attributes

static string wxmLog = ""
 
static string wxmFileStart = "/* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*/\r\n"
 
static string wxmStartCmd = "\r\n/* [wxMaxima: input start ] */\r\n"
 
static string wxmEndCmd = "\r\n/* [wxMaxima: input end ] */\r\n"
 
static string wxmFileEnd = "\r\n\"Created with SMath\"$"
 

Private Member Functions

 ~MaximaSocket ()
 Finalizer
 

Private Attributes

Socket server = null
 
Socket client = null
 
int port = 4555
 
bool connected = false
 
Encoding encoding = new UTF8Encoding()
 
int timeToWait =30
 
int receiveTries = 5
 
string lastLog = ""
 
string lastPrompt = ""
 

Detailed Description

Create, delete and manage the socket communication

Member Function Documentation

◆ ClearFullLog()

void MaximaPlugin.MaximaSocket.ClearFullLog ( string  message)

Clears the full log

Parameters
messageString to write to the beginning of the cleared log

◆ GetLastLog()

string MaximaPlugin.MaximaSocket.GetLastLog ( )

Expose log entry for last command

Returns
lastlog

◆ GetPort()

int MaximaPlugin.MaximaSocket.GetPort ( )

Expose socket port number

Returns
Port

◆ ReceiveSingleResponse()

string MaximaPlugin.MaximaSocket.ReceiveSingleResponse ( string  option = "none")

Receive and log a single response from Maxima.

Parameters
optionSet this to "check" to bypass logging to fulllog.
Returns
Response string

◆ SendSingleCommand()

void MaximaPlugin.MaximaSocket.SendSingleCommand ( string  sendString,
string  option = "none" 
)

Send and log a command to Maxima.

Parameters
sendStringString to send
optionSet this to "check" to bypass logging of the command.

◆ WriteWXM()

static string MaximaPlugin.MaximaSocket.WriteWXM ( )
static

Write session log as wxMaxima file (e.g. for further examination in Maxima). This consists of three parts:

  1. Standard startup commands
  2. Custom startup commands
  3. Log of the interactive commands

The documentation for this class was generated from the following file: