Class SerialPort
Provides mehods for interacting with serial ports
Inheritance
System.Object
SerialPort
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Cosmos.HAL
Assembly: Cosmos.HAL2.dll
Syntax
public static class SerialPort
Methods
| Improve this Doc View SourceEnable(COMPort, BaudRate)
Enables certain COM port
Declaration
public static void Enable(COMPort aPort, BaudRate aBaudRate)
Parameters
Type | Name | Description |
---|---|---|
COMPort | aPort | COM port |
BaudRate | aBaudRate |
Receive()
Reads byte (ASCII character) from COM1 port
Declaration
public static byte Receive()
Returns
Type | Description |
---|---|
System.Byte |
Receive(COMPort)
Reads byte (ASCII character) from COM port
Declaration
public static byte Receive(COMPort aPort)
Parameters
Type | Name | Description |
---|---|---|
COMPort | aPort | COM port |
Returns
Type | Description |
---|---|
System.Byte | ASCII character as byte |
Send(Char)
Sends character to COM1 port
Declaration
public static void Send(char aText)
Parameters
Type | Name | Description |
---|---|---|
System.Char | aText | Character to send |
Send(Char, COMPort)
Sends character to COM port
Declaration
public static void Send(char aText, COMPort aPort)
Parameters
Type | Name | Description |
---|---|---|
System.Char | aText | Character to send |
COMPort | aPort | COM port |
SendString(String)
Sends string to COM1 port
Declaration
public static void SendString(string aText)
Parameters
Type | Name | Description |
---|---|---|
System.String | aText | String to send |
SendString(String, COMPort)
Sends string to COM port
Declaration
public static void SendString(string aText, COMPort aPort)
Parameters
Type | Name | Description |
---|---|---|
System.String | aText | String to send |
COMPort | aPort | COM port |