-
Notifications
You must be signed in to change notification settings - Fork 0
/
dmPositionControllerInterface.pas
68 lines (58 loc) · 2.18 KB
/
dmPositionControllerInterface.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
unit dmPositionControllerInterface;
interface
type
pPositionsVoltages = ^TPositionsVoltages;
TPositionsVoltages = record
VDD,
VC,
VAnalog,
VProg : Double;
TimeStamp : TDateTime;
procedure Assign(ASource : TPositionsVoltages); overload;
procedure Assign(ASource : pPositionsVoltages); overload;
end;
IdmPositionController = interface(IInterface)
['{F391175B-36E1-4B8C-9865-AD0CC6E8E4DC}']
function GetProtectState:Boolean;stdcall;
function GetEnabled:Boolean; stdcall;
procedure SetEnabled(Value : boolean); stdcall;
function GetProtectTimeStamp: TDateTime;stdcall;
function GetEnabledTimeStamp: TDateTime; stdcall;
property Enabled:Boolean read GetEnabled write SetEnabled;
property ProtectState:Boolean read GetProtectState;
property EnabledTimeStamp: TDateTime read GetEnabledTimeStamp;
property ProtectTimeStamp: TDateTime read GetProtectTimeStamp;
end;
IdmPositionsController = interface(IInterface)
['{3F14AF70-9BB5-406B-AB4D-D7AAAEE874A2}']
procedure GetVoltageValues(ADest : pPositionsVoltages); stdcall;
procedure SetVoltageValues(ASource : pPositionsVoltages);stdcall;
function GetProtectState(AIndex : word):Boolean;stdcall;
function GetEnabled(AIndex : word):Boolean;stdcall;
function GetProtectTimeStamp: TDateTime;stdcall;
function GetEnabledTimeStamp: TDateTime; stdcall;
procedure SetEnabled(AIndex : word; Value : boolean);stdcall;
property Enabled[AIndex : word]:Boolean read GetEnabled write SetEnabled;
property ProtectState[AIndex : word]:Boolean read GetProtectState;
property EnabledTimeStamp: TDateTime read GetEnabledTimeStamp;
property ProtectTimeStamp: TDateTime read GetProtectTimeStamp;
end;
implementation
{ TPositionsVoltages }
procedure TPositionsVoltages.Assign(ASource: pPositionsVoltages);
begin
VDD := ASource^.VDD;
VC := ASource^.VC;
VAnalog := ASource^.VAnalog;
VProg := ASource^.VProg;
TimeStamp := ASource^.TimeStamp;
end;
procedure TPositionsVoltages.Assign(ASource: TPositionsVoltages);
begin
VDD := ASource.VDD;
VC := ASource.VC;
VAnalog := ASource.VAnalog;
VProg := ASource.VProg;
TimeStamp := ASource.TimeStamp;
end;
end.