Show / Hide Table of Contents

Interface ISerialCommand

Interface for UART communication

Namespace: Elatec.FCT.Client.Hardware
Assembly: ElatecFCT.dll
Syntax
public interface ISerialCommand

Properties

View Source

BaudRate

Serial baudrate

Declaration
int BaudRate { get; set; }
Property Value
Type Description
System.Int32
View Source

DataBits

No of databits

Declaration
int DataBits { get; set; }
Property Value
Type Description
System.Int32
View Source

Parity

Paritybit

Declaration
Parity Parity { get; set; }
Property Value
Type Description
System.IO.Ports.Parity
View Source

PortName

The port name

Declaration
string PortName { get; }
Property Value
Type Description
System.String
View Source

ReadTimeout

Read timeout in ms

Declaration
int ReadTimeout { get; set; }
Property Value
Type Description
System.Int32
View Source

StopBits

Stopbits

Declaration
StopBits StopBits { get; set; }
Property Value
Type Description
System.IO.Ports.StopBits
View Source

StopChar

Define wich char shows end of Rx or Tx

Declaration
char StopChar { get; set; }
Property Value
Type Description
System.Char

Methods

View Source

Close()

Close a port

Declaration
void Close()
View Source

Open()

Open a port

Declaration
void Open()
View Source

ReadTo(String)

Read string until string value

Declaration
string ReadTo(string value)
Parameters
Type Name Description
System.String value
Returns
Type Description
System.String
View Source

Rx()

read response

Declaration
byte[] Rx()
Returns
Type Description
System.Byte[]
View Source

Tx(Byte[])

Transmit command

Declaration
void Tx(byte[] tx)
Parameters
Type Name Description
System.Byte[] tx
View Source

TxRx(Byte[])

Transmit command and receive answer

Declaration
byte[] TxRx(byte[] tx)
Parameters
Type Name Description
System.Byte[] tx
Returns
Type Description
System.Byte[]
View Source

Write(String)

Write string to serial port

Declaration
void Write(string data)
Parameters
Type Name Description
System.String data
View Source

WriteReadTo(String, String)

Write command and read till string value

Declaration
string WriteReadTo(string wrData, string value)
Parameters
Type Name Description
System.String wrData
System.String value
Returns
Type Description
System.String
  • View Source
In This Article
Back to top Generated by DocFX