⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ca200srvrlib_tlb.pas

📁 采用PC控制Ca210彩色分析仪
💻 PAS
📖 第 1 页 / 共 5 页
字号:
    FIntf:        ICas;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TCasProperties;
    function      GetServerProperties: TCasProperties;
{$ENDIF}
    function      GetDefaultInterface: ICas;
  protected
    procedure InitServerData; override;
    function Get_Item(IndexVal: OleVariant): ICa;
    function Get_Count: Integer;
    function Get_ItemOfNumber(CaNumberVal: Integer): ICa;
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: ICas);
    procedure Disconnect; override;
    procedure SendMsr;
    procedure ReceiveMsr;
    procedure SetCaID(CaNumberVal: Integer; const CaIDVal: WideString);
    property DefaultInterface: ICas read GetDefaultInterface;
    property Item[IndexVal: OleVariant]: ICa read Get_Item; default;
    property Count: Integer read Get_Count;
    property ItemOfNumber[CaNumberVal: Integer]: ICa read Get_ItemOfNumber;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TCasProperties read GetServerProperties;
{$ENDIF}
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TCas
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TCasProperties = class(TPersistent)
  private
    FServer:    TCas;
    function    GetDefaultInterface: ICas;
    constructor Create(AServer: TCas);
  protected
    function Get_Item(IndexVal: OleVariant): ICa;
    function Get_Count: Integer;
    function Get_ItemOfNumber(CaNumberVal: Integer): ICa;
  public
    property DefaultInterface: ICas read GetDefaultInterface;
  published
  end;
{$ENDIF}


// *********************************************************************//
// The Class CoCa provides a Create and CreateRemote method to          
// create instances of the default interface ICa exposed by              
// the CoClass Ca. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CoCa = class
    class function Create: ICa;
    class function CreateRemote(const MachineName: string): ICa;
  end;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TCa
// Help String      : Ca Class
// Default Interface: ICa
// Def. Intf. DISP? : No
// Event   Interface: _ICaEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TCaProperties= class;
{$ENDIF}
  TCa = class(TOleServer)
  private
    FOnExeCalZero: TNotifyEvent;
    FIntf:        ICa;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TCaProperties;
    function      GetServerProperties: TCaProperties;
{$ENDIF}
    function      GetDefaultInterface: ICa;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_Probes: IProbes;
    function Get_OutputProbes: IOutputProbes;
    function Get_Memory: IMemory;
    function Get_DisplayProbe: WideString;
    procedure Set_DisplayProbe(const DisplayProbeVal: WideString);
    function Get_SingleProbe: IProbe;
    function Get_SyncMode: Single;
    procedure Set_SyncMode(SyncModeVal: Single);
    function Get_DisplayMode: Integer;
    procedure Set_DisplayMode(DisplayModeVal: Integer);
    function Get_DisplayDigits: Integer;
    procedure Set_DisplayDigits(DisplayDigitsVal: Integer);
    function Get_AveragingMode: Integer;
    procedure Set_AveragingMode(AveragingModeVal: Integer);
    function Get_BrightnessUnit: Integer;
    procedure Set_BrightnessUnit(BrightnessUnitVal: Integer);
    function Get_CAType: WideString;
    function Get_CAVersion: WideString;
    function Get_Number: Integer;
    function Get_PortID: WideString;
    function Get_ID: WideString;
    procedure Set_ID(const CaIDVal: WideString);
    function Get_CalStandard: Integer;
    procedure Set_CalStandard(CalStandardVal: Integer);
    procedure Set_RemoteMode(Param1: Integer);
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: ICa);
    procedure Disconnect; override;
    procedure CalZero;
    procedure Measure(newVal: Integer);
    procedure SetAnalyzerCalMode;
    procedure Enter;
    procedure SetAnalogRange(Range1Val: Single; Range2Val: Single);
    procedure SetPWROnStatus;
    procedure ResetAnalyzerCalMode;
    procedure SetLvxyCalMode;
    procedure ResetLvxyCalMode;
    procedure SetAnalyzerCalData(ColorVal: Integer);
    procedure SetDisplayProbe(ProbeNumberVal: Integer);
    procedure SetLvxyCalData(ColorVal: Integer; XVal: Single; YVal: Single; LvVal: Single);
    procedure SetFMAAnalogRange(RangeVal: Single);
    procedure GetAnalogRange(out Range1Val: Single; out Range2Val: Single);
    procedure GetFMAAnalogRange(out RangeVal: Single);
    property DefaultInterface: ICa read GetDefaultInterface;
    property Probes: IProbes read Get_Probes;
    property OutputProbes: IOutputProbes read Get_OutputProbes;
    property Memory: IMemory read Get_Memory;
    property SingleProbe: IProbe read Get_SingleProbe;
    property CAType: WideString read Get_CAType;
    property CAVersion: WideString read Get_CAVersion;
    property Number: Integer read Get_Number;
    property PortID: WideString read Get_PortID;
    property RemoteMode: Integer write Set_RemoteMode;
    property DisplayProbe: WideString read Get_DisplayProbe write Set_DisplayProbe;
    property SyncMode: Single read Get_SyncMode write Set_SyncMode;
    property DisplayMode: Integer read Get_DisplayMode write Set_DisplayMode;
    property DisplayDigits: Integer read Get_DisplayDigits write Set_DisplayDigits;
    property AveragingMode: Integer read Get_AveragingMode write Set_AveragingMode;
    property BrightnessUnit: Integer read Get_BrightnessUnit write Set_BrightnessUnit;
    property ID: WideString read Get_ID write Set_ID;
    property CalStandard: Integer read Get_CalStandard write Set_CalStandard;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TCaProperties read GetServerProperties;
{$ENDIF}
    property OnExeCalZero: TNotifyEvent read FOnExeCalZero write FOnExeCalZero;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TCa
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TCaProperties = class(TPersistent)
  private
    FServer:    TCa;
    function    GetDefaultInterface: ICa;
    constructor Create(AServer: TCa);
  protected
    function Get_Probes: IProbes;
    function Get_OutputProbes: IOutputProbes;
    function Get_Memory: IMemory;
    function Get_DisplayProbe: WideString;
    procedure Set_DisplayProbe(const DisplayProbeVal: WideString);
    function Get_SingleProbe: IProbe;
    function Get_SyncMode: Single;
    procedure Set_SyncMode(SyncModeVal: Single);
    function Get_DisplayMode: Integer;
    procedure Set_DisplayMode(DisplayModeVal: Integer);
    function Get_DisplayDigits: Integer;
    procedure Set_DisplayDigits(DisplayDigitsVal: Integer);
    function Get_AveragingMode: Integer;
    procedure Set_AveragingMode(AveragingModeVal: Integer);
    function Get_BrightnessUnit: Integer;
    procedure Set_BrightnessUnit(BrightnessUnitVal: Integer);
    function Get_CAType: WideString;
    function Get_CAVersion: WideString;
    function Get_Number: Integer;
    function Get_PortID: WideString;
    function Get_ID: WideString;
    procedure Set_ID(const CaIDVal: WideString);
    function Get_CalStandard: Integer;
    procedure Set_CalStandard(CalStandardVal: Integer);
    procedure Set_RemoteMode(Param1: Integer);
  public
    property DefaultInterface: ICa read GetDefaultInterface;
  published
    property DisplayProbe: WideString read Get_DisplayProbe write Set_DisplayProbe;
    property SyncMode: Single read Get_SyncMode write Set_SyncMode;
    property DisplayMode: Integer read Get_DisplayMode write Set_DisplayMode;
    property DisplayDigits: Integer read Get_DisplayDigits write Set_DisplayDigits;
    property AveragingMode: Integer read Get_AveragingMode write Set_AveragingMode;
    property BrightnessUnit: Integer read Get_BrightnessUnit write Set_BrightnessUnit;
    property ID: WideString read Get_ID write Set_ID;
    property CalStandard: Integer read Get_CalStandard write Set_CalStandard;
  end;
{$ENDIF}


