Unit msecommport

Description

 

Overview

Classes, Interfaces, Objects and Records

Name Description
Record errorrecty  
Class tcustomrs232  
Class trs232  
Class tcommevent  
Class tcommthread  
Class tcommport  
Class tasciicommevent  
Class tasciicommthread  
Class tasciicommport  
Class tasciiprotevent  
Class tasciiprotport  

Functions and Procedures

function checkcommport(commnr: commnrty): boolean;
function crc16(const data; len: integer): word;
function bintoascii(const bytes: string): string; overload;
function bintoascii(const bytes: pchar; const len: integer): string; overload;
function asciitobin(const chars: string): string;

Types

commstatety = (...);
perrorrecty = ˆerrorrecty;
commnrty = (...);
commbaudratety = (...);
commdatabitsty = (...);
commstopbitty = (...);
commparityty = (...);
commeventty = procedure(const sender: tcommevent) of object;
asciicommeventclassty = class of tasciicommevent;
asciiproterrorty = (...);

Constants

defaulteorchar = c_linefeed;
cpf_none = 0;
cpf_ok = 1;
cpf_working = 2;
cpf_notopen = 3;
cpf_abort = 4;
cpf_timeout = 5;
cpf_exception = 6;
cpf_error = 7;
cpf_bufferoverflow = 8;
cpf_canceled = 9;
cpf_unknown = 10;
cpf_command = 11;
cpf_parameter = 12;
cpf_busy = 13;
cpf_user = 100;
errortexte: array[commstatety] of errorrecty = ( (error: cpf_none; text: ''), (error: cpf_ok; text: 'OK'), (error: cpf_working; text: 'busy'), (error: cpf_notopen; text: 'not open'), (error: cpf_abort; text: 'abort'), (error: cpf_timeout; text: 'timeout'), (error: cpf_exception; text: 'exception'), (error: cpf_error; text: 'error'), (error: cpf_bufferoverflow; text: 'bufferoverflow'), (error: cpf_canceled; text: 'canceled'), (error: cpf_unknown; text: 'unknown'), (error: cpf_command; text: 'command error'), (error: cpf_parameter; text: 'paramter error'), (error: cpf_busy; text: 'busy') );
commerrors = ' 1 ok' + c_linefeed + ' 2 working' + c_linefeed + ' 3 port not open' + c_linefeed + ' 4 abort' + c_linefeed + ' 5 timeout' + c_linefeed + ' 6 exception' + c_linefeed + ' 7 error' + c_linefeed + ' 8 bufferoverflow' + c_linefeed + ' 9 canceled';
commname: array[commnrty] of string = ('','COM1','COM2','COM3','COM4','COM5', 'COM6','COM7','COM8','COM9');
invalidfilehandle = INVALID_HANDLE_VALUE;
infinitemse = INFINITE;
commbittime: array[commbaudratety] of real = (1/50,1/75,1/110,1/134,1/150,1/200,1/300,1/600, 1/1200,1/1800,1/2400,1/4800,1/9600,1/19200, 1/38400,1/57600,1/115200);
commbaudrates: array[commbaudratety] of integer = ( 50,75,110,134,150,200,300,600, 1200,1800,2400,4800,9600,19200, 38400,57600,115200);
errorchar = '*';
errorcodes: array[asciiproterrorty] of integer = (cpf_unknown,cpf_command,cpf_parameter,cpf_busy);

Description

Functions and Procedures

function checkcommport(commnr: commnrty): boolean;
 
function crc16(const data; len: integer): word;
 
function bintoascii(const bytes: string): string; overload;
 
function bintoascii(const bytes: pchar; const len: integer): string; overload;
 
function asciitobin(const chars: string): string;
 

Types

commstatety = (...);
 
Values
  • coms_none
  • coms_ok
  • coms_working
  • coms_notopen
  • coms_abort
  • coms_timeout
  • coms_exception
  • coms_error
  • coms_bufferoverflow
  • coms_canceled
  • coms_unknown
  • coms_command
  • coms_parameter
  • coms_busy
