source: branches/ByteArray/Channel.pas

Last change on this file was 9, checked in by chronos, 2 months ago
  • Modified: Optimized DeviceMapper read/write handlers calls without case statement.
  • Modified: Use TInt as base data type which can be redefined to different higher integer type. For start it is Int64.
File size: 481 bytes
Line 
1unit Channel;
2
3interface
4
5uses
6 Classes, SysUtils, Int;
7
8type
9 TChannel = class
10 type
11 TRead = function (Address: TInt; DataSize: TIntSize): TInt of object;
12 TWrite = procedure (Address: TInt; DataSize: TIntSize; Value: TInt) of object;
13 TGetSize = function : TInt of object;
14 var
15 Read: TRead;
16 Write: TWrite;
17 GetSize: TGetSize;
18 end;
19
20 TChannelDevice = class
21 procedure SetChannel(Channel: TChannel); virtual; abstract;
22 end;
23
24
25implementation
26
27end.
28
Note: See TracBrowser for help on using the repository browser.