Unit VSSComm32

Classes

TReadThread -
TVSSComm32 -
TWriteThread -

Functions

LogDebugInfo - means you can only debug 1 component at a time

LogDebugLastError
LogDebugLastError - *****************************************************************************) // DEBUG ROUTINES (******************************************************************************) // // FUNCTION: LogDebugLastError(.
Register - LogDebugInfo

Types

TBaudRate
TCommPort
TDataBits
TParity
TReceiveDataEvent
TStopBits

Constants

INPUTBUFFERSIZE
PWM_COMMWRITE
PWM_GOTCOMMDATA
PWM_REQUESTHANGUP

Variables

CommsLogFile


Functions


procedure LogDebugInfo( outstr: PChar );

means you can only debug 1 component at a time

LogDebugLastError


procedure LogDebugLastError( dwLastError: DWORD; szPrefix: LPSTR );

*****************************************************************************) // DEBUG ROUTINES (******************************************************************************) // // FUNCTION: LogDebugLastError(..) // // PURPOSE: Pretty print a line error to the debugging output. // // PARAMETERS: // dwLastError - Actual error code to decipher. // pszPrefix - String to prepend to the printed message. // // RETURN VALUE: // none // // COMMENTS: // // Note that there is an internal string length limit of // MAXOUTPUTSTRINGLENGTH. If this length is exceeded, // the behavior will be the same as wsprintf, although // it will be undetectable. *KEEP szPrefix SHORT!* // //

procedure Register;

LogDebugInfo

Types


TBaudRate = (____110, ____300, ____600, ___1200, ___2400, ___4800, ___9600, __14400,
						 __19200, __38400, __56000, _128000, _256000);

TCommPort = (Com1, Com2, Com3, Com4);

TDataBits = (_4,_5,_6,_7,_8);

TParity = (None,Odd,Even,Mark,Space);

TReceiveDataEvent = procedure( Buffer: Pointer; BufferLength: Word ) of object

TStopBits = (_1, _1_5, _2);

Constants

INPUTBUFFERSIZE = 2048

Default size of the Input Buffer used by this code.

PWM_COMMWRITE = WM_USER+1

This is the message posted to the WriteThread When we have something to write.

PWM_GOTCOMMDATA = WM_USER + 1

messages from read/write threads

PWM_REQUESTHANGUP = WM_USER + 2


Variables

CommsLogFile : Text