Pyramid Technologies .NET RS-232 API  1.4.4.0
RS-232 Bill Acceptor API for Pyramid Bill Validators
PTI.Serial.ICommPort Interface Reference

Defines the contract new implementations of a serial port must adhere to. More...

Inheritance diagram for PTI.Serial.ICommPort:

Public Member Functions

bool Connect ()
 Attempts to open the underlying serial port using the currently configured state. Returns true if port is successfully opened. More...
 
bool Disconnect ()
 Attempts to safely close the underling serial port and base stream. If the close operation completes without issue, bool true is returned. More...
 
void Write (byte[] data)
 Writes the byte[] data to this port. If the port is not open, misconfigured, or if there is a physical connection issue, exceptions may arise. More...
 
byte[] Read ()
 Reads all available data from this port. If no data is received withint ReadTimeout milliseconds, a timeout exception will be raised. More...
 

Properties

bool IsOpen [get]
 Return true if the underlying serial port is open More...
 
string Name [get, set]
 Return the OS name of the underlying port More...
 
int ReadTimeout [get, set]
 Gets or Sets the timeout in milliseconds for a read operation. More...
 

Detailed Description

Defines the contract new implementations of a serial port must adhere to.

Definition at line 18 of file ICommPort.cs.

Member Function Documentation

◆ Connect()

bool PTI.Serial.ICommPort.Connect ( )

Attempts to open the underlying serial port using the currently configured state. Returns true if port is successfully opened.

Returns
bool

◆ Disconnect()

bool PTI.Serial.ICommPort.Disconnect ( )

Attempts to safely close the underling serial port and base stream. If the close operation completes without issue, bool true is returned.

Returns
bool

◆ Read()

byte [] PTI.Serial.ICommPort.Read ( )

Reads all available data from this port. If no data is received withint ReadTimeout milliseconds, a timeout exception will be raised.

Returns
byte[]

◆ Write()

void PTI.Serial.ICommPort.Write ( byte[]  data)

Writes the byte[] data to this port. If the port is not open, misconfigured, or if there is a physical connection issue, exceptions may arise.

Parameters
databyte[]

Property Documentation

◆ IsOpen

bool PTI.Serial.ICommPort.IsOpen
get

Return true if the underlying serial port is open

Definition at line 23 of file ICommPort.cs.

◆ Name

string PTI.Serial.ICommPort.Name
getset

Return the OS name of the underlying port

Definition at line 28 of file ICommPort.cs.

◆ ReadTimeout

int PTI.Serial.ICommPort.ReadTimeout
getset

Gets or Sets the timeout in milliseconds for a read operation.

Definition at line 33 of file ICommPort.cs.


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