Method | Description | |
---|---|---|
Connect ( ) : bool |
Connect to the serial port.
|
|
Disconnect ( ) : void |
Disconnect the serial port.
|
|
SendMessage ( byte message ) : bool |
Sends the message.
|
|
SetPort ( string portname, int baudrate = 115200, StopBits stopbits = StopBits.One, Parity parity = Parity.None ) : void |
Sets the serial port options.
|
Method | Description | |
---|---|---|
OnConnectionStatusChanged ( SerialPortLib.ConnectionStatusChangedEventArgs args ) : void |
Raises the connected state changed event.
|
|
OnMessageReceived ( SerialPortLib.MessageReceivedEventArgs args ) : void |
Raises the message received event.
|
Method | Description | |
---|---|---|
Close ( ) : void | ||
ConnectionWatcherTask ( ) : void | ||
HandleErrorReceived ( object sender, System.IO.Ports.SerialErrorReceivedEventArgs e ) : void | ||
Open ( ) : bool | ||
ReaderTask ( ) : void |
protected OnConnectionStatusChanged ( SerialPortLib.ConnectionStatusChangedEventArgs args ) : void | ||
args | SerialPortLib.ConnectionStatusChangedEventArgs | Arguments. |
return | void |
protected OnMessageReceived ( SerialPortLib.MessageReceivedEventArgs args ) : void | ||
args | SerialPortLib.MessageReceivedEventArgs | Arguments. |
return | void |
public SendMessage ( byte message ) : bool | ||
message | byte | Message. |
return | bool |
public SetPort ( string portname, int baudrate = 115200, StopBits stopbits = StopBits.One, Parity parity = Parity.None ) : void | ||
portname | string | Portname. |
baudrate | int | Baudrate. |
stopbits | StopBits | Stopbits. |
parity | Parity | Parity. |
return | void |