Changeset 272 for PinConnection/UCommProtocol.pas
- Timestamp:
- Aug 30, 2011, 3:50:15 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
PinConnection/UCommProtocol.pas
r268 r272 14 14 ECommTimeout = class(Exception); 15 15 ECommError = class(Exception); 16 ENotActive = class(Exception); 16 17 17 18 TResponseError = (rcNone, rcCommandNotSupported, rcSequenceOutOfRange, … … 118 119 SDeviceProtocol = 'Device protocol'; 119 120 SProtocolDecodeError = 'Data decode error'; 121 SProtocolNotActive = 'Device protocol not active'; 120 122 121 123 procedure TCommProtocol.DataReceive(Sender: TCommPin; Stream: TStream); … … 133 135 with Request do 134 136 try 137 Stream.Position := 0; 135 138 ReadFromStream(Stream); 136 139 if TestIndex(0) then … … 273 276 NewRequest: TVarBlockIndexed; 274 277 begin 278 if FActive then begin 275 279 try 276 280 Session := TDeviceProtocolSession.Create; … … 337 341 NewRequest.Free; 338 342 end; 343 end else raise ENotActive.Create(SProtocolNotActive); 339 344 end; 340 345
Note:
See TracChangeset
for help on using the changeset viewer.