forked from JonathanDotCel/NOTPSXSerial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTargetDataPort.cs
More file actions
32 lines (27 loc) · 1.11 KB
/
TargetDataPort.cs
File metadata and controls
32 lines (27 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// Base class for e.g. Serial and TCP targets
//
// "Target" to distinguish between e.g. a remote TCP target and a local listen server for TCP<->UART bridge
//
using System;
using System.IO.Ports;
abstract public class TargetDataPort
{
public TargetDataPort(string portName, SIOSPEED connectionType, int baudRate, Parity parity, int dataBits, StopBits stopBits) { }
public TargetDataPort(string remoteHost, UInt32 remotePort, SIOSPEED connectionType ) { }
abstract public int BytesToRead { get; }
abstract public int BytesToWrite { get; }
abstract public Handshake Handshake { get; set; }
abstract public bool DtrEnable { get; set; }
abstract public bool RtsEnable { get; set; }
abstract public int ReadTimeout { get; set; }
abstract public int WriteTimeout { get; set; }
abstract public bool SkipAcks{ get; }
abstract public void Open();
abstract public void Close();
abstract public int ReadByte();
abstract public int ReadChar();
abstract public void Write(string text);
abstract public void Write(char[] buffer, int offset, int count);
abstract public void Write(byte[] buffer, int offset, int count);
}