C# Класс XBeeP.CommunicationManager

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ClosePort ( ) : bool
CommunicationManager ( ) : System

Comstructor to set the properties of our serial port communicator to nothing

CommunicationManager ( string baud, string par, string sBits, string dBits, string name, System.Windows.Forms.RichTextBox rtb ) : System

Constructor to set the properties of our Manager Class

OpenPort ( ) : bool
SetParityValues ( object obj ) : void
SetPortNameValues ( object obj ) : void
SetStopBitValues ( object obj ) : void
WriteData ( string msg ) : void
comPort_DataReceived ( object sender, System.IO.Ports.SerialDataReceivedEventArgs e ) : void

method that will be called when theres data waiting in the buffer

Приватные методы

Метод Описание
ByteToHex ( byte comByte ) : string

method to convert a byte array into a hex string

DisplayData ( MessageType type, string msg ) : void
HexToByte ( string msg ) : byte[]

method to convert hex string into a byte array

Описание методов

ClosePort() публичный Метод

public ClosePort ( ) : bool
Результат bool

CommunicationManager() публичный Метод

Comstructor to set the properties of our serial port communicator to nothing
public CommunicationManager ( ) : System
Результат System

CommunicationManager() публичный Метод

Constructor to set the properties of our Manager Class
public CommunicationManager ( string baud, string par, string sBits, string dBits, string name, System.Windows.Forms.RichTextBox rtb ) : System
baud string Desired BaudRate
par string Desired Parity
sBits string Desired StopBits
dBits string Desired DataBits
name string Desired PortName
rtb System.Windows.Forms.RichTextBox
Результат System

OpenPort() публичный Метод

public OpenPort ( ) : bool
Результат bool

SetParityValues() публичный Метод

public SetParityValues ( object obj ) : void
obj object
Результат void

SetPortNameValues() публичный Метод

public SetPortNameValues ( object obj ) : void
obj object
Результат void

SetStopBitValues() публичный Метод

public SetStopBitValues ( object obj ) : void
obj object
Результат void

WriteData() публичный Метод

public WriteData ( string msg ) : void
msg string
Результат void

comPort_DataReceived() публичный Метод

method that will be called when theres data waiting in the buffer
public comPort_DataReceived ( object sender, System.IO.Ports.SerialDataReceivedEventArgs e ) : void
sender object
e System.IO.Ports.SerialDataReceivedEventArgs
Результат void