Changeset 407 for PinConnection/UCommPin.pas
- Timestamp:
- Aug 14, 2012, 10:31:30 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
PinConnection/UCommPin.pas
r288 r407 6 6 7 7 uses 8 Classes ;8 Classes, SpecializedList; 9 9 10 10 type … … 12 12 13 13 TDataDiretion = (ddReceive, ddSend); 14 TOnLogDataEvent = procedure (Stream: T Stream; Direction: TDataDiretion) of object;15 TOnStreamEvent = procedure (Sender: TCommPin; Stream: T Stream) of object;14 TOnLogDataEvent = procedure (Stream: TListByte; Direction: TDataDiretion) of object; 15 TOnStreamEvent = procedure (Sender: TCommPin; Stream: TListByte) of object; 16 16 TOnSetStatus = procedure (Sender: TCommPin; Status: Integer) of object; 17 17 … … 31 31 procedure SetStatus(AValue: Integer); 32 32 protected 33 procedure Receive(Stream: T Stream);33 procedure Receive(Stream: TListByte); 34 34 procedure ReceiveStatus(AValue: Integer); 35 35 public … … 39 39 procedure Connect(Pin: TCommPin); 40 40 procedure Disconnect; 41 procedure Send(Stream: T Stream);41 procedure Send(Stream: TListByte); 42 42 procedure ResetCounters; 43 43 property Connected: Boolean read GetConnected; … … 100 100 end; 101 101 102 procedure TCommPin.Receive(Stream: T Stream);102 procedure TCommPin.Receive(Stream: TListByte); 103 103 begin 104 Inc(FDataRxCount, Stream. Size);104 Inc(FDataRxCount, Stream.Count); 105 105 Inc(FFrameRxCount); 106 106 if Assigned(FOnLogData) then FOnLogData(Stream, ddReceive); 107 Stream.Position := 0;108 107 if Assigned(FOnReceive) then FOnReceive(Self, Stream); 109 108 end; … … 122 121 end; 123 122 124 procedure TCommPin.Send(Stream: T Stream);123 procedure TCommPin.Send(Stream: TListByte); 125 124 begin 126 Inc(FDataTxCount, Stream. Size);125 Inc(FDataTxCount, Stream.Count); 127 126 Inc(FFrameTxCount); 128 127 if Assigned(FOnLogData) then FOnLogData(Stream, ddSend);
Note:
See TracChangeset
for help on using the changeset viewer.