C# Class JurmanMetrics.FanucSocket

Inheritance: IDisposable
Datei anzeigen Open project: gregjurman/conduit Class Usage Examples

Public Methods

Method Description
Close ( ) : void

Closes the socket.

Connect ( string hostName, int port ) : void

Dispose ( ) : void

Disposes of the FanucSocket

FanucSocket ( ) : System

Constructor

FanucSocket ( int bufferSize, int baudRate ) : System

Constructor

ReadIn ( FanucSocketOptions options ) : void

Begin a task reading data from the Fanuc Device

StopOperation ( ) : void
WriteOut ( string data, FanucSocketOptions options ) : void

Begin a task reading data from the Fanuc Device

Private Methods

Method Description
ChangeState ( FanucSocketState newState ) : void
ReadIn_ClipBlock ( FanucChunk &chunk ) : void

Crops the data in the DC2-DC4 bounds

ReadIn_GetData ( FanucChunk &chunk ) : void

Gets data from socket and puts it in the chunk

ReadIn_Main ( FanucSocketOptions options ) : void

Locks access to the socket and does a read operation. If data has arrived, it is checked for Fanuc control codes and saved to memory.

ReadIn_ParseData ( FanucChunk &chunk, FanucSocketOptions options ) : void

Parses the data and keeps a state

ReadIn_ToCRLF ( FanucChunk &chunk ) : void

Converts LF to CR+LF

SafeToProceed ( ) : bool

Check all threads and tasks and confirm there is nothing preventing a task from running

WriteOut_ChunkData ( FanucChunk &chunks, string data ) : void
WriteOut_GetCode ( ) : int
WriteOut_Main ( string data, FanucSocketOptions options ) : void
WriteOut_Prepare ( FanucChunk &chunks, string &data, FanucSocketOptions options ) : void
WriteOut_Sanitize ( string &data, FanucSocketOptions options ) : void

Santizes data before sending it out. Needs some work

WriteOut_SendChunk ( FanucChunk chunk ) : void
WriteOut_ToLF ( string &data ) : void

Method Details

Close() public method

Closes the socket.
public Close ( ) : void
return void

Connect() public method

public Connect ( string hostName, int port ) : void
hostName string The hostname of the device.
port int The port number to connect to.
return void

Dispose() public method

Disposes of the FanucSocket
public Dispose ( ) : void
return void

FanucSocket() public method

Constructor
public FanucSocket ( ) : System
return System

FanucSocket() public method

Constructor
public FanucSocket ( int bufferSize, int baudRate ) : System
bufferSize int
baudRate int
return System

ReadIn() public method

Begin a task reading data from the Fanuc Device
public ReadIn ( FanucSocketOptions options ) : void
options FanucSocketOptions
return void

StopOperation() public method

public StopOperation ( ) : void
return void

WriteOut() public method

Begin a task reading data from the Fanuc Device
public WriteOut ( string data, FanucSocketOptions options ) : void
data string
options FanucSocketOptions
return void