[Lazarus] Undefined value in SdpoSerial

Bo Berglund bo.berglund at gmail.com
Tue Nov 2 18:59:14 CET 2010

On Tue, 02 Nov 2010 14:23:33 +0000, Paulo Costa <paco at fe.up.pt> wrote:

>On 02/11/2010 07:20, Bo Berglund wrote:
>> I am working on a serial communications class and I have been adviced
>> to use the 5dpo component.
>> But when I am writing the initialization part of my class I discovered
>> that there is a field value defined and used that does not get an
>> initialization value...
> From the source code:
>constructor TSdpoSerial.Create(AOwner: TComponent);
>   inherited;
>   ...
>   FHardflow:=false;
>   FSoftflow:=false;
>   FFlowControl:=fcNone;
>   ...

The top line of my file reads:

{ SdpoSerial v0.1.3 

Here is the constructor from my file:

constructor TSdpoSerial.Create(AOwner: TComponent);
//  FBaudRate:=br115200;

As you can see there is no sig of any flow control setting.
And I did not put in the comments...

>> The flowcontrol is set by FSoftflow and FHardflow but there is no
>> place in the 5dpo code where these fields are initialized to some
>> valid value.
>> And they are not exposed in a setter or getter either.
>> Why?
>     property FlowControl: TFlowControl read FFlowControl write 
>FSoftflow and FHardflow are set/reset by flowcontrol and it is exposed.

Again here is from my source file:

    property Active: boolean read FActive write SetActive;

    property BaudRate: TBaudRate read FBaudRate write SetBaudRate; //
default br115200;
    property DataBits: TDataBits read FDataBits write SetDataBits;
    property Parity: TParity read FParity write SetParity;
//    property FlowControl: TFlowControl read FFlowControl write
    property StopBits: TStopBits read FStopBits write SetStopBits;
    property SynSer: TBlockSerial read FSynSer write FSynSer;
    property Device: string read FDevice write FDevice;

    property OnRxData: TNotifyEvent read FOnRxData write FOnRxData;

As you can see the property FlowControl has been commented out...

The file date is 2010-03-30 and it comes from a download I did some
weeks ago. I am trying hard to find it right now...

Bo Berglund
Developer in Sweden

More information about the Lazarus mailing list