// *********************************************************************//
// The Class CoMemory provides a Create and CreateRemote method to          
// create instances of the default interface IMemory exposed by              
// the CoClass Memory. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CoMemory = class
    class function Create: IMemory;
    class function CreateRemote(const MachineName: string): IMemory;
  end;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TMemory
// Help String      : Memory Class
// Default Interface: IMemory
// Def. Intf. DISP? : No
// Event   Interface: 
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TMemoryProperties= class;
{$ENDIF}
  TMemory = class(TOleServer)
  private
    FIntf:        IMemory;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TMemoryProperties;
    function      GetServerProperties: TMemoryProperties;
{$ENDIF}
    function      GetDefaultInterface: IMemory;
  protected
    procedure InitServerData; override;
    function Get_ChannelNO: Integer;
    procedure Set_ChannelNO(ChannelNOVal: Integer);
    function Get_ChannelID: WideString;
    procedure Set_ChannelID(const ChannelIDVal: WideString);
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IMemory);
    procedure Disconnect; override;
    procedure GetReferenceColor(const ProbeIDVal: WideString; out XVal: Single; out YVal: Single; 
                                out LvVal: Single);
    procedure SetChannelID(const ChannelIDVal: WideString);
    procedure GetMemoryStatus(ProbeNOVal: Integer; out CalProbeSNOVal: Integer; 
                              out RefProbeSNOVal: Integer; out CalModeVal: Integer);
    function CheckCalData(ProbeNOVal: Integer; const FileNameVal: WideString): Integer;
    procedure CopyToFile(ProbeNOVal: Integer; const FileNameVal: WideString);
    procedure CopyFromFile(ProbeNOVal: Integer; const FileNameVal: WideString);
    property DefaultInterface: IMemory read GetDefaultInterface;
    property ChannelNO: Integer read Get_ChannelNO write Set_ChannelNO;
    property ChannelID: WideString read Get_ChannelID write Set_ChannelID;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TMemoryProperties read GetServerProperties;
{$ENDIF}
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TMemory
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TMemoryProperties = class(TPersistent)
  private
    FServer:    TMemory;
    function    GetDefaultInterface: IMemory;
    constructor Create(AServer: TMemory);
  protected
    function Get_ChannelNO: Integer;
    procedure Set_ChannelNO(ChannelNOVal: Integer);
    function Get_ChannelID: WideString;
    procedure Set_ChannelID(const ChannelIDVal: WideString);
  public
    property DefaultInterface: IMemory read GetDefaultInterface;
  published
    property ChannelNO: Integer read Get_ChannelNO write Set_ChannelNO;
    property ChannelID: WideString read Get_ChannelID write Set_ChannelID;
  end;
{$ENDIF}


// *********************************************************************//
// The Class CoProbes provides a Create and CreateRemote method to          
// create instances of the default interface IProbes exposed by              
// the CoClass Probes. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CoProbes = class
    class function Create: IProbes;
    class function CreateRemote(const MachineName: string): IProbes;
  end;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TProbes
// Help String      : Probes Class
// Default Interface: IProbes
// Def. Intf. DISP? : No
// Event   Interface: 
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TProbesProperties= class;
{$ENDIF}
  TProbes = class(TOleServer)
  private
    FIntf:        IProbes;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TProbesProperties;
    function      GetServerProperties: TProbesProperties;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -