C# Class XBeeP.CommunicationManager

Afficher le fichier Open project: Skye07/XBeeP Class Usage Examples

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

ClosePort() public méthode

public ClosePort ( ) : bool
Résultat bool

CommunicationManager() public méthode

Comstructor to set the properties of our serial port communicator to nothing
public CommunicationManager ( ) : System
Résultat System

CommunicationManager() public méthode

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
Résultat System

OpenPort() public méthode

public OpenPort ( ) : bool
Résultat bool

SetParityValues() public méthode

public SetParityValues ( object obj ) : void
obj object
Résultat void

SetPortNameValues() public méthode

public SetPortNameValues ( object obj ) : void
obj object
Résultat void

SetStopBitValues() public méthode

public SetStopBitValues ( object obj ) : void
obj object
Résultat void

WriteData() public méthode

public WriteData ( string msg ) : void
msg string
Résultat void

comPort_DataReceived() public méthode

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
Résultat void