Difference between revisions of "Unit Serial"
Line 44: | Line 44: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 59: | Line 59: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 71: | Line 71: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 83: | Line 83: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 95: | Line 95: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 107: | Line 107: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 119: | Line 119: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 158: | Line 158: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 170: | Line 170: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 182: | Line 182: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 194: | Line 194: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 206: | Line 206: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 218: | Line 218: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 230: | Line 230: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 245: | Line 245: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 257: | Line 257: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 269: | Line 269: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 284: | Line 284: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 326: | Line 326: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 359: | Line 359: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 371: | Line 371: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 383: | Line 383: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 395: | Line 395: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 443: | Line 443: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 455: | Line 455: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 467: | Line 467: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 479: | Line 479: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 491: | Line 491: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 503: | Line 503: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 518: | Line 518: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 530: | Line 530: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 554: | Line 554: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 566: | Line 566: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 578: | Line 578: | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} |
Revision as of 05:47, 27 September 2016
Return to Unit Reference
Contents
[hide]Description
Serial devices represent a communication device that can be both read and written and has a set of common properties and capabilities. The underlying device may be an actual UART or it may be some other form of device such as a USB to Serial converter. As long as the device can implement the common capabilities then it can be accessed as a serial device without regard to the actual implementation.
Each serial device returns a set of properties that describe the capabilities of the device and includes a set of flags that indicate what features are supported.
Reads from and writes to serial devices are buffered so that varying data transfer rates can be accomodated and both reads and writes allow for non blocking so that a caller can avoid waiting for received data to be available or the device to be ready to transmit.
This unit also implements the serial logging device which can be configured via parameters in the GlobalConfig unit or from the command line.
Constants
To be documented
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization functions
Serial functions
function SerialDeviceOpen(Serial:PSerialDevice; BaudRate,DataBits,StopBits,Parity,FlowControl,ReceiveDepth,TransmitDepth:LongWord):LongWord;
function SerialDeviceRead(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
function SerialDeviceWrite(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
function SerialDeviceProperties(Serial:PSerialDevice; Properties:PSerialProperties):LongWord;
function SerialDeviceCreateEx(Size:LongWord):PSerialDevice;
function SerialDeviceDestroy(Serial:PSerialDevice):LongWord;
function SerialDeviceRegister(Serial:PSerialDevice):LongWord;
function SerialDeviceFindByName(const Name:String):PSerialDevice; inline;
function SerialDeviceFindByDescription(const Description:String):PSerialDevice; inline;
function SerialDeviceEnumerate(Callback:TSerialEnumerate; Data:Pointer):LongWord;
function SerialDeviceNotification(Serial:PSerialDevice; Callback:TSerialNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Serial logging functions
function SerialLoggingStart(Logging:PLoggingDevice):LongWord;
function SerialLoggingOutput(Logging:PLoggingDevice; const Data:String):LongWord;
RTL serial functions
function SysSerialOpen(BaudRate,DataBits,StopBits,Parity,FlowControl,ReceiveDepth,TransmitDepth:LongWord):LongWord;
function SysSerialClose:LongWord;
function SysSerialWrite(Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord;
Serial helper functions
function SerialDeviceGetDefault:PSerialDevice; inline;
function SerialDeviceSetDefault(Serial:PSerialDevice):LongWord;
function SerialDeviceCheck(Serial:PSerialDevice):PSerialDevice;
function SerialBufferReadComplete(Buffer:PSerialBuffer; Removed:LongWord):Boolean;
function SerialBufferWriteStart(Buffer:PSerialBuffer; var Available:LongWord):Pointer;
function SerialBufferWriteComplete(Buffer:PSerialBuffer; Added:LongWord):Boolean;
procedure SerialLog(Level:LongWord; Serial:PSerialDevice; const AText:String);
procedure SerialLogInfo(Serial:PSerialDevice; const AText:String); inline;
procedure SerialLogError(Serial:PSerialDevice; const AText:String); inline;
procedure SerialLogDebug(Serial:PSerialDevice; const AText:String); inline;
Serial logging helper functions
function SerialLoggingDeviceAdd(Serial:PSerialDevice):LongWord;
function SerialLoggingDeviceRemove(Serial:PSerialDevice):LongWord;
function SerialLoggingDeviceParameters(Serial:PSerialDevice; const Parameters:String; var BaudRate,Parity,DataBits,StopBits:LongWord):LongWord;
function SerialLoggingFirstWord(var Value:String;const Delimiter:String):String;
function SerialLoggingDeviceEnum(Serial:PSerialDevice; Data:Pointer):LongWord;
function SerialLoggingDeviceNotify(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
Return to Unit Reference