unit USPTObju;
{ Generated by MakeComp 1.03 from USPTTYPE.PAS. Don't modify manually !!! }
interface
uses Classes, SysUtils, Graphics, UlanType, ULRecTyp, ULObju, 
  USPTType;

type
  TUSPTObj = class(TULObj)
  protected
    function GetPrgTime: TAcqTime;
    procedure SetPrgTime(APrgTime: TAcqTime);
    function GetCommand: TSeqCommand;
    procedure SetCommand(ACommand: TSeqCommand);
    function GetScript: TScriptName;
    procedure SetScript(AScript: TScriptName);
    function GetParam1: TScriptParam;
    procedure SetParam1(AParam1: TScriptParam);
    function GetParam2: TScriptParam;
    procedure SetParam2(AParam2: TScriptParam);
    function GetParam3: TScriptParam;
    procedure SetParam3(AParam3: TScriptParam);
    function GetNote: TPrgLineNote;
    procedure SetNote(ANote: TPrgLineNote);
    function GetState: TPrgLineState;
    procedure SetState(AState: TPrgLineState);
    function GetDuration: TAcqTime;
    procedure SetDuration(ADuration: TAcqTime);
    function GetMinRecLen: TULRecLen; override;
  public
    constructor Create(AOwner:TULObj);
    function GetULRecDesc: PULRecDesc; override;
    function GetSortNum: extended; override;
  published
    property PrgTime: TAcqTime
      read GetPrgTime write SetPrgTime;
    property Command: TSeqCommand
      read GetCommand write SetCommand;
    property Script: TScriptName
      read GetScript write SetScript;
    property Param1: TScriptParam
      read GetParam1 write SetParam1;
    property Param2: TScriptParam
      read GetParam2 write SetParam2;
    property Param3: TScriptParam
      read GetParam3 write SetParam3;
    property Note: TPrgLineNote
      read GetNote write SetNote;
    property State: TPrgLineState
      read GetState write SetState;
    property Duration: TAcqTime
      read GetDuration write SetDuration;
  end;

const
     FieldColors7 : array[0..5] of TULFieldColor = (
      (clBlack,clWhite),
      (clWhite,clGreen),
      (clBlack,clYellow),
      (clBlack,clGray),
      (clWhite,clRed),
      (clBlack,clWhite)
     );

  USPTFldDescs: array[0..8] of TULFldDesc = (
    (
     Caption: 'Time [min]';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 6145;
     UserCoef: 60.00;
     NumDec: 2;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'PrgTime';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TAcqTime';
    ),
    (
     Caption: 'Internal command';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: 'sc';
     EditMask: '';
     MaxID: 0;
     FieldName: 'Command';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TSeqCommand';
    ),
    (
     Caption: 'Script';
     Hint: 'Name of the script to be run at the Time';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4133;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: 'Scripts (*.IFS)|*.IFS';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'Script';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TScriptName';
    ),
    (
     Caption: '1st param.';
     Hint: 'First script command line parameter';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'Param1';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TScriptParam';
    ),
    (
     Caption: '2nd param.';
     Hint: 'Second script command line parameter';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'Param2';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TScriptParam';
    ),
    (
     Caption: '3rd param.';
     Hint: 'Third script command line parameter';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'Param3';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TScriptParam';
    ),
    (
     Caption: 'Note';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'Note';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TPrgLineNote';
    ),
    (
     Caption: '';
     Hint: 'State of the program line';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4096;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 6;
     FieldColors : @FieldColors7;
     Filter: '';
     DefDir: '';
     StripPrefix: 'pls';
     EditMask: '';
     MaxID: 0;
     FieldName: 'State';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TPrgLineState';
    ),
    (
     Caption: 'Duration [min]';
     Hint: 'What time interval this program line should run';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 60.00;
     NumDec: 2;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'Duration';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TAcqTime';
    )
  );

  USPTRecDesc: TULRecDesc = (
    Caption: 'Seq.Prg.Line';
    ChildRecIDsStr: '';
    ChildRecIDs: nil;
    ChildRecIDCount: 0;
    FldCount: 9;
    Flds: @USPTFldDescs;
    Flags: rfUsingColors OR rfEnabled OR rfEditModal OR rfVisible OR rfSortedByNumber;
    SortExp: 'PrgTime';
    EditFieldList: '';
    BrowseFieldList: '';
    MenuFieldList: '';
    BrowseChildRecIDs: '';
    NameProp: '';
    MainProp: '';
    DefDir: '';
    OpenFilter: '';
    SaveFilter: '';
    Table: '';
    Indexes: ''
   );

implementation

{TUSPTObj}
function TUSPTObj.GetMinRecLen: TULRecLen;
begin
  GetMinRecLen := sizeof(TUSPTRec);
end;

constructor TUSPTObj.Create(AOwner: TULObj);
begin
  inherited Create(TComponent(AOwner), USPTID);
end;

function TUSPTObj.GetULRecDesc: PULRecDesc;
begin
  Result := @USPTRecDesc;
end;

function TUSPTObj.GetSortNum: Extended;
begin
  Result := PrgTime;
end;
procedure TUSPTObj.SetPrgTime(APrgTime: TAcqTime);
begin
  if PUSPTRec(Rec)^.PrgTime <> APrgTime then begin
    PUSPTRec(Rec)^.PrgTime := APrgTime;
    if USPTFldDescs[0].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUSPTObj.GetPrgTime: TAcqTime;
begin
  GetPrgTime := PUSPTRec(Rec)^.PrgTime;
end;

procedure TUSPTObj.SetCommand(ACommand: TSeqCommand);
begin
  if PUSPTRec(Rec)^.Command <> ACommand then begin
    PUSPTRec(Rec)^.Command := ACommand;
    if USPTFldDescs[1].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUSPTObj.GetCommand: TSeqCommand;
begin
  GetCommand := PUSPTRec(Rec)^.Command;
end;

procedure TUSPTObj.SetScript(AScript: TScriptName);
begin
  if PUSPTRec(Rec)^.Script <> AScript then begin
    PUSPTRec(Rec)^.Script := AScript;
    if USPTFldDescs[2].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUSPTObj.GetScript: TScriptName;
begin
  GetScript := PUSPTRec(Rec)^.Script;
end;

procedure TUSPTObj.SetParam1(AParam1: TScriptParam);
begin
  if PUSPTRec(Rec)^.Param1 <> AParam1 then begin
    PUSPTRec(Rec)^.Param1 := AParam1;
    if USPTFldDescs[3].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUSPTObj.GetParam1: TScriptParam;
begin
  GetParam1 := PUSPTRec(Rec)^.Param1;
end;

procedure TUSPTObj.SetParam2(AParam2: TScriptParam);
begin
  if PUSPTRec(Rec)^.Param2 <> AParam2 then begin
    PUSPTRec(Rec)^.Param2 := AParam2;
    if USPTFldDescs[4].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUSPTObj.GetParam2: TScriptParam;
begin
  GetParam2 := PUSPTRec(Rec)^.Param2;
end;

procedure TUSPTObj.SetParam3(AParam3: TScriptParam);
begin
  if PUSPTRec(Rec)^.Param3 <> AParam3 then begin
    PUSPTRec(Rec)^.Param3 := AParam3;
    if USPTFldDescs[5].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUSPTObj.GetParam3: TScriptParam;
begin
  GetParam3 := PUSPTRec(Rec)^.Param3;
end;

procedure TUSPTObj.SetNote(ANote: TPrgLineNote);
begin
  if PUSPTRec(Rec)^.Note <> ANote then begin
    PUSPTRec(Rec)^.Note := ANote;
    if USPTFldDescs[6].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUSPTObj.GetNote: TPrgLineNote;
begin
  GetNote := PUSPTRec(Rec)^.Note;
end;

procedure TUSPTObj.SetState(AState: TPrgLineState);
begin
  if PUSPTRec(Rec)^.State <> AState then begin
    PUSPTRec(Rec)^.State := AState;
    if USPTFldDescs[7].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUSPTObj.GetState: TPrgLineState;
begin
  GetState := PUSPTRec(Rec)^.State;
end;

procedure TUSPTObj.SetDuration(ADuration: TAcqTime);
begin
  if PUSPTRec(Rec)^.Duration <> ADuration then begin
    PUSPTRec(Rec)^.Duration := ADuration;
    if USPTFldDescs[8].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUSPTObj.GetDuration: TAcqTime;
begin
  GetDuration := PUSPTRec(Rec)^.Duration;
end;

{/TUSPTObj}

end.
