Forum > Packages and Libraries

TLazSerial : serial port component for Lazarus (windows and linux).

<< < (91/97) > >>

Bebeto:
Jurassic Pork: I'm looking for CPortLib component, because it has LED objects that indicate port activity and, in my application, it's interesting to monitor them, graphically.

I tried to install the "3.2_laz" version, that you made available in another post, but I've compilation errors and cannot use this component.
(TFont conversions on CPortReg.pas, lines 191 and 193).

I'm using Lazarus 3.4 x64 with FPC: 3.2.2.

Do you have a more up-to-date and functional version of this CPorLib component?

I believe that TLazSerial is a non-graphical component, right?

I thank you for your attention!
Thanks!

Jurassic Pork:
Hello,
try to use lazcomport from here
ok for me with Lazarus 2.2.6 fpc 3.2.2
Friendly, J.P

Bebeto:
J.P: Thank you very much!  :D
This was exactly what I was looking for.
You are the man!  8-)

Have a good day!

sunjob:
good day!
open/build/install package LazSerialPort.lpk, but can't find this on toolbar-pallete.
however, i open your example from the 'test'-subdirectory, F12 -> it is present on the form
thank


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---lazarus_3.4.0_opt_gtk2 x86_64lazarus_3.4.0_opt_qt4  x86_64lazarus_3.4.0_opt_qt5  x86_64fpc_3.2.2linux/slackware 14.2/15.2

eldonfsr:
I create this function on app to handle configuration serial port, some time we need show information


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  function StrToBaudRate(Str: String ): TBaudRate;    function StrToParity(Str: String ): TParity;    function StrtoDataBits(Str: String ): TDataBits;    function StrtoStopBits(Str: String ): TStopBits;    function StrToFlowControl(Str: String ): TFlowControl;     function BaudRateToStr(BaudRate: TBaudRate): string;    function StopBitsToStr(StopBits: TStopBits): string;    function DataBitsToStr(DataBits: TDataBits): string;    function ParityToStr(Parity: TParity): string;    function FlowControlToStr(FlowControl: TFlowControl): string;    i Think this variables all ready on serial but i case we need to create on const

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Var  Port        : String;  SBaudRate  : String;  SParity    : String;  DataBits   : string;  StopBits   : string;  SoftFlow   : Boolean;  hardFlow   : Boolean;  flowcontrol:String;    const    BaudRateStrings: array[TBaudRate] of string = ('110', '300', '600',      '1200', '2400', '4800', '9600', '14400', '19200', '38400', '56000', '57600',      '115200', '128000', '230400', '256000','460800', '921600');    StopBitsStrings: array[TStopBits] of string = ('1', '1.5', '2');    DataBitsStrings: array[TDataBits] of string = ('8', '7', '6', '5');    ParityBitsStrings: array[TParity] of string = ('None', 'Odd', 'Even',      'Mark', 'Space');    FlowControlStrings: array[TFlowControl] of string = ('None',      'Software', 'HardWare'); 
I Hope help

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---function TFormMain.BaudRateToStr(BaudRate: TBaudRate): string;begin  Result := BaudRateStrings[BaudRate];end; function TFormMain.StrToBaudRate(Str: String): TBaudRate;var  I: TBaudRate;begin  I := Low(TBaudRate);  while (I <= High(TBaudRate)) do  begin    if UpperCase(Str) = UpperCase(BaudRateToStr(TBaudRate(I))) then      Break;    I := Succ(I);  end;  if I > High(TBaudRate) then    Result := Br__9600  else    Result := I;end;function TFormMain.StrToStopBits(Str: string): TStopBits;var  I: TStopBits;begin  I := Low(TStopBits);  while (I <= High(TStopBits)) do  begin    if UpperCase(Str) = UpperCase(StopBitsToStr(TStopBits(I))) then      Break;    I := Succ(I);  end;  if I > High(TStopBits) then    Result := sbOne  else    Result := I;end; // string to data bitsfunction TFormMain.StrToDataBits(Str: string): TDataBits;var  I: TDataBits;begin  I := Low(TDataBits);  while (I <= High(TDataBits)) do  begin    if UpperCase(Str) = UpperCase(DataBitsToStr(I)) then      Break;    I := Succ(I);  end;  if I > High(TDataBits) then    Result := db8bits  else    Result := I;end; // string to parityfunction TFormMain.StrToParity(Str: string): TParity;var  I: TParity;begin  I := Low(TParity);  while (I <= High(TParity)) do  begin    if UpperCase(Str) = UpperCase(ParityToStr(I)) then      Break;    I := Succ(I);  end;  if I > High(TParity) then    Result := pNone  else    Result := I;end; // string to flow controlfunction TFormMain.StrToFlowControl(Str: string): TFlowControl;var  I: TFlowControl;begin  I := Low(TFlowControl);  while (I <= High(TFlowControl)) do  begin    if UpperCase(Str) = UpperCase(FlowControlToStr(I)) then      Break;    I := Succ(I);  end;  if I > High(TFlowControl) then    Result := fcNone  else    Result := I;end; function TFormMain.StopBitsToStr(StopBits: TStopBits): string;begin  Result := StopBitsStrings[StopBits];end; // data bits to stringfunction TFormMain.DataBitsToStr(DataBits: TDataBits): string;begin  Result := DataBitsStrings[DataBits];end;function TFormMain.ParityToStr(Parity: TParity): string;begin  Result := ParityBitsStrings[Parity];end;// flow control to stringfunction TFormMain.FlowControlToStr(FlowControl: TFlowControl): string;begin  Result := FlowControlStrings[FlowControl];end;  

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version