C# Class j64.AlarmServer.TPISocket

All communication with the TPI is handled via this class. It has the ability to send commands over the socket, monitor for responses being received from the TPI, and will also send a poll command to the TPI periodically so the connectino will not time out.
Show file Open project: joejarvis64/j64.AlarmServer Class Usage Examples

Public Methods

Method Description
Disconnect ( ) : void
ExecuteCommand ( TpiCommand tpiRequest ) : void

Send a command to the TPI. This method will issue a lock to prevent multiple threads from sending a command at the same time.

StartSocket ( ) : void

Begin a connection with the TPI and start listening for responses.

TPISocket ( ) : System

Constructor

Private Methods

Method Description
EnsureConnection ( ) : void
ListenForData ( ) : void

Listen for data coming from the TPI

PollTpi ( ) : void

Listen for data coming from the TPI

Method Details

Disconnect() public method

public Disconnect ( ) : void
return void

ExecuteCommand() public method

Send a command to the TPI. This method will issue a lock to prevent multiple threads from sending a command at the same time.
public ExecuteCommand ( TpiCommand tpiRequest ) : void
tpiRequest TpiCommand
return void

StartSocket() public method

Begin a connection with the TPI and start listening for responses.
public StartSocket ( ) : void
return void

TPISocket() public method

Constructor
public TPISocket ( ) : System
return System