- Timestamp:
- May 25, 2010, 1:51:46 PM (15 years ago)
- Location:
- Comm
- Files:
-
- 1 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Comm/UCommFrame.pas
r23 r26 7 7 uses 8 8 Classes, UMemoryStreamEx, Dialogs, SysUtils, 9 Forms, U Pin;9 Forms, UCommPin; 10 10 11 11 const … … 28 28 function GetStreamCRC8(Stream: TStream): Byte; 29 29 public 30 RawDataPin: T Pin;31 FrameDataPin: T Pin;30 RawDataPin: TCommPin; 31 FrameDataPin: TCommPin; 32 32 PacketLoss: Real; 33 33 procedure RawDataReceive(Stream: TStream); … … 47 47 begin 48 48 ReceiveBuffer := TMemoryStreamEx.Create; 49 RawDataPin := T Pin.Create;49 RawDataPin := TCommPin.Create; 50 50 RawDataPin.OnReceive := RawDataReceive; 51 FrameDataPin := T Pin.Create;51 FrameDataPin := TCommPin.Create; 52 52 FrameDataPin.OnReceive := FrameDataReceive; 53 53 PacketLoss := 0.005; -
Comm/UCommSerialPort.pas
r23 r26 6 6 7 7 uses 8 Classes, USerialPort, U Pin, SysUtils;8 Classes, USerialPort, UCommPin, SysUtils; 9 9 10 10 type … … 16 16 procedure ReceiveData(Stream: TMemoryStream); 17 17 public 18 DataPin: T Pin;18 DataPin: TCommPin; 19 19 destructor Destroy; override; 20 20 constructor Create; … … 38 38 begin 39 39 inherited; 40 DataPin := T Pin.Create;40 DataPin := TCommPin.Create; 41 41 DataPin.OnReceive := Receive; 42 42 OnReceiveData := ReceiveData; -
Comm/USerialPort.pas
r23 r26 48 48 function GetBaudRateNumeric: Integer; 49 49 function GetName: string; 50 function GetReceiveBuffer:TMemoryStream; 50 51 procedure SetBaudRate(const AValue: TBaudRate); 51 52 procedure SetBaudRateNumeric(const AValue: Integer); … … 70 71 property RTS: Boolean read FRTS write SetRTS; 71 72 property DTR: Boolean read FDTR write SetDTR; 73 property ReceiveBuffer: TMemoryStream read GetReceiveBuffer; 72 74 73 75 property BaudRateNumeric: Integer read GetBaudRateNumeric write SetBaudRateNumeric; … … 132 134 133 135 procedure TSerialPort.Open; 134 var135 DefaultCommConfig: COMMCONFIG;136 Size: LongWord;137 Port: PChar;138 136 begin 139 137 Connect(FName); … … 197 195 begin 198 196 Result := FName; 197 end; 198 199 function TSerialPort.GetReceiveBuffer:TMemoryStream; 200 begin 201 Result := FReceiveThread.Stream; 199 202 end; 200 203
Note:
See TracChangeset
for help on using the changeset viewer.