Interface ISerialPortClient
- Namespace
- AT.Librarys.Container.Toolkit.Communication
- Assembly
- AT.Librarys.Container.dll
串口客户端
public interface ISerialPortClient : IToolkitBase, IModuleBase
- Inherited Members
- Extension Methods
Properties
Connected
是否是连接状态
bool Connected { get; }
Property Value
Methods
Connect()
连接
bool Connect()
Returns
Disconnect()
断开连接
bool Disconnect()
Returns
OnDataReceived(string, byte[])
触发数据接收事件
void OnDataReceived(string strContent, byte[] byteContent = null)
Parameters
ReadBytes()
读取字节数组
byte[] ReadBytes()
Returns
- byte[]
Send(byte[])
发送
bool Send(byte[] content)
Parameters
contentbyte[]发送内容
Returns
Send(string)
发送
bool Send(string content)
Parameters
contentstring发送内容
Returns
SendWait(byte[])
发送等待结果
byte[] SendWait(byte[] content)
Parameters
contentbyte[]发送内容
Returns
- byte[]
SendWait(byte[], int)
发送等待结果
byte[] SendWait(byte[] content, int waitTimeOut)
Parameters
Returns
- byte[]
SendWait(string)
发送等待结果
string SendWait(string content)
Parameters
contentstring发送内容
Returns
SendWait(string, int)
发送等待结果
string SendWait(string content, int waitTimeOut)
Parameters
Returns
UseConfig()
应用配置
bool UseConfig()
Returns
Events
DataReceived
数据接收事件
event EventHandler<ClientReceivedEventArgs> DataReceived