perrorrecty = ˆerrorrecty;
 
commnrty = (...);
 
Values
  • cnr_invalid = -1
  • cnr_1
  • cnr_2
  • cnr_3
  • cnr_4
  • cnr_5
  • cnr_6
  • cnr_7
  • cnr_8
  • cnr_9
commbaudratety = (...);
 
Values
  • cbr_50
  • cbr_75
  • cbr_110
  • cbr_134
  • cbr_150
  • cbr_200
  • cbr_300
  • cbr_600
  • cbr_1200
  • cbr_1800
  • cbr_2400
  • cbr_4800
  • cbr_9600
  • cbr_19200
  • cbr_38400
  • cbr_57600
  • cbr_115200
commdatabitsty = (...);
 
Values
  • cdb_5
  • cdb_6
  • cdb_7
  • cdb_8
commstopbitty = (...);
 
Values
  • csb_1
  • csb_2
commparityty = (...);
 
Values
  • cpa_none
  • cpa_odd
  • cpa_even
commeventty = procedure(const sender: tcommevent) of object;
 
asciicommeventclassty = class of tasciicommevent;
 
asciiproterrorty = (...);
 
Values
  • ape_unknown
  • ape_command
  • ape_parameter
  • ape_busy

Constants

defaulteorchar = c_linefeed;
 
cpf_none = 0;
 
cpf_ok = 1;
 
cpf_working = 2;
 
cpf_notopen = 3;
 
cpf_abort = 4;
 
cpf_timeout = 5;
 
cpf_exception = 6;
 
cpf_error = 7;
 
cpf_bufferoverflow = 8;
 
cpf_canceled = 9;
 
cpf_unknown = 10;
 
cpf_command = 11;
 
cpf_parameter = 12;
 
cpf_busy = 13;
 
cpf_user = 100;
 
errortexte: array[commstatety] of errorrecty = ( (error: cpf_none; text: ''), (error: cpf_ok; text: 'OK'), (error: cpf_working; text: 'busy'), (error: cpf_notopen; text: 'not open'), (error: cpf_abort; text: 'abort'), (error: cpf_timeout; text: 'timeout'), (error: cpf_exception; text: 'exception'), (error: cpf_error; text: 'error'), (error: cpf_bufferoverflow; text: 'bufferoverflow'), (error: cpf_canceled; text: 'canceled'), (error: cpf_unknown; text: 'unknown'), (error: cpf_command; text: 'command error'), (error: cpf_parameter; text: 'paramter error'), (error: cpf_busy; text: 'busy') );
 
commerrors = ' 1 ok' + c_linefeed + ' 2 working' + c_linefeed + ' 3 port not open' + c_linefeed + ' 4 abort' + c_linefeed + ' 5 timeout' + c_linefeed + ' 6 exception' + c_linefeed + ' 7 error' + c_linefeed + ' 8 bufferoverflow' + c_linefeed + ' 9 canceled';
 
commname: array[commnrty] of string = ('','COM1','COM2','COM3','COM4','COM5', 'COM6','COM7','COM8','COM9');
 
invalidfilehandle = INVALID_HANDLE_VALUE;
 
infinitemse = INFINITE;
 
commbittime: array[commbaudratety] of real = (1/50,1/75,1/110,1/134,1/150,1/200,1/300,1/600, 1/1200,1/1800,1/2400,1/4800,1/9600,1/19200, 1/38400,1/57600,1/115200);
 
commbaudrates: array[commbaudratety] of integer = ( 50,75,110,134,150,200,300,600, 1200,1800,2400,4800,9600,19200, 38400,57600,115200);
 
errorchar = '*';
 
errorcodes: array[asciiproterrorty] of integer = (cpf_unknown,cpf_command,cpf_parameter,cpf_busy);
 

Generated by PasDoc 0.16.0.