Reference TSerialPort
Declared in Codebot.IO.SerialPort.pas on line 77
TSerialPort reads and writes data to a serial port device on linux
TSerialPort = class
public
{ Create a serial port given a device path such as /dev/ttyUSB0 }
constructor Create(const Device: string);
{ Close the port and destroy the object }
destructor Destroy; override;
{ Open the port using its current options }
function Open: Boolean; overload;
{ Open the port and apply options }
function Open(const Options: TSerialPortOptions): Boolean; overload;
{ Close the port }
procedure Close;
{ Read available data as a string }
function Read: string;
{ Read up to BufferSize bytes returning the number of bytes read }
function ReadBinary(var Buffer; BufferSize: Integer): Integer;
{ Write a string to the port }
procedure Write(const S: string);
{ Write a block of memory to the port }
procedure WriteBinary(var Buffer; BufferSize: Integer);
{ Send an XOn character to resume transmission }
procedure XOn;
{ Send an XOff character to pause transmission }
procedure XOff;
{ Opened is true while the port is open }
property Opened: Boolean read GetOpened;
{ The device path of the port }
property Device: string read FDevice;
end;