unit ULDRObju;
{ Generated by MakeComp 1.03 from ULDRTYPE.PAS. Don't modify manually !!! }
interface
uses Classes, SysUtils, Graphics, UlanType, ULRecTyp, ULObju, 
  ModuType,ULDPType,
  ULDRType;

type
  TULDRObj = class(TULObj)
  protected
    function GetAddrStr: TModuleAddrStr;
    procedure SetAddrStr(AAddrStr: TModuleAddrStr);
    function GetIDName: string;
    procedure SetIDName(AIDName: string);
    function GetDeviceName: TDeviceName;
    procedure SetDeviceName(ADeviceName: TDeviceName);
    function GetDeviceMode: TDeviceMode;
    procedure SetDeviceMode(ADeviceMode: TDeviceMode);
    function GetDeviceType: TDeviceType;
    procedure SetDeviceType(ADeviceType: TDeviceType);
    function GetIDDesc: string;
    procedure SetIDDesc(AIDDesc: string);
    function GetExtDevDrvName: TExtDevDrvName;
    procedure SetExtDevDrvName(AExtDevDrvName: TExtDevDrvName);
    function GetDevicePortName: TDevicePortName;
    procedure SetDevicePortName(ADevicePortName: TDevicePortName);
    function GetSerialNumber: integer;
    procedure SetSerialNumber(ASerialNumber: integer);
    function GetDetectState: TModuleDetectState;
    procedure SetDetectState(ADetectState: TModuleDetectState);
    function GetAliveTimeout: TAcqTime;
    procedure SetAliveTimeout(AAliveTimeout: TAcqTime);
    function GetMinRecLen: TULRecLen; override;
  public
    constructor Create(AOwner:TULObj);
    function GetULRecDesc: PULRecDesc; override;
  published
    property AddrStr: TModuleAddrStr
      read GetAddrStr write SetAddrStr;
    property IDName: string
      read GetIDName write SetIDName;
    property DeviceName: TDeviceName
      read GetDeviceName write SetDeviceName;
    property DeviceMode: TDeviceMode
      read GetDeviceMode write SetDeviceMode;
    property DeviceType: TDeviceType
      read GetDeviceType write SetDeviceType;
    property IDDesc: string
      read GetIDDesc write SetIDDesc;
    property ExtDevDrvName: TExtDevDrvName
      read GetExtDevDrvName write SetExtDevDrvName;
    property DevicePortName: TDevicePortName
      read GetDevicePortName write SetDevicePortName;
    property SerialNumber: integer
      read GetSerialNumber write SetSerialNumber;
    property DetectState: TModuleDetectState
      read GetDetectState write SetDetectState;
    property AliveTimeout: TAcqTime
      read GetAliveTimeout write SetAliveTimeout;
  end;

const
  ULDRChildRecIDs: array[0..0] of TULRecID = (
    ULDPID
  );
     FieldColors9 : array[0..4] of TULFieldColor = (
      (clGray,clWhite),
      (clGray,clWhite),
      (clWhite,clRed),
      (clGreen,clWhite),
      (clBlack,clGray)
     );

  ULDRFldDescs: array[0..10] of TULFldDesc = (
    (
     Caption: '';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4096;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'AddrStr';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TModuleAddrStr';
    ),
    (
     Caption: '';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4096;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'IDName';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'string';
    ),
    (
     Caption: '';
     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: 'DeviceName';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TDeviceName';
    ),
    (
     Caption: '';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: 'dm';
     EditMask: '';
     MaxID: 0;
     FieldName: 'DeviceMode';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TDeviceMode';
    ),
    (
     Caption: '';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: 'dt';
     EditMask: '';
     MaxID: 0;
     FieldName: 'DeviceType';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TDeviceType';
    ),
    (
     Caption: '';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4096;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'IDDesc';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'string';
    ),
    (
     Caption: '';
     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: 'ExtDevDrvName';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TExtDevDrvName';
    ),
    (
     Caption: '';
     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: 'DevicePortName';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TDevicePortName';
    ),
    (
     Caption: '';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 2;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'SerialNumber';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'integer';
    ),
    (
     Caption: 'State';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4096;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 5;
     FieldColors : @FieldColors9;
     Filter: '';
     DefDir: '';
     StripPrefix: 'ds';
     EditMask: '';
     MaxID: 0;
     FieldName: 'DetectState';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TModuleDetectState';
    ),
    (
     Caption: 'Alive timeout[s]';
     Hint: 'For how long to wait for answer from module';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'AliveTimeout';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TAcqTime';
    )
  );

  ULDRRecDesc: TULRecDesc = (
    Caption: 'Device';
    ChildRecIDsStr: 'ULDPID';
    ChildRecIDs: @ULDRChildRecIDs;
    ChildRecIDCount: 1;
    FldCount: 11;
    Flds: @ULDRFldDescs;
    Flags: rfChildAllowed OR rfHasRecName OR rfUsingColors OR rfEnabled OR rfVisible;
    SortExp: '';
    EditFieldList: '';
    BrowseFieldList: 'IDDesc,DetectState,DeviceName,DeviceMode,DeviceType,ExtDevDrvName,DevicePortName';
    MenuFieldList: '';
    BrowseChildRecIDs: '';
    NameProp: 'DeviceName';
    MainProp: '';
    DefDir: '';
    OpenFilter: '';
    SaveFilter: '';
    Table: '';
    Indexes: ''
   );

implementation

{TULDRObj}
function TULDRObj.GetMinRecLen: TULRecLen;
begin
  GetMinRecLen := sizeof(TULDRRec);
end;

constructor TULDRObj.Create(AOwner: TULObj);
begin
  inherited Create(TComponent(AOwner), ULDRID);
end;

function TULDRObj.GetULRecDesc: PULRecDesc;
begin
  Result := @ULDRRecDesc;
end;

procedure TULDRObj.SetAddrStr(AAddrStr: TModuleAddrStr);
begin
  if PULDRRec(Rec)^.AddrStr <> AAddrStr then begin
    PULDRRec(Rec)^.AddrStr := AAddrStr;
    if ULDRFldDescs[0].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TULDRObj.GetAddrStr: TModuleAddrStr;
begin
  GetAddrStr := PULDRRec(Rec)^.AddrStr;
end;

procedure TULDRObj.SetIDName(AIDName: string);
begin
  if PULDRRec(Rec)^.IDName <> AIDName then begin
    PULDRRec(Rec)^.IDName := AIDName;
    if ULDRFldDescs[1].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TULDRObj.GetIDName: string;
begin
  GetIDName := PULDRRec(Rec)^.IDName;
end;

procedure TULDRObj.SetDeviceName(ADeviceName: TDeviceName);
begin
  if PULDRRec(Rec)^.DeviceName <> ADeviceName then begin
    PULDRRec(Rec)^.DeviceName := ADeviceName;
    if ULDRFldDescs[2].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TULDRObj.GetDeviceName: TDeviceName;
begin
  GetDeviceName := PULDRRec(Rec)^.DeviceName;
end;

procedure TULDRObj.SetDeviceMode(ADeviceMode: TDeviceMode);
begin
  if PULDRRec(Rec)^.DeviceMode <> ADeviceMode then begin
    PULDRRec(Rec)^.DeviceMode := ADeviceMode;
    if ULDRFldDescs[3].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TULDRObj.GetDeviceMode: TDeviceMode;
begin
  GetDeviceMode := PULDRRec(Rec)^.DeviceMode;
end;

procedure TULDRObj.SetDeviceType(ADeviceType: TDeviceType);
begin
  if PULDRRec(Rec)^.DeviceType <> ADeviceType then begin
    PULDRRec(Rec)^.DeviceType := ADeviceType;
    if ULDRFldDescs[4].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TULDRObj.GetDeviceType: TDeviceType;
begin
  GetDeviceType := PULDRRec(Rec)^.DeviceType;
end;

procedure TULDRObj.SetIDDesc(AIDDesc: string);
begin
  if PULDRRec(Rec)^.IDDesc <> AIDDesc then begin
    PULDRRec(Rec)^.IDDesc := AIDDesc;
    if ULDRFldDescs[5].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TULDRObj.GetIDDesc: string;
begin
  GetIDDesc := PULDRRec(Rec)^.IDDesc;
end;

procedure TULDRObj.SetExtDevDrvName(AExtDevDrvName: TExtDevDrvName);
begin
  if PULDRRec(Rec)^.ExtDevDrvName <> AExtDevDrvName then begin
    PULDRRec(Rec)^.ExtDevDrvName := AExtDevDrvName;
    if ULDRFldDescs[6].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TULDRObj.GetExtDevDrvName: TExtDevDrvName;
begin
  GetExtDevDrvName := PULDRRec(Rec)^.ExtDevDrvName;
end;

procedure TULDRObj.SetDevicePortName(ADevicePortName: TDevicePortName);
begin
  if PULDRRec(Rec)^.DevicePortName <> ADevicePortName then begin
    PULDRRec(Rec)^.DevicePortName := ADevicePortName;
    if ULDRFldDescs[7].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TULDRObj.GetDevicePortName: TDevicePortName;
begin
  GetDevicePortName := PULDRRec(Rec)^.DevicePortName;
end;

procedure TULDRObj.SetSerialNumber(ASerialNumber: integer);
begin
  if PULDRRec(Rec)^.SerialNumber <> ASerialNumber then begin
    PULDRRec(Rec)^.SerialNumber := ASerialNumber;
    if ULDRFldDescs[8].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TULDRObj.GetSerialNumber: integer;
begin
  GetSerialNumber := PULDRRec(Rec)^.SerialNumber;
end;

procedure TULDRObj.SetDetectState(ADetectState: TModuleDetectState);
begin
  if PULDRRec(Rec)^.DetectState <> ADetectState then begin
    PULDRRec(Rec)^.DetectState := ADetectState;
    if ULDRFldDescs[9].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TULDRObj.GetDetectState: TModuleDetectState;
begin
  GetDetectState := PULDRRec(Rec)^.DetectState;
end;

procedure TULDRObj.SetAliveTimeout(AAliveTimeout: TAcqTime);
begin
  if PULDRRec(Rec)^.AliveTimeout <> AAliveTimeout then begin
    PULDRRec(Rec)^.AliveTimeout := AAliveTimeout;
    if ULDRFldDescs[10].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TULDRObj.GetAliveTimeout: TAcqTime;
begin
  GetAliveTimeout := PULDRRec(Rec)^.AliveTimeout;
end;

{/TULDRObj}

end.
