unit PHIDGET_TLB;

// ************************************************************************ //
// WARNING                                                                    
// -------                                                                    
// The types declared in this file were generated from data read from a       
// Type Library. If this type library is explicitly or indirectly (via        
// another type library referring to this type library) re-imported, or the   
// 'Refresh' command of the Type Library Editor activated while editing the   
// Type Library, the contents of this file will be regenerated and all        
// manual modifications will be lost.                                         
// ************************************************************************ //

// PASTLWTR : 1.2
// File generated on 8/16/2006 10:37:00 AM from Type Library described below.

// ************************************************************************  //
// Type Lib: C:\Program Files\Phidgets\Phidget21COM.dll (1)
// LIBID: {50484945-4745-5453-0000-000000000000}
// LCID: 0
// Helpfile: 
// HelpString: Phidget Library 2.1
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINDOWS\system32\STDOLE2.TLB)
// Errors:
//   Error creating palette bitmap of (TPhidgetManager) : Server C:\Program Files\Phidgets\Phidget21COM.dll contains no icons
//   Error creating palette bitmap of (TPhidgetServo) : Server C:\Program Files\Phidgets\Phidget21COM.dll contains no icons
//   Error creating palette bitmap of (TPhidgetInterfaceKit) : Server C:\Program Files\Phidgets\Phidget21COM.dll contains no icons
//   Error creating palette bitmap of (TPhidgetRFID) : Server C:\Program Files\Phidgets\Phidget21COM.dll contains no icons
//   Error creating palette bitmap of (TPhidgetWeightSensor) : List index out of bounds (15)
//   Error creating palette bitmap of (TPhidgetTextLCD) : List index out of bounds (18)
//   Error creating palette bitmap of (TPhidgetMotorControl) : List index out of bounds (21)
//   Error creating palette bitmap of (TPhidgetAdvancedServo) : List index out of bounds (24)
//   Error creating palette bitmap of (TPhidgetLED) : List index out of bounds (27)
//   Error creating palette bitmap of (TPhidgetEncoder) : List index out of bounds (30)
//   Error creating palette bitmap of (TPhidgetStepper) : List index out of bounds (33)
//   Error creating palette bitmap of (TPhidgetTemperatureSensor) : List index out of bounds (36)
//   Error creating palette bitmap of (TPhidgetAccelerometer) : List index out of bounds (39)
//   Error creating palette bitmap of (TPhidgetTextLED) : List index out of bounds (42)
// ************************************************************************ //
// *************************************************************************//
// NOTE:                                                                      
// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties  
// which return objects that may need to be explicitly created via a function 
// call prior to any access via the property. These items have been disabled  
// in order to prevent accidental use from within the object inspector. You   
// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively   
// removing them from the $IFDEF blocks. However, such items must still be    
// programmatically created via a method of the appropriate CoClass before    
// they can be used.                                                          
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, Classes, Graphics, OleServer, StdVCL, Variants;
  

// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:        
//   Type Libraries     : LIBID_xxxx                                      
//   CoClasses          : CLASS_xxxx                                      
//   DISPInterfaces     : DIID_xxxx                                       
//   Non-DISP interfaces: IID_xxxx                                        
// *********************************************************************//
const
  // TypeLibrary Major and minor versions
  PHIDGETMajorVersion = 2;
  PHIDGETMinorVersion = 1;

  LIBID_PHIDGET: TGUID = '{50484945-4745-5453-0000-000000000000}';

  IID_IPhidget: TGUID = '{50484945-4745-5453-1000-000000000001}';
  IID_IPhidgetManager: TGUID = '{50484945-4745-5453-1000-000000000002}';
  DIID__IPhidgetManagerEvents: TGUID = '{50484945-4745-5453-2000-000000000002}';
  CLASS_PhidgetManager: TGUID = '{50484945-4745-5453-3000-000000000002}';
  IID_IPhidgetServo: TGUID = '{50484945-4745-5453-1000-000000000004}';
  DIID__IPhidgetServoEvents: TGUID = '{50484945-4745-5453-2000-000000000004}';
  CLASS_PhidgetServo: TGUID = '{50484945-4745-5453-3000-000000000004}';
  IID_IPhidgetInterfaceKit: TGUID = '{50484945-4745-5453-1000-000000000003}';
  DIID__IPhidgetInterfaceKitEvents: TGUID = '{50484945-4745-5453-2000-000000000003}';
  CLASS_PhidgetInterfaceKit: TGUID = '{50484945-4745-5453-3000-000000000003}';
  IID_IPhidgetRFID: TGUID = '{50484945-4745-5453-1000-000000000007}';
  DIID__IPhidgetRFIDEvents: TGUID = '{50484945-4745-5453-2000-000000000007}';
  CLASS_PhidgetRFID: TGUID = '{50484945-4745-5453-3000-000000000007}';
  IID_IPhidgetWeightSensor: TGUID = '{50484945-4745-5453-1000-000000000008}';
  DIID__IPhidgetWeightSensorEvents: TGUID = '{50484945-4745-5453-2000-000000000008}';
  CLASS_PhidgetWeightSensor: TGUID = '{50484945-4745-5453-3000-000000000008}';
  IID_IPhidgetTextLCD: TGUID = '{50484945-4745-5453-1000-00000000000A}';
  DIID__IPhidgetTextLCDEvents: TGUID = '{50484945-4745-5453-2000-00000000000A}';
  CLASS_PhidgetTextLCD: TGUID = '{50484945-4745-5453-3000-00000000000A}';
  IID_IPhidgetMotorControl: TGUID = '{50484945-4745-5453-1000-00000000000B}';
  DIID__IPhidgetMotorControlEvents: TGUID = '{50484945-4745-5453-2000-00000000000B}';
  CLASS_PhidgetMotorControl: TGUID = '{50484945-4745-5453-3000-00000000000B}';
  IID_IPhidgetAdvancedServo: TGUID = '{50484945-4745-5453-1000-00000000000C}';
  DIID__IPhidgetAdvancedServoEvents: TGUID = '{50484945-4745-5453-2000-00000000000C}';
  CLASS_PhidgetAdvancedServo: TGUID = '{50484945-4745-5453-3000-00000000000C}';
  IID_IPhidgetLED: TGUID = '{50484945-4745-5453-1000-00000000000D}';
  DIID__IPhidgetLEDEvents: TGUID = '{50484945-4745-5453-2000-00000000000D}';
  CLASS_PhidgetLED: TGUID = '{50484945-4745-5453-3000-00000000000D}';
  IID_IPhidgetEncoder: TGUID = '{50484945-4745-5453-1000-00000000000E}';
  DIID__IPhidgetEncoderEvents: TGUID = '{50484945-4745-5453-2000-00000000000E}';
  CLASS_PhidgetEncoder: TGUID = '{50484945-4745-5453-3000-00000000000E}';
  IID_IPhidgetStepper: TGUID = '{50484945-4745-5453-1000-00000000000F}';
  DIID__IPhidgetStepperEvents: TGUID = '{50484945-4745-5453-2000-00000000000F}';
  CLASS_PhidgetStepper: TGUID = '{50484945-4745-5453-3000-00000000000F}';
  IID_IPhidgetTemperatureSensor: TGUID = '{50484945-4745-5453-1000-000000000010}';
  DIID__IPhidgetTemperatureSensorEvents: TGUID = '{50484945-4745-5453-2000-000000000010}';
  CLASS_PhidgetTemperatureSensor: TGUID = '{50484945-4745-5453-3000-000000000010}';
  IID_IPhidgetAccelerometer: TGUID = '{50484945-4745-5453-1000-000000000011}';
  DIID__IPhidgetAccelerometerEvents: TGUID = '{50484945-4745-5453-2000-000000000011}';
  CLASS_PhidgetAccelerometer: TGUID = '{50484945-4745-5453-3000-000000000011}';
  IID_IPhidgetTextLED: TGUID = '{50484945-4745-5453-1000-000000000012}';
  DIID__IPhidgetTextLEDEvents: TGUID = '{50484945-4745-5453-2000-000000000012}';
  CLASS_PhidgetTextLED: TGUID = '{50484945-4745-5453-3000-000000000012}';
type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  IPhidget = interface;
  IPhidgetDisp = dispinterface;
  IPhidgetManager = interface;
  IPhidgetManagerDisp = dispinterface;
  _IPhidgetManagerEvents = dispinterface;
  IPhidgetServo = interface;
  IPhidgetServoDisp = dispinterface;
  _IPhidgetServoEvents = dispinterface;
  IPhidgetInterfaceKit = interface;
  IPhidgetInterfaceKitDisp = dispinterface;
  _IPhidgetInterfaceKitEvents = dispinterface;
  IPhidgetRFID = interface;
  IPhidgetRFIDDisp = dispinterface;
  _IPhidgetRFIDEvents = dispinterface;
  IPhidgetWeightSensor = interface;
  IPhidgetWeightSensorDisp = dispinterface;
  _IPhidgetWeightSensorEvents = dispinterface;
  IPhidgetTextLCD = interface;
  IPhidgetTextLCDDisp = dispinterface;
  _IPhidgetTextLCDEvents = dispinterface;
  IPhidgetMotorControl = interface;
  IPhidgetMotorControlDisp = dispinterface;
  _IPhidgetMotorControlEvents = dispinterface;
  IPhidgetAdvancedServo = interface;
  IPhidgetAdvancedServoDisp = dispinterface;
  _IPhidgetAdvancedServoEvents = dispinterface;
  IPhidgetLED = interface;
  IPhidgetLEDDisp = dispinterface;
  _IPhidgetLEDEvents = dispinterface;
  IPhidgetEncoder = interface;
  IPhidgetEncoderDisp = dispinterface;
  _IPhidgetEncoderEvents = dispinterface;
  IPhidgetStepper = interface;
  IPhidgetStepperDisp = dispinterface;
  _IPhidgetStepperEvents = dispinterface;
  IPhidgetTemperatureSensor = interface;
  IPhidgetTemperatureSensorDisp = dispinterface;
  _IPhidgetTemperatureSensorEvents = dispinterface;
  IPhidgetAccelerometer = interface;
  IPhidgetAccelerometerDisp = dispinterface;
  _IPhidgetAccelerometerEvents = dispinterface;
  IPhidgetTextLED = interface;
  IPhidgetTextLEDDisp = dispinterface;
  _IPhidgetTextLEDEvents = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
// *********************************************************************//
  PhidgetManager = IPhidgetManager;
  PhidgetServo = IPhidgetServo;
  PhidgetInterfaceKit = IPhidgetInterfaceKit;
  PhidgetRFID = IPhidgetRFID;
  PhidgetWeightSensor = IPhidgetWeightSensor;
  PhidgetTextLCD = IPhidgetTextLCD;
  PhidgetMotorControl = IPhidgetMotorControl;
  PhidgetAdvancedServo = IPhidgetAdvancedServo;
  PhidgetLED = IPhidgetLED;
  PhidgetEncoder = IPhidgetEncoder;
  PhidgetStepper = IPhidgetStepper;
  PhidgetTemperatureSensor = IPhidgetTemperatureSensor;
  PhidgetAccelerometer = IPhidgetAccelerometer;
  PhidgetTextLED = IPhidgetTextLED;


// *********************************************************************//
// Interface: IPhidget
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000001}
// *********************************************************************//
  IPhidget = interface(IDispatch)
    ['{50484945-4745-5453-1000-000000000001}']
    function Get_DeviceType: WideString; safecall;
    function Get_SerialNumber: SYSINT; safecall;
    function Get_Name: WideString; safecall;
    function Get_Tag: OleVariant; safecall;
    procedure Set_Tag(pVal: OleVariant); safecall;
    function Get_IsAttached: WordBool; safecall;
    function Get_DeviceVersion: Single; safecall;
    function Get_LibraryVersion: WideString; safecall;
    procedure Open(SerialNumber: Integer); safecall;
    procedure OnDetach; safecall;
    property DeviceType: WideString read Get_DeviceType;
    property SerialNumber: SYSINT read Get_SerialNumber;
    property Name: WideString read Get_Name;
    property Tag: OleVariant read Get_Tag write Set_Tag;
    property IsAttached: WordBool read Get_IsAttached;
    property DeviceVersion: Single read Get_DeviceVersion;
    property LibraryVersion: WideString read Get_LibraryVersion;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000001}
// *********************************************************************//
  IPhidgetDisp = dispinterface
    ['{50484945-4745-5453-1000-000000000001}']
    property DeviceType: WideString readonly dispid 32770;
    property SerialNumber: SYSINT readonly dispid 32772;
    property Name: WideString readonly dispid 32774;
    property Tag: OleVariant dispid 32776;
    property IsAttached: WordBool readonly dispid 32778;
    property DeviceVersion: Single readonly dispid 32780;
    property LibraryVersion: WideString readonly dispid 32782;
    procedure Open(SerialNumber: Integer); dispid 32784;
    procedure OnDetach; dispid 33026;
  end;

// *********************************************************************//
// Interface: IPhidgetManager
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000002}
// *********************************************************************//
  IPhidgetManager = interface(IDispatch)
    ['{50484945-4745-5453-1000-000000000002}']
    function Get_Count: Integer; safecall;
    procedure Start; safecall;
    function Get_DeviceType(Index: Integer): WideString; safecall;
    function Get_DeviceName(Index: Integer): WideString; safecall;
    function Get_DeviceTag(Index: Integer): WideString; safecall;
    function Get_DeviceSerial(Index: Integer): Integer; safecall;
    property Count: Integer read Get_Count;
    property DeviceType[Index: Integer]: WideString read Get_DeviceType;
    property DeviceName[Index: Integer]: WideString read Get_DeviceName;
    property DeviceTag[Index: Integer]: WideString read Get_DeviceTag;
    property DeviceSerial[Index: Integer]: Integer read Get_DeviceSerial;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetManagerDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000002}
// *********************************************************************//
  IPhidgetManagerDisp = dispinterface
    ['{50484945-4745-5453-1000-000000000002}']
    property Count: Integer readonly dispid 36866;
    procedure Start; dispid 36867;
    property DeviceType[Index: Integer]: WideString readonly dispid 36868;
    property DeviceName[Index: Integer]: WideString readonly dispid 36869;
    property DeviceTag[Index: Integer]: WideString readonly dispid 36870;
    property DeviceSerial[Index: Integer]: Integer readonly dispid 36871;
  end;

// *********************************************************************//
// DispIntf:  _IPhidgetManagerEvents
// Flags:     (4096) Dispatchable
// GUID:      {50484945-4745-5453-2000-000000000002}
// *********************************************************************//
  _IPhidgetManagerEvents = dispinterface
    ['{50484945-4745-5453-2000-000000000002}']
    procedure OnAttach(const DeviceType: WideString; const DeviceName: WideString; 
                       SerialNumber: Integer; const Tag: WideString); dispid 1;
    procedure OnDetach(const DeviceType: WideString; const DeviceName: WideString; 
                       SerialNumber: Integer; const Tag: WideString); dispid 2;
  end;

// *********************************************************************//
// Interface: IPhidgetServo
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000004}
// *********************************************************************//
  IPhidgetServo = interface(IPhidget)
    ['{50484945-4745-5453-1000-000000000004}']
    function Get_MotorPosition(Index: Integer): Single; safecall;
    procedure Set_MotorPosition(Index: Integer; pVal: Single); safecall;
    function Get_NumMotors: Integer; safecall;
    property MotorPosition[Index: Integer]: Single read Get_MotorPosition write Set_MotorPosition;
    property NumMotors: Integer read Get_NumMotors;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetServoDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000004}
// *********************************************************************//
  IPhidgetServoDisp = dispinterface
    ['{50484945-4745-5453-1000-000000000004}']
    property MotorPosition[Index: Integer]: Single dispid 32751;
    property NumMotors: Integer readonly dispid 32753;
    property DeviceType: WideString readonly dispid 32770;
    property SerialNumber: SYSINT readonly dispid 32772;
    property Name: WideString readonly dispid 32774;
    property Tag: OleVariant dispid 32776;
    property IsAttached: WordBool readonly dispid 32778;
    property DeviceVersion: Single readonly dispid 32780;
    property LibraryVersion: WideString readonly dispid 32782;
    procedure Open(SerialNumber: Integer); dispid 32784;
    procedure OnDetach; dispid 33026;
  end;

// *********************************************************************//
// DispIntf:  _IPhidgetServoEvents
// Flags:     (4096) Dispatchable
// GUID:      {50484945-4745-5453-2000-000000000004}
// *********************************************************************//
  _IPhidgetServoEvents = dispinterface
    ['{50484945-4745-5453-2000-000000000004}']
    procedure OnAttach; dispid 1;
    procedure OnDetach; dispid 2;
    procedure OnError(const Description: WideString; SCODE: Integer); dispid 3;
    procedure OnMotorPositionChange(Index: Integer; NewState: Single); dispid 4;
  end;

// *********************************************************************//
// Interface: IPhidgetInterfaceKit
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000003}
// *********************************************************************//
  IPhidgetInterfaceKit = interface(IPhidget)
    ['{50484945-4745-5453-1000-000000000003}']
    function Get_OutputState(Index: Integer): WordBool; safecall;
    procedure Set_OutputState(Index: Integer; pVal: WordBool); safecall;
    function Get_NumOutputs: Integer; safecall;
    function Get_NumInputs: Integer; safecall;
    function Get_InputState(Index: Integer): WordBool; safecall;
    function Get_NumSensors: Integer; safecall;
    function Get_SensorRawValue(Index: Integer): Integer; safecall;
    function Get_SensorChangeTrigger(Index: Integer): Integer; safecall;
    procedure Set_SensorChangeTrigger(Index: Integer; pVal: Integer); safecall;
    function Get_SensorValue(Index: Integer): Integer; safecall;
    procedure Set_Ratiometric(pVal: WordBool); safecall;
    function Get_Ratiometric: WordBool; safecall;
    property OutputState[Index: Integer]: WordBool read Get_OutputState write Set_OutputState;
    property NumOutputs: Integer read Get_NumOutputs;
    property NumInputs: Integer read Get_NumInputs;
    property InputState[Index: Integer]: WordBool read Get_InputState;
    property NumSensors: Integer read Get_NumSensors;
    property SensorRawValue[Index: Integer]: Integer read Get_SensorRawValue;
    property SensorChangeTrigger[Index: Integer]: Integer read Get_SensorChangeTrigger write Set_SensorChangeTrigger;
    property SensorValue[Index: Integer]: Integer read Get_SensorValue;
    property Ratiometric: WordBool read Get_Ratiometric write Set_Ratiometric;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetInterfaceKitDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000003}
// *********************************************************************//
  IPhidgetInterfaceKitDisp = dispinterface
    ['{50484945-4745-5453-1000-000000000003}']
    property OutputState[Index: Integer]: WordBool dispid 100;
    property NumOutputs: Integer readonly dispid 101;
    property NumInputs: Integer readonly dispid 103;
    property InputState[Index: Integer]: WordBool readonly dispid 104;
    property NumSensors: Integer readonly dispid 105;
    property SensorRawValue[Index: Integer]: Integer readonly dispid 106;
    property SensorChangeTrigger[Index: Integer]: Integer dispid 109;
    property SensorValue[Index: Integer]: Integer readonly dispid 110;
    property Ratiometric: WordBool dispid 111;
    property DeviceType: WideString readonly dispid 32770;
    property SerialNumber: SYSINT readonly dispid 32772;
    property Name: WideString readonly dispid 32774;
    property Tag: OleVariant dispid 32776;
    property IsAttached: WordBool readonly dispid 32778;
    property DeviceVersion: Single readonly dispid 32780;
    property LibraryVersion: WideString readonly dispid 32782;
    procedure Open(SerialNumber: Integer); dispid 32784;
    procedure OnDetach; dispid 33026;
  end;

// *********************************************************************//
// DispIntf:  _IPhidgetInterfaceKitEvents
// Flags:     (4096) Dispatchable
// GUID:      {50484945-4745-5453-2000-000000000003}
// *********************************************************************//
  _IPhidgetInterfaceKitEvents = dispinterface
    ['{50484945-4745-5453-2000-000000000003}']
    procedure OnAttach; dispid 1;
    procedure OnDetach; dispid 2;
    procedure OnError(const Description: WideString; SCODE: Integer); dispid 3;
    procedure OnInputChange(Index: Integer; NewState: WordBool); dispid 4;
    procedure OnSensorChange(Index: Integer; SensorValue: Integer); dispid 5;
    procedure OnOutputChange(Index: Integer; NewState: WordBool); dispid 6;
  end;

// *********************************************************************//
// Interface: IPhidgetRFID
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000007}
// *********************************************************************//
  IPhidgetRFID = interface(IPhidget)
    ['{50484945-4745-5453-1000-000000000007}']
    function Get_OutputState(Index: Integer): WordBool; safecall;
    procedure Set_OutputState(Index: Integer; pVal: WordBool); safecall;
    function Get_NumOutputs: Integer; safecall;
    function Get_AntennaOn: WordBool; safecall;
    procedure Set_AntennaOn(pVal: WordBool); safecall;
    function Get_LEDOn: WordBool; safecall;
    procedure Set_LEDOn(pVal: WordBool); safecall;
    function Get_LastTag: WideString; safecall;
    property OutputState[Index: Integer]: WordBool read Get_OutputState write Set_OutputState;
    property NumOutputs: Integer read Get_NumOutputs;
    property AntennaOn: WordBool read Get_AntennaOn write Set_AntennaOn;
    property LEDOn: WordBool read Get_LEDOn write Set_LEDOn;
    property LastTag: WideString read Get_LastTag;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetRFIDDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000007}
// *********************************************************************//
  IPhidgetRFIDDisp = dispinterface
    ['{50484945-4745-5453-1000-000000000007}']
    property OutputState[Index: Integer]: WordBool dispid 100;
    property NumOutputs: Integer readonly dispid 101;
    property AntennaOn: WordBool dispid 102;
    property LEDOn: WordBool dispid 103;
    property LastTag: WideString readonly dispid 104;
    property DeviceType: WideString readonly dispid 32770;
    property SerialNumber: SYSINT readonly dispid 32772;
    property Name: WideString readonly dispid 32774;
    property Tag: OleVariant dispid 32776;
    property IsAttached: WordBool readonly dispid 32778;
    property DeviceVersion: Single readonly dispid 32780;
    property LibraryVersion: WideString readonly dispid 32782;
    procedure Open(SerialNumber: Integer); dispid 32784;
    procedure OnDetach; dispid 33026;
  end;

// *********************************************************************//
// DispIntf:  _IPhidgetRFIDEvents
// Flags:     (4096) Dispatchable
// GUID:      {50484945-4745-5453-2000-000000000007}
// *********************************************************************//
  _IPhidgetRFIDEvents = dispinterface
    ['{50484945-4745-5453-2000-000000000007}']
    procedure OnAttach; dispid 1;
    procedure OnDetach; dispid 2;
    procedure OnError(const Description: WideString; SCODE: Integer); dispid 3;
    procedure OnTag(const TagNumber: WideString); dispid 4;
    procedure OnTagLost(const TagNumber: WideString); dispid 5;
    procedure OnOutputChange(Index: Integer; NewState: WordBool); dispid 6;
  end;

// *********************************************************************//
// Interface: IPhidgetWeightSensor
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000008}
// *********************************************************************//
  IPhidgetWeightSensor = interface(IPhidget)
    ['{50484945-4745-5453-1000-000000000008}']
    function Get_WeightChangeTrigger: Double; safecall;
    procedure Set_WeightChangeTrigger(pVal: Double); safecall;
    function Get_Weight: Double; safecall;
    property WeightChangeTrigger: Double read Get_WeightChangeTrigger write Set_WeightChangeTrigger;
    property Weight: Double read Get_Weight;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetWeightSensorDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000008}
// *********************************************************************//
  IPhidgetWeightSensorDisp = dispinterface
    ['{50484945-4745-5453-1000-000000000008}']
    property WeightChangeTrigger: Double dispid 32753;
    property Weight: Double readonly dispid 32755;
    property DeviceType: WideString readonly dispid 32770;
    property SerialNumber: SYSINT readonly dispid 32772;
    property Name: WideString readonly dispid 32774;
    property Tag: OleVariant dispid 32776;
    property IsAttached: WordBool readonly dispid 32778;
    property DeviceVersion: Single readonly dispid 32780;
    property LibraryVersion: WideString readonly dispid 32782;
    procedure Open(SerialNumber: Integer); dispid 32784;
    procedure OnDetach; dispid 33026;
  end;

// *********************************************************************//
// DispIntf:  _IPhidgetWeightSensorEvents
// Flags:     (4096) Dispatchable
// GUID:      {50484945-4745-5453-2000-000000000008}
// *********************************************************************//
  _IPhidgetWeightSensorEvents = dispinterface
    ['{50484945-4745-5453-2000-000000000008}']
    procedure OnAttach; dispid 1;
    procedure OnDetach; dispid 2;
    procedure OnError(const Description: WideString; SCODE: Integer); dispid 3;
    procedure OnWeightChange(Weight: Double); dispid 4;
  end;

// *********************************************************************//
// Interface: IPhidgetTextLCD
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-00000000000A}
// *********************************************************************//
  IPhidgetTextLCD = interface(IPhidget)
    ['{50484945-4745-5453-1000-00000000000A}']
    procedure Set_DisplayString(Row: Integer; const Param2: WideString); safecall;
    function Get_NumRows: Integer; safecall;
    function Get_NumColumns: Integer; safecall;
    function Get_Backlight: WordBool; safecall;
    procedure Set_Backlight(pVal: WordBool); safecall;
    function Get_CursorOn: WordBool; safecall;
    procedure Set_CursorOn(pVal: WordBool); safecall;
    function Get_CursorBlink: WordBool; safecall;
    procedure Set_CursorBlink(pVal: WordBool); safecall;
    function Get_Contrast: Integer; safecall;
    procedure Set_Contrast(pVal: Integer); safecall;
    procedure Set_CustomCharacter(Index: Integer; Val1: Integer; Param3: Integer); safecall;
    property DisplayString[Row: Integer]: WideString write Set_DisplayString;
    property NumRows: Integer read Get_NumRows;
    property NumColumns: Integer read Get_NumColumns;
    property Backlight: WordBool read Get_Backlight write Set_Backlight;
    property CursorOn: WordBool read Get_CursorOn write Set_CursorOn;
    property CursorBlink: WordBool read Get_CursorBlink write Set_CursorBlink;
    property Contrast: Integer read Get_Contrast write Set_Contrast;
    property CustomCharacter[Index: Integer; Val1: Integer]: Integer write Set_CustomCharacter;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetTextLCDDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-00000000000A}
// *********************************************************************//
  IPhidgetTextLCDDisp = dispinterface
    ['{50484945-4745-5453-1000-00000000000A}']
    property DisplayString[Row: Integer]: WideString writeonly dispid 32736;
    property NumRows: Integer readonly dispid 32737;
    property NumColumns: Integer readonly dispid 32738;
    property Backlight: WordBool dispid 32739;
    property CursorOn: WordBool dispid 32740;
    property CursorBlink: WordBool dispid 32741;
    property Contrast: Integer dispid 32742;
    property CustomCharacter[Index: Integer; Val1: Integer]: Integer writeonly dispid 32743;
    property DeviceType: WideString readonly dispid 32770;
    property SerialNumber: SYSINT readonly dispid 32772;
    property Name: WideString readonly dispid 32774;
    property Tag: OleVariant dispid 32776;
    property IsAttached: WordBool readonly dispid 32778;
    property DeviceVersion: Single readonly dispid 32780;
    property LibraryVersion: WideString readonly dispid 32782;
    procedure Open(SerialNumber: Integer); dispid 32784;
    procedure OnDetach; dispid 33026;
  end;

// *********************************************************************//
// DispIntf:  _IPhidgetTextLCDEvents
// Flags:     (4096) Dispatchable
// GUID:      {50484945-4745-5453-2000-00000000000A}
// *********************************************************************//
  _IPhidgetTextLCDEvents = dispinterface
    ['{50484945-4745-5453-2000-00000000000A}']
    procedure OnAttach; dispid 1;
    procedure OnDetach; dispid 2;
    procedure OnError(const Description: WideString; SCODE: Integer); dispid 3;
  end;

// *********************************************************************//
// Interface: IPhidgetMotorControl
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-00000000000B}
// *********************************************************************//
  IPhidgetMotorControl = interface(IPhidget)
    ['{50484945-4745-5453-1000-00000000000B}']
    function Get_MotorSpeed(Index: Integer): Double; safecall;
    procedure Set_MotorSpeed(Index: Integer; pVal: Double); safecall;
    function Get_Acceleration(Index: Integer): Double; safecall;
    procedure Set_Acceleration(Index: Integer; pVal: Double); safecall;
    function Get_NumMotors: Integer; safecall;
    function Get_NumInputs: Integer; safecall;
    function Get_InputState(Index: Integer): WordBool; safecall;
    property MotorSpeed[Index: Integer]: Double read Get_MotorSpeed write Set_MotorSpeed;
    property Acceleration[Index: Integer]: Double read Get_Acceleration write Set_Acceleration;
    property NumMotors: Integer read Get_NumMotors;
    property NumInputs: Integer read Get_NumInputs;
    property InputState[Index: Integer]: WordBool read Get_InputState;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetMotorControlDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-00000000000B}
// *********************************************************************//
  IPhidgetMotorControlDisp = dispinterface
    ['{50484945-4745-5453-1000-00000000000B}']
    property MotorSpeed[Index: Integer]: Double dispid 32751;
    property Acceleration[Index: Integer]: Double dispid 32752;
    property NumMotors: Integer readonly dispid 32754;
    property NumInputs: Integer readonly dispid 32755;
    property InputState[Index: Integer]: WordBool readonly dispid 32756;
    property DeviceType: WideString readonly dispid 32770;
    property SerialNumber: SYSINT readonly dispid 32772;
    property Name: WideString readonly dispid 32774;
    property Tag: OleVariant dispid 32776;
    property IsAttached: WordBool readonly dispid 32778;
    property DeviceVersion: Single readonly dispid 32780;
    property LibraryVersion: WideString readonly dispid 32782;
    procedure Open(SerialNumber: Integer); dispid 32784;
    procedure OnDetach; dispid 33026;
  end;

// *********************************************************************//
// DispIntf:  _IPhidgetMotorControlEvents
// Flags:     (4096) Dispatchable
// GUID:      {50484945-4745-5453-2000-00000000000B}
// *********************************************************************//
  _IPhidgetMotorControlEvents = dispinterface
    ['{50484945-4745-5453-2000-00000000000B}']
    procedure OnAttach; dispid 1;
    procedure OnDetach; dispid 2;
    procedure OnError(const Description: WideString; SCODE: Integer); dispid 3;
    procedure OnInputChange(Index: Integer; NewState: WordBool); dispid 4;
    procedure OnMotorChange(Index: Integer; newVal: Double); dispid 5;
  end;

// *********************************************************************//
// Interface: IPhidgetAdvancedServo
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-00000000000C}
// *********************************************************************//
  IPhidgetAdvancedServo = interface(IPhidget)
    ['{50484945-4745-5453-1000-00000000000C}']
    function Get_MotorPosition(Index: Integer): Single; safecall;
    procedure Set_MotorPosition(Index: Integer; pVal: Single); safecall;
    function Get_MaxVelocity(Index: Integer): Single; safecall;
    procedure Set_MaxVelocity(Index: Integer; pVal: Single); safecall;
    function Get_Acceleration(Index: Integer): Single; safecall;
    procedure Set_Acceleration(Index: Integer; pVal: Single); safecall;
    function Get_MotorEnabled(Index: Integer): WordBool; safecall;
    procedure Set_MotorEnabled(Index: Integer; pVal: WordBool); safecall;
    function Get_NumMotors: Integer; safecall;
    property MotorPosition[Index: Integer]: Single read Get_MotorPosition write Set_MotorPosition;
    property MaxVelocity[Index: Integer]: Single read Get_MaxVelocity write Set_MaxVelocity;
    property Acceleration[Index: Integer]: Single read Get_Acceleration write Set_Acceleration;
    property MotorEnabled[Index: Integer]: WordBool read Get_MotorEnabled write Set_MotorEnabled;
    property NumMotors: Integer read Get_NumMotors;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetAdvancedServoDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-00000000000C}
// *********************************************************************//
  IPhidgetAdvancedServoDisp = dispinterface
    ['{50484945-4745-5453-1000-00000000000C}']
    property MotorPosition[Index: Integer]: Single dispid 32751;
    property MaxVelocity[Index: Integer]: Single dispid 32752;
    property Acceleration[Index: Integer]: Single dispid 32753;
    property MotorEnabled[Index: Integer]: WordBool dispid 32754;
    property NumMotors: Integer readonly dispid 32755;
    property DeviceType: WideString readonly dispid 32770;
    property SerialNumber: SYSINT readonly dispid 32772;
    property Name: WideString readonly dispid 32774;
    property Tag: OleVariant dispid 32776;
    property IsAttached: WordBool readonly dispid 32778;
    property DeviceVersion: Single readonly dispid 32780;
    property LibraryVersion: WideString readonly dispid 32782;
    procedure Open(SerialNumber: Integer); dispid 32784;
    procedure OnDetach; dispid 33026;
  end;

// *********************************************************************//
// DispIntf:  _IPhidgetAdvancedServoEvents
// Flags:     (4096) Dispatchable
// GUID:      {50484945-4745-5453-2000-00000000000C}
// *********************************************************************//
  _IPhidgetAdvancedServoEvents = dispinterface
    ['{50484945-4745-5453-2000-00000000000C}']
    procedure OnAttach; dispid 1;
    procedure OnDetach; dispid 2;
    procedure OnError(const Description: WideString; SCODE: Integer); dispid 3;
    procedure OnPositionChange(Index: Integer; Position: Single); dispid 4;
  end;

// *********************************************************************//
// Interface: IPhidgetLED
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-00000000000D}
// *********************************************************************//
  IPhidgetLED = interface(IPhidget)
    ['{50484945-4745-5453-1000-00000000000D}']
    procedure Set_DiscreteLED(Index: Integer; pVal: Integer); safecall;
    function Get_DiscreteLED(Index: Integer): Integer; safecall;
    function Get_NumLEDs: Integer; safecall;
    property DiscreteLED[Index: Integer]: Integer read Get_DiscreteLED write Set_DiscreteLED;
    property NumLEDs: Integer read Get_NumLEDs;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetLEDDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-00000000000D}
// *********************************************************************//
  IPhidgetLEDDisp = dispinterface
    ['{50484945-4745-5453-1000-00000000000D}']
    property DiscreteLED[Index: Integer]: Integer dispid 257;
    property NumLEDs: Integer readonly dispid 258;
    property DeviceType: WideString readonly dispid 32770;
    property SerialNumber: SYSINT readonly dispid 32772;
    property Name: WideString readonly dispid 32774;
    property Tag: OleVariant dispid 32776;
    property IsAttached: WordBool readonly dispid 32778;
    property DeviceVersion: Single readonly dispid 32780;
    property LibraryVersion: WideString readonly dispid 32782;
    procedure Open(SerialNumber: Integer); dispid 32784;
    procedure OnDetach; dispid 33026;
  end;

// *********************************************************************//
// DispIntf:  _IPhidgetLEDEvents
// Flags:     (4096) Dispatchable
// GUID:      {50484945-4745-5453-2000-00000000000D}
// *********************************************************************//
  _IPhidgetLEDEvents = dispinterface
    ['{50484945-4745-5453-2000-00000000000D}']
    procedure OnAttach; dispid 1;
    procedure OnDetach; dispid 2;
    procedure OnError(const Description: WideString; SCODE: Integer); dispid 3;
  end;

// *********************************************************************//
// Interface: IPhidgetEncoder
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-00000000000E}
// *********************************************************************//
  IPhidgetEncoder = interface(IPhidget)
    ['{50484945-4745-5453-1000-00000000000E}']
    function Get_EncoderPosition(Index: Integer): Integer; safecall;
    procedure Set_EncoderPosition(Index: Integer; pVal: Integer); safecall;
    function Get_InputState(Index: Integer): WordBool; safecall;
    function Get_NumEncoders: Integer; safecall;
    function Get_NumInputs: Integer; safecall;
    property EncoderPosition[Index: Integer]: Integer read Get_EncoderPosition write Set_EncoderPosition;
    property InputState[Index: Integer]: WordBool read Get_InputState;
    property NumEncoders: Integer read Get_NumEncoders;
    property NumInputs: Integer read Get_NumInputs;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetEncoderDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-00000000000E}
// *********************************************************************//
  IPhidgetEncoderDisp = dispinterface
    ['{50484945-4745-5453-1000-00000000000E}']
    property EncoderPosition[Index: Integer]: Integer dispid 100;
    property InputState[Index: Integer]: WordBool readonly dispid 104;
    property NumEncoders: Integer readonly dispid 102;
    property NumInputs: Integer readonly dispid 103;
    property DeviceType: WideString readonly dispid 32770;
    property SerialNumber: SYSINT readonly dispid 32772;
    property Name: WideString readonly dispid 32774;
    property Tag: OleVariant dispid 32776;
    property IsAttached: WordBool readonly dispid 32778;
    property DeviceVersion: Single readonly dispid 32780;
    property LibraryVersion: WideString readonly dispid 32782;
    procedure Open(SerialNumber: Integer); dispid 32784;
    procedure OnDetach; dispid 33026;
  end;

// *********************************************************************//
// DispIntf:  _IPhidgetEncoderEvents
// Flags:     (4096) Dispatchable
// GUID:      {50484945-4745-5453-2000-00000000000E}
// *********************************************************************//
  _IPhidgetEncoderEvents = dispinterface
    ['{50484945-4745-5453-2000-00000000000E}']
    procedure OnAttach; dispid 1;
    procedure OnDetach; dispid 2;
    procedure OnError(const Description: WideString; SCODE: Integer); dispid 3;
    procedure OnInputChange(Index: Integer; NewState: WordBool); dispid 4;
    procedure OnPositionChange(Index: Integer; Time: Integer; EncoderDisplacement: Integer); dispid 5;
  end;

// *********************************************************************//
// Interface: IPhidgetStepper
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-00000000000F}
// *********************************************************************//
  IPhidgetStepper = interface(IPhidget)
    ['{50484945-4745-5453-1000-00000000000F}']
    function Get_MotorPosition(Index: Integer): Double; safecall;
    procedure Set_MotorPosition(Index: Integer; pVal: Double); safecall;
    function Get_Acceleration(Index: Integer): Double; safecall;
    procedure Set_Acceleration(Index: Integer; pVal: Double); safecall;
    function Get_MotorSpeed(Index: Integer): Double; safecall;
    procedure Set_MotorSpeed(Index: Integer; pVal: Double); safecall;
    function Get_NumMotors: Integer; safecall;
    function Get_NumInputs: Integer; safecall;
    function Get_InputState(Index: Integer): WordBool; safecall;
    property MotorPosition[Index: Integer]: Double read Get_MotorPosition write Set_MotorPosition;
    property Acceleration[Index: Integer]: Double read Get_Acceleration write Set_Acceleration;
    property MotorSpeed[Index: Integer]: Double read Get_MotorSpeed write Set_MotorSpeed;
    property NumMotors: Integer read Get_NumMotors;
    property NumInputs: Integer read Get_NumInputs;
    property InputState[Index: Integer]: WordBool read Get_InputState;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetStepperDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-00000000000F}
// *********************************************************************//
  IPhidgetStepperDisp = dispinterface
    ['{50484945-4745-5453-1000-00000000000F}']
    property MotorPosition[Index: Integer]: Double dispid 32751;
    property Acceleration[Index: Integer]: Double dispid 32752;
    property MotorSpeed[Index: Integer]: Double dispid 32753;
    property NumMotors: Integer readonly dispid 32756;
    property NumInputs: Integer readonly dispid 32757;
    property InputState[Index: Integer]: WordBool readonly dispid 32758;
    property DeviceType: WideString readonly dispid 32770;
    property SerialNumber: SYSINT readonly dispid 32772;
    property Name: WideString readonly dispid 32774;
    property Tag: OleVariant dispid 32776;
    property IsAttached: WordBool readonly dispid 32778;
    property DeviceVersion: Single readonly dispid 32780;
    property LibraryVersion: WideString readonly dispid 32782;
    procedure Open(SerialNumber: Integer); dispid 32784;
    procedure OnDetach; dispid 33026;
  end;

// *********************************************************************//
// DispIntf:  _IPhidgetStepperEvents
// Flags:     (4096) Dispatchable
// GUID:      {50484945-4745-5453-2000-00000000000F}
// *********************************************************************//
  _IPhidgetStepperEvents = dispinterface
    ['{50484945-4745-5453-2000-00000000000F}']
    procedure OnAttach; dispid 1;
    procedure OnDetach; dispid 2;
    procedure OnError(const Description: WideString; SCODE: Integer); dispid 3;
    procedure OnInputChange(Index: Integer; NewState: WordBool); dispid 4;
    procedure OnPositionChange(Index: Integer; newVal: Double); dispid 5;
  end;

// *********************************************************************//
// Interface: IPhidgetTemperatureSensor
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000010}
// *********************************************************************//
  IPhidgetTemperatureSensor = interface(IPhidget)
    ['{50484945-4745-5453-1000-000000000010}']
    function Get_TemperatureChangeTrigger(Index: Integer): Double; safecall;
    procedure Set_TemperatureChangeTrigger(Index: Integer; pVal: Double); safecall;
    function Get_Temperature(Index: Integer): Double; safecall;
    function Get_NumTemperatureInputs: Integer; safecall;
    property TemperatureChangeTrigger[Index: Integer]: Double read Get_TemperatureChangeTrigger write Set_TemperatureChangeTrigger;
    property Temperature[Index: Integer]: Double read Get_Temperature;
    property NumTemperatureInputs: Integer read Get_NumTemperatureInputs;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetTemperatureSensorDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000010}
// *********************************************************************//
  IPhidgetTemperatureSensorDisp = dispinterface
    ['{50484945-4745-5453-1000-000000000010}']
    property TemperatureChangeTrigger[Index: Integer]: Double dispid 32753;
    property Temperature[Index: Integer]: Double readonly dispid 32755;
    property NumTemperatureInputs: Integer readonly dispid 32758;
    property DeviceType: WideString readonly dispid 32770;
    property SerialNumber: SYSINT readonly dispid 32772;
    property Name: WideString readonly dispid 32774;
    property Tag: OleVariant dispid 32776;
    property IsAttached: WordBool readonly dispid 32778;
    property DeviceVersion: Single readonly dispid 32780;
    property LibraryVersion: WideString readonly dispid 32782;
    procedure Open(SerialNumber: Integer); dispid 32784;
    procedure OnDetach; dispid 33026;
  end;

// *********************************************************************//
// DispIntf:  _IPhidgetTemperatureSensorEvents
// Flags:     (4096) Dispatchable
// GUID:      {50484945-4745-5453-2000-000000000010}
// *********************************************************************//
  _IPhidgetTemperatureSensorEvents = dispinterface
    ['{50484945-4745-5453-2000-000000000010}']
    procedure OnAttach; dispid 1;
    procedure OnDetach; dispid 2;
    procedure OnError(const Description: WideString; SCODE: Integer); dispid 3;
    procedure OnTemperatureChange(Index: Integer; Temperature: Single); dispid 4;
  end;

// *********************************************************************//
// Interface: IPhidgetAccelerometer
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000011}
// *********************************************************************//
  IPhidgetAccelerometer = interface(IPhidget)
    ['{50484945-4745-5453-1000-000000000011}']
    function Get_AccelerationChangeTrigger(Index: Integer): Double; safecall;
    procedure Set_AccelerationChangeTrigger(Index: Integer; pVal: Double); safecall;
    function Get_Acceleration(Index: Integer): Double; safecall;
    function Get_NumAxis: Integer; safecall;
    property AccelerationChangeTrigger[Index: Integer]: Double read Get_AccelerationChangeTrigger write Set_AccelerationChangeTrigger;
    property Acceleration[Index: Integer]: Double read Get_Acceleration;
    property NumAxis: Integer read Get_NumAxis;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetAccelerometerDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000011}
// *********************************************************************//
  IPhidgetAccelerometerDisp = dispinterface
    ['{50484945-4745-5453-1000-000000000011}']
    property AccelerationChangeTrigger[Index: Integer]: Double dispid 32753;
    property Acceleration[Index: Integer]: Double readonly dispid 32755;
    property NumAxis: Integer readonly dispid 32758;
    property DeviceType: WideString readonly dispid 32770;
    property SerialNumber: SYSINT readonly dispid 32772;
    property Name: WideString readonly dispid 32774;
    property Tag: OleVariant dispid 32776;
    property IsAttached: WordBool readonly dispid 32778;
    property DeviceVersion: Single readonly dispid 32780;
    property LibraryVersion: WideString readonly dispid 32782;
    procedure Open(SerialNumber: Integer); dispid 32784;
    procedure OnDetach; dispid 33026;
  end;

// *********************************************************************//
// DispIntf:  _IPhidgetAccelerometerEvents
// Flags:     (4096) Dispatchable
// GUID:      {50484945-4745-5453-2000-000000000011}
// *********************************************************************//
  _IPhidgetAccelerometerEvents = dispinterface
    ['{50484945-4745-5453-2000-000000000011}']
    procedure OnAttach; dispid 1;
    procedure OnDetach; dispid 2;
    procedure OnError(const Description: WideString; SCODE: Integer); dispid 3;
    procedure OnAccelerationChange(Index: Integer; Acceleration: Double); dispid 4;
  end;

// *********************************************************************//
// Interface: IPhidgetTextLED
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000012}
// *********************************************************************//
  IPhidgetTextLED = interface(IPhidget)
    ['{50484945-4745-5453-1000-000000000012}']
    procedure Set_DisplayString(Row: Integer; const Param2: WideString); safecall;
    function Get_NumRows: Integer; safecall;
    function Get_NumColumns: Integer; safecall;
    function Get_Brightness: Integer; safecall;
    procedure Set_Brightness(pVal: Integer); safecall;
    property DisplayString[Row: Integer]: WideString write Set_DisplayString;
    property NumRows: Integer read Get_NumRows;
    property NumColumns: Integer read Get_NumColumns;
    property Brightness: Integer read Get_Brightness write Set_Brightness;
  end;

// *********************************************************************//
// DispIntf:  IPhidgetTextLEDDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {50484945-4745-5453-1000-000000000012}
// *********************************************************************//
  IPhidgetTextLEDDisp = dispinterface
    ['{50484945-4745-5453-1000-000000000012}']
    property DisplayString[Row: Integer]: WideString writeonly dispid 256;
    property NumRows: Integer readonly dispid 257;
    property NumColumns: Integer readonly dispid 258;
    property Brightness: Integer dispid 259;
    property DeviceType: WideString readonly dispid 32770;
    property SerialNumber: SYSINT readonly dispid 32772;
    property Name: WideString readonly dispid 32774;
    property Tag: OleVariant dispid 32776;
    property IsAttached: WordBool readonly dispid 32778;
    property DeviceVersion: Single readonly dispid 32780;
    property LibraryVersion: WideString readonly dispid 32782;
    procedure Open(SerialNumber: Integer); dispid 32784;
    procedure OnDetach; dispid 33026;
  end;

// *********************************************************************//
// DispIntf:  _IPhidgetTextLEDEvents
// Flags:     (4096) Dispatchable
// GUID:      {50484945-4745-5453-2000-000000000012}
// *********************************************************************//
  _IPhidgetTextLEDEvents = dispinterface
    ['{50484945-4745-5453-2000-000000000012}']
    procedure OnAttach; dispid 1;
    procedure OnDetach; dispid 2;
    procedure OnError(const Description: WideString; SCODE: Integer); dispid 3;
  end;

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

  TPhidgetManagerOnAttach = procedure(ASender: TObject; const DeviceType: WideString; 
                                                        const DeviceName: WideString; 
                                                        SerialNumber: Integer; const Tag: WideString) of object;
  TPhidgetManagerOnDetach = procedure(ASender: TObject; const DeviceType: WideString; 
                                                        const DeviceName: WideString; 
                                                        SerialNumber: Integer; const Tag: WideString) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TPhidgetManager
// Help String      : Provides centralized access for all phidgets on the system.
// Default Interface: IPhidgetManager
// Def. Intf. DISP? : No
// Event   Interface: _IPhidgetManagerEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TPhidgetManagerProperties= class;
{$ENDIF}
  TPhidgetManager = class(TOleServer)
  private
    FOnAttach: TPhidgetManagerOnAttach;
    FOnDetach: TPhidgetManagerOnDetach;
    FIntf:        IPhidgetManager;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TPhidgetManagerProperties;
    function      GetServerProperties: TPhidgetManagerProperties;
{$ENDIF}
    function      GetDefaultInterface: IPhidgetManager;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_Count: Integer;
    function Get_DeviceType(Index: Integer): WideString;
    function Get_DeviceName(Index: Integer): WideString;
    function Get_DeviceTag(Index: Integer): WideString;
    function Get_DeviceSerial(Index: Integer): Integer;
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IPhidgetManager);
    procedure Disconnect; override;
    procedure Start;
    property DefaultInterface: IPhidgetManager read GetDefaultInterface;
    property Count: Integer read Get_Count;
    property DeviceType[Index: Integer]: WideString read Get_DeviceType;
    property DeviceName[Index: Integer]: WideString read Get_DeviceName;
    property DeviceTag[Index: Integer]: WideString read Get_DeviceTag;
    property DeviceSerial[Index: Integer]: Integer read Get_DeviceSerial;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TPhidgetManagerProperties read GetServerProperties;
{$ENDIF}
    property OnAttach: TPhidgetManagerOnAttach read FOnAttach write FOnAttach;
    property OnDetach: TPhidgetManagerOnDetach read FOnDetach write FOnDetach;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TPhidgetManager
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TPhidgetManagerProperties = class(TPersistent)
  private
    FServer:    TPhidgetManager;
    function    GetDefaultInterface: IPhidgetManager;
    constructor Create(AServer: TPhidgetManager);
  protected
    function Get_Count: Integer;
    function Get_DeviceType(Index: Integer): WideString;
    function Get_DeviceName(Index: Integer): WideString;
    function Get_DeviceTag(Index: Integer): WideString;
    function Get_DeviceSerial(Index: Integer): Integer;
  public
    property DefaultInterface: IPhidgetManager read GetDefaultInterface;
  published
  end;
{$ENDIF}


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

  TPhidgetServoOnError = procedure(ASender: TObject; const Description: WideString; SCODE: Integer) of object;
  TPhidgetServoOnMotorPositionChange = procedure(ASender: TObject; Index: Integer; NewState: Single) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TPhidgetServo
// Help String      : PhidgetServo Class.
// Default Interface: IPhidgetServo
// Def. Intf. DISP? : No
// Event   Interface: _IPhidgetServoEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TPhidgetServoProperties= class;
{$ENDIF}
  TPhidgetServo = class(TOleServer)
  private
    FOnAttach: TNotifyEvent;
    FOnDetach: TNotifyEvent;
    FOnError: TPhidgetServoOnError;
    FOnMotorPositionChange: TPhidgetServoOnMotorPositionChange;
    FIntf:        IPhidgetServo;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TPhidgetServoProperties;
    function      GetServerProperties: TPhidgetServoProperties;
{$ENDIF}
    function      GetDefaultInterface: IPhidgetServo;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_MotorPosition(Index: Integer): Single;
    procedure Set_MotorPosition(Index: Integer; pVal: Single);
    function Get_NumMotors: Integer;
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IPhidgetServo);
    procedure Disconnect; override;
    procedure Open(SerialNumber: Integer);
    property DefaultInterface: IPhidgetServo read GetDefaultInterface;
    property DeviceType: WideString read Get_DeviceType;
    property SerialNumber: SYSINT read Get_SerialNumber;
    property Name: WideString read Get_Name;
    property Tag: OleVariant read Get_Tag write Set_Tag;
    property IsAttached: WordBool read Get_IsAttached;
    property DeviceVersion: Single read Get_DeviceVersion;
    property LibraryVersion: WideString read Get_LibraryVersion;
    property MotorPosition[Index: Integer]: Single read Get_MotorPosition write Set_MotorPosition;
    property NumMotors: Integer read Get_NumMotors;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TPhidgetServoProperties read GetServerProperties;
{$ENDIF}
    property OnAttach: TNotifyEvent read FOnAttach write FOnAttach;
    property OnDetach: TNotifyEvent read FOnDetach write FOnDetach;
    property OnError: TPhidgetServoOnError read FOnError write FOnError;
    property OnMotorPositionChange: TPhidgetServoOnMotorPositionChange read FOnMotorPositionChange write FOnMotorPositionChange;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TPhidgetServo
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TPhidgetServoProperties = class(TPersistent)
  private
    FServer:    TPhidgetServo;
    function    GetDefaultInterface: IPhidgetServo;
    constructor Create(AServer: TPhidgetServo);
  protected
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_MotorPosition(Index: Integer): Single;
    procedure Set_MotorPosition(Index: Integer; pVal: Single);
    function Get_NumMotors: Integer;
  public
    property DefaultInterface: IPhidgetServo read GetDefaultInterface;
  published
  end;
{$ENDIF}


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

  TPhidgetInterfaceKitOnError = procedure(ASender: TObject; const Description: WideString; 
                                                            SCODE: Integer) of object;
  TPhidgetInterfaceKitOnInputChange = procedure(ASender: TObject; Index: Integer; NewState: WordBool) of object;
  TPhidgetInterfaceKitOnSensorChange = procedure(ASender: TObject; Index: Integer; 
                                                                   SensorValue: Integer) of object;
  TPhidgetInterfaceKitOnOutputChange = procedure(ASender: TObject; Index: Integer; 
                                                                   NewState: WordBool) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TPhidgetInterfaceKit
// Help String      : PhidgetInterfaceKit Class
// Default Interface: IPhidgetInterfaceKit
// Def. Intf. DISP? : No
// Event   Interface: _IPhidgetInterfaceKitEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TPhidgetInterfaceKitProperties= class;
{$ENDIF}
  TPhidgetInterfaceKit = class(TOleServer)
  private
    FOnAttach: TNotifyEvent;
    FOnDetach: TNotifyEvent;
    FOnError: TPhidgetInterfaceKitOnError;
    FOnInputChange: TPhidgetInterfaceKitOnInputChange;
    FOnSensorChange: TPhidgetInterfaceKitOnSensorChange;
    FOnOutputChange: TPhidgetInterfaceKitOnOutputChange;
    FIntf:        IPhidgetInterfaceKit;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TPhidgetInterfaceKitProperties;
    function      GetServerProperties: TPhidgetInterfaceKitProperties;
{$ENDIF}
    function      GetDefaultInterface: IPhidgetInterfaceKit;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_OutputState(Index: Integer): WordBool;
    procedure Set_OutputState(Index: Integer; pVal: WordBool);
    function Get_NumOutputs: Integer;
    function Get_NumInputs: Integer;
    function Get_InputState(Index: Integer): WordBool;
    function Get_NumSensors: Integer;
    function Get_SensorRawValue(Index: Integer): Integer;
    function Get_SensorChangeTrigger(Index: Integer): Integer;
    procedure Set_SensorChangeTrigger(Index: Integer; pVal: Integer);
    function Get_SensorValue(Index: Integer): Integer;
    procedure Set_Ratiometric(pVal: WordBool);
    function Get_Ratiometric: WordBool;
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IPhidgetInterfaceKit);
    procedure Disconnect; override;
    procedure Open(SerialNumber: Integer);
    property DefaultInterface: IPhidgetInterfaceKit read GetDefaultInterface;
    property DeviceType: WideString read Get_DeviceType;
    property SerialNumber: SYSINT read Get_SerialNumber;
    property Name: WideString read Get_Name;
    property Tag: OleVariant read Get_Tag write Set_Tag;
    property IsAttached: WordBool read Get_IsAttached;
    property DeviceVersion: Single read Get_DeviceVersion;
    property LibraryVersion: WideString read Get_LibraryVersion;
    property OutputState[Index: Integer]: WordBool read Get_OutputState write Set_OutputState;
    property NumOutputs: Integer read Get_NumOutputs;
    property NumInputs: Integer read Get_NumInputs;
    property InputState[Index: Integer]: WordBool read Get_InputState;
    property NumSensors: Integer read Get_NumSensors;
    property SensorRawValue[Index: Integer]: Integer read Get_SensorRawValue;
    property SensorChangeTrigger[Index: Integer]: Integer read Get_SensorChangeTrigger write Set_SensorChangeTrigger;
    property SensorValue[Index: Integer]: Integer read Get_SensorValue;
    property Ratiometric: WordBool read Get_Ratiometric write Set_Ratiometric;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TPhidgetInterfaceKitProperties read GetServerProperties;
{$ENDIF}
    property OnAttach: TNotifyEvent read FOnAttach write FOnAttach;
    property OnDetach: TNotifyEvent read FOnDetach write FOnDetach;
    property OnError: TPhidgetInterfaceKitOnError read FOnError write FOnError;
    property OnInputChange: TPhidgetInterfaceKitOnInputChange read FOnInputChange write FOnInputChange;
    property OnSensorChange: TPhidgetInterfaceKitOnSensorChange read FOnSensorChange write FOnSensorChange;
    property OnOutputChange: TPhidgetInterfaceKitOnOutputChange read FOnOutputChange write FOnOutputChange;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TPhidgetInterfaceKit
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TPhidgetInterfaceKitProperties = class(TPersistent)
  private
    FServer:    TPhidgetInterfaceKit;
    function    GetDefaultInterface: IPhidgetInterfaceKit;
    constructor Create(AServer: TPhidgetInterfaceKit);
  protected
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_OutputState(Index: Integer): WordBool;
    procedure Set_OutputState(Index: Integer; pVal: WordBool);
    function Get_NumOutputs: Integer;
    function Get_NumInputs: Integer;
    function Get_InputState(Index: Integer): WordBool;
    function Get_NumSensors: Integer;
    function Get_SensorRawValue(Index: Integer): Integer;
    function Get_SensorChangeTrigger(Index: Integer): Integer;
    procedure Set_SensorChangeTrigger(Index: Integer; pVal: Integer);
    function Get_SensorValue(Index: Integer): Integer;
    procedure Set_Ratiometric(pVal: WordBool);
    function Get_Ratiometric: WordBool;
  public
    property DefaultInterface: IPhidgetInterfaceKit read GetDefaultInterface;
  published
    property Ratiometric: WordBool read Get_Ratiometric write Set_Ratiometric;
  end;
{$ENDIF}


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

  TPhidgetRFIDOnError = procedure(ASender: TObject; const Description: WideString; SCODE: Integer) of object;
  TPhidgetRFIDOnTag = procedure(ASender: TObject; const TagNumber: WideString) of object;
  TPhidgetRFIDOnTagLost = procedure(ASender: TObject; const TagNumber: WideString) of object;
  TPhidgetRFIDOnOutputChange = procedure(ASender: TObject; Index: Integer; NewState: WordBool) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TPhidgetRFID
// Help String      : PhidgetRFID Class
// Default Interface: IPhidgetRFID
// Def. Intf. DISP? : No
// Event   Interface: _IPhidgetRFIDEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TPhidgetRFIDProperties= class;
{$ENDIF}
  TPhidgetRFID = class(TOleServer)
  private
    FOnAttach: TNotifyEvent;
    FOnDetach: TNotifyEvent;
    FOnError: TPhidgetRFIDOnError;
    FOnTag: TPhidgetRFIDOnTag;
    FOnTagLost: TPhidgetRFIDOnTagLost;
    FOnOutputChange: TPhidgetRFIDOnOutputChange;
    FIntf:        IPhidgetRFID;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TPhidgetRFIDProperties;
    function      GetServerProperties: TPhidgetRFIDProperties;
{$ENDIF}
    function      GetDefaultInterface: IPhidgetRFID;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_OutputState(Index: Integer): WordBool;
    procedure Set_OutputState(Index: Integer; pVal: WordBool);
    function Get_NumOutputs: Integer;
    function Get_AntennaOn: WordBool;
    procedure Set_AntennaOn(pVal: WordBool);
    function Get_LEDOn: WordBool;
    procedure Set_LEDOn(pVal: WordBool);
    function Get_LastTag: WideString;
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IPhidgetRFID);
    procedure Disconnect; override;
    procedure Open(SerialNumber: Integer);
    property DefaultInterface: IPhidgetRFID read GetDefaultInterface;
    property DeviceType: WideString read Get_DeviceType;
    property SerialNumber: SYSINT read Get_SerialNumber;
    property Name: WideString read Get_Name;
    property Tag: OleVariant read Get_Tag write Set_Tag;
    property IsAttached: WordBool read Get_IsAttached;
    property DeviceVersion: Single read Get_DeviceVersion;
    property LibraryVersion: WideString read Get_LibraryVersion;
    property OutputState[Index: Integer]: WordBool read Get_OutputState write Set_OutputState;
    property NumOutputs: Integer read Get_NumOutputs;
    property LastTag: WideString read Get_LastTag;
    property AntennaOn: WordBool read Get_AntennaOn write Set_AntennaOn;
    property LEDOn: WordBool read Get_LEDOn write Set_LEDOn;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TPhidgetRFIDProperties read GetServerProperties;
{$ENDIF}
    property OnAttach: TNotifyEvent read FOnAttach write FOnAttach;
    property OnDetach: TNotifyEvent read FOnDetach write FOnDetach;
    property OnError: TPhidgetRFIDOnError read FOnError write FOnError;
    property OnTag: TPhidgetRFIDOnTag read FOnTag write FOnTag;
    property OnTagLost: TPhidgetRFIDOnTagLost read FOnTagLost write FOnTagLost;
    property OnOutputChange: TPhidgetRFIDOnOutputChange read FOnOutputChange write FOnOutputChange;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TPhidgetRFID
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TPhidgetRFIDProperties = class(TPersistent)
  private
    FServer:    TPhidgetRFID;
    function    GetDefaultInterface: IPhidgetRFID;
    constructor Create(AServer: TPhidgetRFID);
  protected
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_OutputState(Index: Integer): WordBool;
    procedure Set_OutputState(Index: Integer; pVal: WordBool);
    function Get_NumOutputs: Integer;
    function Get_AntennaOn: WordBool;
    procedure Set_AntennaOn(pVal: WordBool);
    function Get_LEDOn: WordBool;
    procedure Set_LEDOn(pVal: WordBool);
    function Get_LastTag: WideString;
  public
    property DefaultInterface: IPhidgetRFID read GetDefaultInterface;
  published
    property AntennaOn: WordBool read Get_AntennaOn write Set_AntennaOn;
    property LEDOn: WordBool read Get_LEDOn write Set_LEDOn;
  end;
{$ENDIF}


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

  TPhidgetWeightSensorOnError = procedure(ASender: TObject; const Description: WideString; 
                                                            SCODE: Integer) of object;
  TPhidgetWeightSensorOnWeightChange = procedure(ASender: TObject; Weight: Double) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TPhidgetWeightSensor
// Help String      : PhidgetWeightSensor Class
// Default Interface: IPhidgetWeightSensor
// Def. Intf. DISP? : No
// Event   Interface: _IPhidgetWeightSensorEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TPhidgetWeightSensorProperties= class;
{$ENDIF}
  TPhidgetWeightSensor = class(TOleServer)
  private
    FOnAttach: TNotifyEvent;
    FOnDetach: TNotifyEvent;
    FOnError: TPhidgetWeightSensorOnError;
    FOnWeightChange: TPhidgetWeightSensorOnWeightChange;
    FIntf:        IPhidgetWeightSensor;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TPhidgetWeightSensorProperties;
    function      GetServerProperties: TPhidgetWeightSensorProperties;
{$ENDIF}
    function      GetDefaultInterface: IPhidgetWeightSensor;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_WeightChangeTrigger: Double;
    procedure Set_WeightChangeTrigger(pVal: Double);
    function Get_Weight: Double;
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IPhidgetWeightSensor);
    procedure Disconnect; override;
    procedure Open(SerialNumber: Integer);
    property DefaultInterface: IPhidgetWeightSensor read GetDefaultInterface;
    property DeviceType: WideString read Get_DeviceType;
    property SerialNumber: SYSINT read Get_SerialNumber;
    property Name: WideString read Get_Name;
    property Tag: OleVariant read Get_Tag write Set_Tag;
    property IsAttached: WordBool read Get_IsAttached;
    property DeviceVersion: Single read Get_DeviceVersion;
    property LibraryVersion: WideString read Get_LibraryVersion;
    property Weight: Double read Get_Weight;
    property WeightChangeTrigger: Double read Get_WeightChangeTrigger write Set_WeightChangeTrigger;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TPhidgetWeightSensorProperties read GetServerProperties;
{$ENDIF}
    property OnAttach: TNotifyEvent read FOnAttach write FOnAttach;
    property OnDetach: TNotifyEvent read FOnDetach write FOnDetach;
    property OnError: TPhidgetWeightSensorOnError read FOnError write FOnError;
    property OnWeightChange: TPhidgetWeightSensorOnWeightChange read FOnWeightChange write FOnWeightChange;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TPhidgetWeightSensor
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TPhidgetWeightSensorProperties = class(TPersistent)
  private
    FServer:    TPhidgetWeightSensor;
    function    GetDefaultInterface: IPhidgetWeightSensor;
    constructor Create(AServer: TPhidgetWeightSensor);
  protected
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_WeightChangeTrigger: Double;
    procedure Set_WeightChangeTrigger(pVal: Double);
    function Get_Weight: Double;
  public
    property DefaultInterface: IPhidgetWeightSensor read GetDefaultInterface;
  published
    property WeightChangeTrigger: Double read Get_WeightChangeTrigger write Set_WeightChangeTrigger;
  end;
{$ENDIF}


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

  TPhidgetTextLCDOnError = procedure(ASender: TObject; const Description: WideString; SCODE: Integer) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TPhidgetTextLCD
// Help String      : PhidgetTextLCD Class.
// Default Interface: IPhidgetTextLCD
// Def. Intf. DISP? : No
// Event   Interface: _IPhidgetTextLCDEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TPhidgetTextLCDProperties= class;
{$ENDIF}
  TPhidgetTextLCD = class(TOleServer)
  private
    FOnAttach: TNotifyEvent;
    FOnDetach: TNotifyEvent;
    FOnError: TPhidgetTextLCDOnError;
    FIntf:        IPhidgetTextLCD;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TPhidgetTextLCDProperties;
    function      GetServerProperties: TPhidgetTextLCDProperties;
{$ENDIF}
    function      GetDefaultInterface: IPhidgetTextLCD;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    procedure Set_DisplayString(Row: Integer; const Param2: WideString);
    function Get_NumRows: Integer;
    function Get_NumColumns: Integer;
    function Get_Backlight: WordBool;
    procedure Set_Backlight(pVal: WordBool);
    function Get_CursorOn: WordBool;
    procedure Set_CursorOn(pVal: WordBool);
    function Get_CursorBlink: WordBool;
    procedure Set_CursorBlink(pVal: WordBool);
    function Get_Contrast: Integer;
    procedure Set_Contrast(pVal: Integer);
    procedure Set_CustomCharacter(Index: Integer; Val1: Integer; Param3: Integer);
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IPhidgetTextLCD);
    procedure Disconnect; override;
    procedure Open(SerialNumber: Integer);
    property DefaultInterface: IPhidgetTextLCD read GetDefaultInterface;
    property DeviceType: WideString read Get_DeviceType;
    property SerialNumber: SYSINT read Get_SerialNumber;
    property Name: WideString read Get_Name;
    property Tag: OleVariant read Get_Tag write Set_Tag;
    property IsAttached: WordBool read Get_IsAttached;
    property DeviceVersion: Single read Get_DeviceVersion;
    property LibraryVersion: WideString read Get_LibraryVersion;
    property DisplayString[Row: Integer]: WideString write Set_DisplayString;
    property NumRows: Integer read Get_NumRows;
    property NumColumns: Integer read Get_NumColumns;
    property CustomCharacter[Index: Integer; Val1: Integer]: Integer write Set_CustomCharacter;
    property Backlight: WordBool read Get_Backlight write Set_Backlight;
    property CursorOn: WordBool read Get_CursorOn write Set_CursorOn;
    property CursorBlink: WordBool read Get_CursorBlink write Set_CursorBlink;
    property Contrast: Integer read Get_Contrast write Set_Contrast;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TPhidgetTextLCDProperties read GetServerProperties;
{$ENDIF}
    property OnAttach: TNotifyEvent read FOnAttach write FOnAttach;
    property OnDetach: TNotifyEvent read FOnDetach write FOnDetach;
    property OnError: TPhidgetTextLCDOnError read FOnError write FOnError;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TPhidgetTextLCD
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TPhidgetTextLCDProperties = class(TPersistent)
  private
    FServer:    TPhidgetTextLCD;
    function    GetDefaultInterface: IPhidgetTextLCD;
    constructor Create(AServer: TPhidgetTextLCD);
  protected
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    procedure Set_DisplayString(Row: Integer; const Param2: WideString);
    function Get_NumRows: Integer;
    function Get_NumColumns: Integer;
    function Get_Backlight: WordBool;
    procedure Set_Backlight(pVal: WordBool);
    function Get_CursorOn: WordBool;
    procedure Set_CursorOn(pVal: WordBool);
    function Get_CursorBlink: WordBool;
    procedure Set_CursorBlink(pVal: WordBool);
    function Get_Contrast: Integer;
    procedure Set_Contrast(pVal: Integer);
    procedure Set_CustomCharacter(Index: Integer; Val1: Integer; Param3: Integer);
  public
    property DefaultInterface: IPhidgetTextLCD read GetDefaultInterface;
  published
    property Backlight: WordBool read Get_Backlight write Set_Backlight;
    property CursorOn: WordBool read Get_CursorOn write Set_CursorOn;
    property CursorBlink: WordBool read Get_CursorBlink write Set_CursorBlink;
    property Contrast: Integer read Get_Contrast write Set_Contrast;
  end;
{$ENDIF}


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

  TPhidgetMotorControlOnError = procedure(ASender: TObject; const Description: WideString; 
                                                            SCODE: Integer) of object;
  TPhidgetMotorControlOnInputChange = procedure(ASender: TObject; Index: Integer; NewState: WordBool) of object;
  TPhidgetMotorControlOnMotorChange = procedure(ASender: TObject; Index: Integer; newVal: Double) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TPhidgetMotorControl
// Help String      : PhidgetMotorControl Class.
// Default Interface: IPhidgetMotorControl
// Def. Intf. DISP? : No
// Event   Interface: _IPhidgetMotorControlEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TPhidgetMotorControlProperties= class;
{$ENDIF}
  TPhidgetMotorControl = class(TOleServer)
  private
    FOnAttach: TNotifyEvent;
    FOnDetach: TNotifyEvent;
    FOnError: TPhidgetMotorControlOnError;
    FOnInputChange: TPhidgetMotorControlOnInputChange;
    FOnMotorChange: TPhidgetMotorControlOnMotorChange;
    FIntf:        IPhidgetMotorControl;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TPhidgetMotorControlProperties;
    function      GetServerProperties: TPhidgetMotorControlProperties;
{$ENDIF}
    function      GetDefaultInterface: IPhidgetMotorControl;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_MotorSpeed(Index: Integer): Double;
    procedure Set_MotorSpeed(Index: Integer; pVal: Double);
    function Get_Acceleration(Index: Integer): Double;
    procedure Set_Acceleration(Index: Integer; pVal: Double);
    function Get_NumMotors: Integer;
    function Get_NumInputs: Integer;
    function Get_InputState(Index: Integer): WordBool;
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IPhidgetMotorControl);
    procedure Disconnect; override;
    procedure Open(SerialNumber: Integer);
    property DefaultInterface: IPhidgetMotorControl read GetDefaultInterface;
    property DeviceType: WideString read Get_DeviceType;
    property SerialNumber: SYSINT read Get_SerialNumber;
    property Name: WideString read Get_Name;
    property Tag: OleVariant read Get_Tag write Set_Tag;
    property IsAttached: WordBool read Get_IsAttached;
    property DeviceVersion: Single read Get_DeviceVersion;
    property LibraryVersion: WideString read Get_LibraryVersion;
    property MotorSpeed[Index: Integer]: Double read Get_MotorSpeed write Set_MotorSpeed;
    property Acceleration[Index: Integer]: Double read Get_Acceleration write Set_Acceleration;
    property NumMotors: Integer read Get_NumMotors;
    property NumInputs: Integer read Get_NumInputs;
    property InputState[Index: Integer]: WordBool read Get_InputState;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TPhidgetMotorControlProperties read GetServerProperties;
{$ENDIF}
    property OnAttach: TNotifyEvent read FOnAttach write FOnAttach;
    property OnDetach: TNotifyEvent read FOnDetach write FOnDetach;
    property OnError: TPhidgetMotorControlOnError read FOnError write FOnError;
    property OnInputChange: TPhidgetMotorControlOnInputChange read FOnInputChange write FOnInputChange;
    property OnMotorChange: TPhidgetMotorControlOnMotorChange read FOnMotorChange write FOnMotorChange;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TPhidgetMotorControl
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TPhidgetMotorControlProperties = class(TPersistent)
  private
    FServer:    TPhidgetMotorControl;
    function    GetDefaultInterface: IPhidgetMotorControl;
    constructor Create(AServer: TPhidgetMotorControl);
  protected
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_MotorSpeed(Index: Integer): Double;
    procedure Set_MotorSpeed(Index: Integer; pVal: Double);
    function Get_Acceleration(Index: Integer): Double;
    procedure Set_Acceleration(Index: Integer; pVal: Double);
    function Get_NumMotors: Integer;
    function Get_NumInputs: Integer;
    function Get_InputState(Index: Integer): WordBool;
  public
    property DefaultInterface: IPhidgetMotorControl read GetDefaultInterface;
  published
  end;
{$ENDIF}


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

  TPhidgetAdvancedServoOnError = procedure(ASender: TObject; const Description: WideString; 
                                                             SCODE: Integer) of object;
  TPhidgetAdvancedServoOnPositionChange = procedure(ASender: TObject; Index: Integer; 
                                                                      Position: Single) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TPhidgetAdvancedServo
// Help String      : PhidgetAdvancedServo Class.
// Default Interface: IPhidgetAdvancedServo
// Def. Intf. DISP? : No
// Event   Interface: _IPhidgetAdvancedServoEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TPhidgetAdvancedServoProperties= class;
{$ENDIF}
  TPhidgetAdvancedServo = class(TOleServer)
  private
    FOnAttach: TNotifyEvent;
    FOnDetach: TNotifyEvent;
    FOnError: TPhidgetAdvancedServoOnError;
    FOnPositionChange: TPhidgetAdvancedServoOnPositionChange;
    FIntf:        IPhidgetAdvancedServo;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TPhidgetAdvancedServoProperties;
    function      GetServerProperties: TPhidgetAdvancedServoProperties;
{$ENDIF}
    function      GetDefaultInterface: IPhidgetAdvancedServo;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_MotorPosition(Index: Integer): Single;
    procedure Set_MotorPosition(Index: Integer; pVal: Single);
    function Get_MaxVelocity(Index: Integer): Single;
    procedure Set_MaxVelocity(Index: Integer; pVal: Single);
    function Get_Acceleration(Index: Integer): Single;
    procedure Set_Acceleration(Index: Integer; pVal: Single);
    function Get_MotorEnabled(Index: Integer): WordBool;
    procedure Set_MotorEnabled(Index: Integer; pVal: WordBool);
    function Get_NumMotors: Integer;
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IPhidgetAdvancedServo);
    procedure Disconnect; override;
    procedure Open(SerialNumber: Integer);
    property DefaultInterface: IPhidgetAdvancedServo read GetDefaultInterface;
    property DeviceType: WideString read Get_DeviceType;
    property SerialNumber: SYSINT read Get_SerialNumber;
    property Name: WideString read Get_Name;
    property Tag: OleVariant read Get_Tag write Set_Tag;
    property IsAttached: WordBool read Get_IsAttached;
    property DeviceVersion: Single read Get_DeviceVersion;
    property LibraryVersion: WideString read Get_LibraryVersion;
    property MotorPosition[Index: Integer]: Single read Get_MotorPosition write Set_MotorPosition;
    property MaxVelocity[Index: Integer]: Single read Get_MaxVelocity write Set_MaxVelocity;
    property Acceleration[Index: Integer]: Single read Get_Acceleration write Set_Acceleration;
    property MotorEnabled[Index: Integer]: WordBool read Get_MotorEnabled write Set_MotorEnabled;
    property NumMotors: Integer read Get_NumMotors;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TPhidgetAdvancedServoProperties read GetServerProperties;
{$ENDIF}
    property OnAttach: TNotifyEvent read FOnAttach write FOnAttach;
    property OnDetach: TNotifyEvent read FOnDetach write FOnDetach;
    property OnError: TPhidgetAdvancedServoOnError read FOnError write FOnError;
    property OnPositionChange: TPhidgetAdvancedServoOnPositionChange read FOnPositionChange write FOnPositionChange;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TPhidgetAdvancedServo
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TPhidgetAdvancedServoProperties = class(TPersistent)
  private
    FServer:    TPhidgetAdvancedServo;
    function    GetDefaultInterface: IPhidgetAdvancedServo;
    constructor Create(AServer: TPhidgetAdvancedServo);
  protected
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_MotorPosition(Index: Integer): Single;
    procedure Set_MotorPosition(Index: Integer; pVal: Single);
    function Get_MaxVelocity(Index: Integer): Single;
    procedure Set_MaxVelocity(Index: Integer; pVal: Single);
    function Get_Acceleration(Index: Integer): Single;
    procedure Set_Acceleration(Index: Integer; pVal: Single);
    function Get_MotorEnabled(Index: Integer): WordBool;
    procedure Set_MotorEnabled(Index: Integer; pVal: WordBool);
    function Get_NumMotors: Integer;
  public
    property DefaultInterface: IPhidgetAdvancedServo read GetDefaultInterface;
  published
  end;
{$ENDIF}


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

  TPhidgetLEDOnError = procedure(ASender: TObject; const Description: WideString; SCODE: Integer) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TPhidgetLED
// Help String      : PhidgetLED Class.
// Default Interface: IPhidgetLED
// Def. Intf. DISP? : No
// Event   Interface: _IPhidgetLEDEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TPhidgetLEDProperties= class;
{$ENDIF}
  TPhidgetLED = class(TOleServer)
  private
    FOnAttach: TNotifyEvent;
    FOnDetach: TNotifyEvent;
    FOnError: TPhidgetLEDOnError;
    FIntf:        IPhidgetLED;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TPhidgetLEDProperties;
    function      GetServerProperties: TPhidgetLEDProperties;
{$ENDIF}
    function      GetDefaultInterface: IPhidgetLED;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    procedure Set_DiscreteLED(Index: Integer; pVal: Integer);
    function Get_DiscreteLED(Index: Integer): Integer;
    function Get_NumLEDs: Integer;
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IPhidgetLED);
    procedure Disconnect; override;
    procedure Open(SerialNumber: Integer);
    property DefaultInterface: IPhidgetLED read GetDefaultInterface;
    property DeviceType: WideString read Get_DeviceType;
    property SerialNumber: SYSINT read Get_SerialNumber;
    property Name: WideString read Get_Name;
    property Tag: OleVariant read Get_Tag write Set_Tag;
    property IsAttached: WordBool read Get_IsAttached;
    property DeviceVersion: Single read Get_DeviceVersion;
    property LibraryVersion: WideString read Get_LibraryVersion;
    property DiscreteLED[Index: Integer]: Integer read Get_DiscreteLED write Set_DiscreteLED;
    property NumLEDs: Integer read Get_NumLEDs;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TPhidgetLEDProperties read GetServerProperties;
{$ENDIF}
    property OnAttach: TNotifyEvent read FOnAttach write FOnAttach;
    property OnDetach: TNotifyEvent read FOnDetach write FOnDetach;
    property OnError: TPhidgetLEDOnError read FOnError write FOnError;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TPhidgetLED
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TPhidgetLEDProperties = class(TPersistent)
  private
    FServer:    TPhidgetLED;
    function    GetDefaultInterface: IPhidgetLED;
    constructor Create(AServer: TPhidgetLED);
  protected
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    procedure Set_DiscreteLED(Index: Integer; pVal: Integer);
    function Get_DiscreteLED(Index: Integer): Integer;
    function Get_NumLEDs: Integer;
  public
    property DefaultInterface: IPhidgetLED read GetDefaultInterface;
  published
  end;
{$ENDIF}


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

  TPhidgetEncoderOnError = procedure(ASender: TObject; const Description: WideString; SCODE: Integer) of object;
  TPhidgetEncoderOnInputChange = procedure(ASender: TObject; Index: Integer; NewState: WordBool) of object;
  TPhidgetEncoderOnPositionChange = procedure(ASender: TObject; Index: Integer; Time: Integer; 
                                                                EncoderDisplacement: Integer) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TPhidgetEncoder
// Help String      : PhidgetEncoder Class.
// Default Interface: IPhidgetEncoder
// Def. Intf. DISP? : No
// Event   Interface: _IPhidgetEncoderEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TPhidgetEncoderProperties= class;
{$ENDIF}
  TPhidgetEncoder = class(TOleServer)
  private
    FOnAttach: TNotifyEvent;
    FOnDetach: TNotifyEvent;
    FOnError: TPhidgetEncoderOnError;
    FOnInputChange: TPhidgetEncoderOnInputChange;
    FOnPositionChange: TPhidgetEncoderOnPositionChange;
    FIntf:        IPhidgetEncoder;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TPhidgetEncoderProperties;
    function      GetServerProperties: TPhidgetEncoderProperties;
{$ENDIF}
    function      GetDefaultInterface: IPhidgetEncoder;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_EncoderPosition(Index: Integer): Integer;
    procedure Set_EncoderPosition(Index: Integer; pVal: Integer);
    function Get_InputState(Index: Integer): WordBool;
    function Get_NumEncoders: Integer;
    function Get_NumInputs: Integer;
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IPhidgetEncoder);
    procedure Disconnect; override;
    procedure Open(SerialNumber: Integer);
    property DefaultInterface: IPhidgetEncoder read GetDefaultInterface;
    property DeviceType: WideString read Get_DeviceType;
    property SerialNumber: SYSINT read Get_SerialNumber;
    property Name: WideString read Get_Name;
    property Tag: OleVariant read Get_Tag write Set_Tag;
    property IsAttached: WordBool read Get_IsAttached;
    property DeviceVersion: Single read Get_DeviceVersion;
    property LibraryVersion: WideString read Get_LibraryVersion;
    property EncoderPosition[Index: Integer]: Integer read Get_EncoderPosition write Set_EncoderPosition;
    property InputState[Index: Integer]: WordBool read Get_InputState;
    property NumEncoders: Integer read Get_NumEncoders;
    property NumInputs: Integer read Get_NumInputs;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TPhidgetEncoderProperties read GetServerProperties;
{$ENDIF}
    property OnAttach: TNotifyEvent read FOnAttach write FOnAttach;
    property OnDetach: TNotifyEvent read FOnDetach write FOnDetach;
    property OnError: TPhidgetEncoderOnError read FOnError write FOnError;
    property OnInputChange: TPhidgetEncoderOnInputChange read FOnInputChange write FOnInputChange;
    property OnPositionChange: TPhidgetEncoderOnPositionChange read FOnPositionChange write FOnPositionChange;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TPhidgetEncoder
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TPhidgetEncoderProperties = class(TPersistent)
  private
    FServer:    TPhidgetEncoder;
    function    GetDefaultInterface: IPhidgetEncoder;
    constructor Create(AServer: TPhidgetEncoder);
  protected
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_EncoderPosition(Index: Integer): Integer;
    procedure Set_EncoderPosition(Index: Integer; pVal: Integer);
    function Get_InputState(Index: Integer): WordBool;
    function Get_NumEncoders: Integer;
    function Get_NumInputs: Integer;
  public
    property DefaultInterface: IPhidgetEncoder read GetDefaultInterface;
  published
  end;
{$ENDIF}


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

  TPhidgetStepperOnError = procedure(ASender: TObject; const Description: WideString; SCODE: Integer) of object;
  TPhidgetStepperOnInputChange = procedure(ASender: TObject; Index: Integer; NewState: WordBool) of object;
  TPhidgetStepperOnPositionChange = procedure(ASender: TObject; Index: Integer; newVal: Double) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TPhidgetStepper
// Help String      : PhidgetStepper Class.
// Default Interface: IPhidgetStepper
// Def. Intf. DISP? : No
// Event   Interface: _IPhidgetStepperEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TPhidgetStepperProperties= class;
{$ENDIF}
  TPhidgetStepper = class(TOleServer)
  private
    FOnAttach: TNotifyEvent;
    FOnDetach: TNotifyEvent;
    FOnError: TPhidgetStepperOnError;
    FOnInputChange: TPhidgetStepperOnInputChange;
    FOnPositionChange: TPhidgetStepperOnPositionChange;
    FIntf:        IPhidgetStepper;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TPhidgetStepperProperties;
    function      GetServerProperties: TPhidgetStepperProperties;
{$ENDIF}
    function      GetDefaultInterface: IPhidgetStepper;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_MotorPosition(Index: Integer): Double;
    procedure Set_MotorPosition(Index: Integer; pVal: Double);
    function Get_Acceleration(Index: Integer): Double;
    procedure Set_Acceleration(Index: Integer; pVal: Double);
    function Get_MotorSpeed(Index: Integer): Double;
    procedure Set_MotorSpeed(Index: Integer; pVal: Double);
    function Get_NumMotors: Integer;
    function Get_NumInputs: Integer;
    function Get_InputState(Index: Integer): WordBool;
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IPhidgetStepper);
    procedure Disconnect; override;
    procedure Open(SerialNumber: Integer);
    property DefaultInterface: IPhidgetStepper read GetDefaultInterface;
    property DeviceType: WideString read Get_DeviceType;
    property SerialNumber: SYSINT read Get_SerialNumber;
    property Name: WideString read Get_Name;
    property Tag: OleVariant read Get_Tag write Set_Tag;
    property IsAttached: WordBool read Get_IsAttached;
    property DeviceVersion: Single read Get_DeviceVersion;
    property LibraryVersion: WideString read Get_LibraryVersion;
    property MotorPosition[Index: Integer]: Double read Get_MotorPosition write Set_MotorPosition;
    property Acceleration[Index: Integer]: Double read Get_Acceleration write Set_Acceleration;
    property MotorSpeed[Index: Integer]: Double read Get_MotorSpeed write Set_MotorSpeed;
    property NumMotors: Integer read Get_NumMotors;
    property NumInputs: Integer read Get_NumInputs;
    property InputState[Index: Integer]: WordBool read Get_InputState;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TPhidgetStepperProperties read GetServerProperties;
{$ENDIF}
    property OnAttach: TNotifyEvent read FOnAttach write FOnAttach;
    property OnDetach: TNotifyEvent read FOnDetach write FOnDetach;
    property OnError: TPhidgetStepperOnError read FOnError write FOnError;
    property OnInputChange: TPhidgetStepperOnInputChange read FOnInputChange write FOnInputChange;
    property OnPositionChange: TPhidgetStepperOnPositionChange read FOnPositionChange write FOnPositionChange;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TPhidgetStepper
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TPhidgetStepperProperties = class(TPersistent)
  private
    FServer:    TPhidgetStepper;
    function    GetDefaultInterface: IPhidgetStepper;
    constructor Create(AServer: TPhidgetStepper);
  protected
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_MotorPosition(Index: Integer): Double;
    procedure Set_MotorPosition(Index: Integer; pVal: Double);
    function Get_Acceleration(Index: Integer): Double;
    procedure Set_Acceleration(Index: Integer; pVal: Double);
    function Get_MotorSpeed(Index: Integer): Double;
    procedure Set_MotorSpeed(Index: Integer; pVal: Double);
    function Get_NumMotors: Integer;
    function Get_NumInputs: Integer;
    function Get_InputState(Index: Integer): WordBool;
  public
    property DefaultInterface: IPhidgetStepper read GetDefaultInterface;
  published
  end;
{$ENDIF}


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

  TPhidgetTemperatureSensorOnError = procedure(ASender: TObject; const Description: WideString; 
                                                                 SCODE: Integer) of object;
  TPhidgetTemperatureSensorOnTemperatureChange = procedure(ASender: TObject; Index: Integer; 
                                                                             Temperature: Single) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TPhidgetTemperatureSensor
// Help String      : PhidgetTemperatureSensor Class.
// Default Interface: IPhidgetTemperatureSensor
// Def. Intf. DISP? : No
// Event   Interface: _IPhidgetTemperatureSensorEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TPhidgetTemperatureSensorProperties= class;
{$ENDIF}
  TPhidgetTemperatureSensor = class(TOleServer)
  private
    FOnAttach: TNotifyEvent;
    FOnDetach: TNotifyEvent;
    FOnError: TPhidgetTemperatureSensorOnError;
    FOnTemperatureChange: TPhidgetTemperatureSensorOnTemperatureChange;
    FIntf:        IPhidgetTemperatureSensor;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TPhidgetTemperatureSensorProperties;
    function      GetServerProperties: TPhidgetTemperatureSensorProperties;
{$ENDIF}
    function      GetDefaultInterface: IPhidgetTemperatureSensor;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_TemperatureChangeTrigger(Index: Integer): Double;
    procedure Set_TemperatureChangeTrigger(Index: Integer; pVal: Double);
    function Get_Temperature(Index: Integer): Double;
    function Get_NumTemperatureInputs: Integer;
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IPhidgetTemperatureSensor);
    procedure Disconnect; override;
    procedure Open(SerialNumber: Integer);
    property DefaultInterface: IPhidgetTemperatureSensor read GetDefaultInterface;
    property DeviceType: WideString read Get_DeviceType;
    property SerialNumber: SYSINT read Get_SerialNumber;
    property Name: WideString read Get_Name;
    property Tag: OleVariant read Get_Tag write Set_Tag;
    property IsAttached: WordBool read Get_IsAttached;
    property DeviceVersion: Single read Get_DeviceVersion;
    property LibraryVersion: WideString read Get_LibraryVersion;
    property TemperatureChangeTrigger[Index: Integer]: Double read Get_TemperatureChangeTrigger write Set_TemperatureChangeTrigger;
    property Temperature[Index: Integer]: Double read Get_Temperature;
    property NumTemperatureInputs: Integer read Get_NumTemperatureInputs;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TPhidgetTemperatureSensorProperties read GetServerProperties;
{$ENDIF}
    property OnAttach: TNotifyEvent read FOnAttach write FOnAttach;
    property OnDetach: TNotifyEvent read FOnDetach write FOnDetach;
    property OnError: TPhidgetTemperatureSensorOnError read FOnError write FOnError;
    property OnTemperatureChange: TPhidgetTemperatureSensorOnTemperatureChange read FOnTemperatureChange write FOnTemperatureChange;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TPhidgetTemperatureSensor
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TPhidgetTemperatureSensorProperties = class(TPersistent)
  private
    FServer:    TPhidgetTemperatureSensor;
    function    GetDefaultInterface: IPhidgetTemperatureSensor;
    constructor Create(AServer: TPhidgetTemperatureSensor);
  protected
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_TemperatureChangeTrigger(Index: Integer): Double;
    procedure Set_TemperatureChangeTrigger(Index: Integer; pVal: Double);
    function Get_Temperature(Index: Integer): Double;
    function Get_NumTemperatureInputs: Integer;
  public
    property DefaultInterface: IPhidgetTemperatureSensor read GetDefaultInterface;
  published
  end;
{$ENDIF}


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

  TPhidgetAccelerometerOnError = procedure(ASender: TObject; const Description: WideString; 
                                                             SCODE: Integer) of object;
  TPhidgetAccelerometerOnAccelerationChange = procedure(ASender: TObject; Index: Integer; 
                                                                          Acceleration: Double) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TPhidgetAccelerometer
// Help String      : PhidgetAccelerometer Class.
// Default Interface: IPhidgetAccelerometer
// Def. Intf. DISP? : No
// Event   Interface: _IPhidgetAccelerometerEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TPhidgetAccelerometerProperties= class;
{$ENDIF}
  TPhidgetAccelerometer = class(TOleServer)
  private
    FOnAttach: TNotifyEvent;
    FOnDetach: TNotifyEvent;
    FOnError: TPhidgetAccelerometerOnError;
    FOnAccelerationChange: TPhidgetAccelerometerOnAccelerationChange;
    FIntf:        IPhidgetAccelerometer;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TPhidgetAccelerometerProperties;
    function      GetServerProperties: TPhidgetAccelerometerProperties;
{$ENDIF}
    function      GetDefaultInterface: IPhidgetAccelerometer;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_AccelerationChangeTrigger(Index: Integer): Double;
    procedure Set_AccelerationChangeTrigger(Index: Integer; pVal: Double);
    function Get_Acceleration(Index: Integer): Double;
    function Get_NumAxis: Integer;
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IPhidgetAccelerometer);
    procedure Disconnect; override;
    procedure Open(SerialNumber: Integer);
    property DefaultInterface: IPhidgetAccelerometer read GetDefaultInterface;
    property DeviceType: WideString read Get_DeviceType;
    property SerialNumber: SYSINT read Get_SerialNumber;
    property Name: WideString read Get_Name;
    property Tag: OleVariant read Get_Tag write Set_Tag;
    property IsAttached: WordBool read Get_IsAttached;
    property DeviceVersion: Single read Get_DeviceVersion;
    property LibraryVersion: WideString read Get_LibraryVersion;
    property AccelerationChangeTrigger[Index: Integer]: Double read Get_AccelerationChangeTrigger write Set_AccelerationChangeTrigger;
    property Acceleration[Index: Integer]: Double read Get_Acceleration;
    property NumAxis: Integer read Get_NumAxis;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TPhidgetAccelerometerProperties read GetServerProperties;
{$ENDIF}
    property OnAttach: TNotifyEvent read FOnAttach write FOnAttach;
    property OnDetach: TNotifyEvent read FOnDetach write FOnDetach;
    property OnError: TPhidgetAccelerometerOnError read FOnError write FOnError;
    property OnAccelerationChange: TPhidgetAccelerometerOnAccelerationChange read FOnAccelerationChange write FOnAccelerationChange;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TPhidgetAccelerometer
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TPhidgetAccelerometerProperties = class(TPersistent)
  private
    FServer:    TPhidgetAccelerometer;
    function    GetDefaultInterface: IPhidgetAccelerometer;
    constructor Create(AServer: TPhidgetAccelerometer);
  protected
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    function Get_AccelerationChangeTrigger(Index: Integer): Double;
    procedure Set_AccelerationChangeTrigger(Index: Integer; pVal: Double);
    function Get_Acceleration(Index: Integer): Double;
    function Get_NumAxis: Integer;
  public
    property DefaultInterface: IPhidgetAccelerometer read GetDefaultInterface;
  published
  end;
{$ENDIF}


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

  TPhidgetTextLEDOnError = procedure(ASender: TObject; const Description: WideString; SCODE: Integer) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TPhidgetTextLED
// Help String      : PhidgetTextLED Class.
// Default Interface: IPhidgetTextLED
// Def. Intf. DISP? : No
// Event   Interface: _IPhidgetTextLEDEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TPhidgetTextLEDProperties= class;
{$ENDIF}
  TPhidgetTextLED = class(TOleServer)
  private
    FOnAttach: TNotifyEvent;
    FOnDetach: TNotifyEvent;
    FOnError: TPhidgetTextLEDOnError;
    FIntf:        IPhidgetTextLED;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TPhidgetTextLEDProperties;
    function      GetServerProperties: TPhidgetTextLEDProperties;
{$ENDIF}
    function      GetDefaultInterface: IPhidgetTextLED;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    procedure Set_DisplayString(Row: Integer; const Param2: WideString);
    function Get_NumRows: Integer;
    function Get_NumColumns: Integer;
    function Get_Brightness: Integer;
    procedure Set_Brightness(pVal: Integer);
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IPhidgetTextLED);
    procedure Disconnect; override;
    procedure Open(SerialNumber: Integer);
    property DefaultInterface: IPhidgetTextLED read GetDefaultInterface;
    property DeviceType: WideString read Get_DeviceType;
    property SerialNumber: SYSINT read Get_SerialNumber;
    property Name: WideString read Get_Name;
    property Tag: OleVariant read Get_Tag write Set_Tag;
    property IsAttached: WordBool read Get_IsAttached;
    property DeviceVersion: Single read Get_DeviceVersion;
    property LibraryVersion: WideString read Get_LibraryVersion;
    property DisplayString[Row: Integer]: WideString write Set_DisplayString;
    property NumRows: Integer read Get_NumRows;
    property NumColumns: Integer read Get_NumColumns;
    property Brightness: Integer read Get_Brightness write Set_Brightness;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TPhidgetTextLEDProperties read GetServerProperties;
{$ENDIF}
    property OnAttach: TNotifyEvent read FOnAttach write FOnAttach;
    property OnDetach: TNotifyEvent read FOnDetach write FOnDetach;
    property OnError: TPhidgetTextLEDOnError read FOnError write FOnError;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TPhidgetTextLED
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TPhidgetTextLEDProperties = class(TPersistent)
  private
    FServer:    TPhidgetTextLED;
    function    GetDefaultInterface: IPhidgetTextLED;
    constructor Create(AServer: TPhidgetTextLED);
  protected
    function Get_DeviceType: WideString;
    function Get_SerialNumber: SYSINT;
    function Get_Name: WideString;
    function Get_Tag: OleVariant;
    procedure Set_Tag(pVal: OleVariant);
    function Get_IsAttached: WordBool;
    function Get_DeviceVersion: Single;
    function Get_LibraryVersion: WideString;
    procedure Set_DisplayString(Row: Integer; const Param2: WideString);
    function Get_NumRows: Integer;
    function Get_NumColumns: Integer;
    function Get_Brightness: Integer;
    procedure Set_Brightness(pVal: Integer);
  public
    property DefaultInterface: IPhidgetTextLED read GetDefaultInterface;
  published
    property Brightness: Integer read Get_Brightness write Set_Brightness;
  end;
{$ENDIF}


procedure Register;

resourcestring
  dtlServerPage = 'Servers';

  dtlOcxPage = 'ActiveX';

implementation

uses ComObj;

class function CoPhidgetManager.Create: IPhidgetManager;
begin
  Result := CreateComObject(CLASS_PhidgetManager) as IPhidgetManager;
end;

class function CoPhidgetManager.CreateRemote(const MachineName: string): IPhidgetManager;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_PhidgetManager) as IPhidgetManager;
end;

procedure TPhidgetManager.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{50484945-4745-5453-3000-000000000002}';
    IntfIID:   '{50484945-4745-5453-1000-000000000002}';
    EventIID:  '{50484945-4745-5453-2000-000000000002}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TPhidgetManager.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IPhidgetManager;
  end;
end;

procedure TPhidgetManager.ConnectTo(svrIntf: IPhidgetManager);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TPhidgetManager.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TPhidgetManager.GetDefaultInterface: IPhidgetManager;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TPhidgetManager.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TPhidgetManagerProperties.Create(Self);
{$ENDIF}
end;

destructor TPhidgetManager.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPhidgetManager.GetServerProperties: TPhidgetManagerProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TPhidgetManager.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
    1: if Assigned(FOnAttach) then
         FOnAttach(Self,
                   Params[0] {const WideString},
                   Params[1] {const WideString},
                   Params[2] {Integer},
                   Params[3] {const WideString});
    2: if Assigned(FOnDetach) then
         FOnDetach(Self,
                   Params[0] {const WideString},
                   Params[1] {const WideString},
                   Params[2] {Integer},
                   Params[3] {const WideString});
  end; {case DispID}
end;

function TPhidgetManager.Get_Count: Integer;
begin
    Result := DefaultInterface.Count;
end;

function TPhidgetManager.Get_DeviceType(Index: Integer): WideString;
begin
    Result := DefaultInterface.DeviceType[Index];
end;

function TPhidgetManager.Get_DeviceName(Index: Integer): WideString;
begin
    Result := DefaultInterface.DeviceName[Index];
end;

function TPhidgetManager.Get_DeviceTag(Index: Integer): WideString;
begin
    Result := DefaultInterface.DeviceTag[Index];
end;

function TPhidgetManager.Get_DeviceSerial(Index: Integer): Integer;
begin
    Result := DefaultInterface.DeviceSerial[Index];
end;

procedure TPhidgetManager.Start;
begin
  DefaultInterface.Start;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPhidgetManagerProperties.Create(AServer: TPhidgetManager);
begin
  inherited Create;
  FServer := AServer;
end;

function TPhidgetManagerProperties.GetDefaultInterface: IPhidgetManager;
begin
  Result := FServer.DefaultInterface;
end;

function TPhidgetManagerProperties.Get_Count: Integer;
begin
    Result := DefaultInterface.Count;
end;

function TPhidgetManagerProperties.Get_DeviceType(Index: Integer): WideString;
begin
    Result := DefaultInterface.DeviceType[Index];
end;

function TPhidgetManagerProperties.Get_DeviceName(Index: Integer): WideString;
begin
    Result := DefaultInterface.DeviceName[Index];
end;

function TPhidgetManagerProperties.Get_DeviceTag(Index: Integer): WideString;
begin
    Result := DefaultInterface.DeviceTag[Index];
end;

function TPhidgetManagerProperties.Get_DeviceSerial(Index: Integer): Integer;
begin
    Result := DefaultInterface.DeviceSerial[Index];
end;

{$ENDIF}

class function CoPhidgetServo.Create: IPhidgetServo;
begin
  Result := CreateComObject(CLASS_PhidgetServo) as IPhidgetServo;
end;

class function CoPhidgetServo.CreateRemote(const MachineName: string): IPhidgetServo;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_PhidgetServo) as IPhidgetServo;
end;

procedure TPhidgetServo.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{50484945-4745-5453-3000-000000000004}';
    IntfIID:   '{50484945-4745-5453-1000-000000000004}';
    EventIID:  '{50484945-4745-5453-2000-000000000004}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TPhidgetServo.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IPhidgetServo;
  end;
end;

procedure TPhidgetServo.ConnectTo(svrIntf: IPhidgetServo);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TPhidgetServo.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TPhidgetServo.GetDefaultInterface: IPhidgetServo;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TPhidgetServo.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TPhidgetServoProperties.Create(Self);
{$ENDIF}
end;

destructor TPhidgetServo.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPhidgetServo.GetServerProperties: TPhidgetServoProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TPhidgetServo.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
    1: if Assigned(FOnAttach) then
         FOnAttach(Self);
    2: if Assigned(FOnDetach) then
         FOnDetach(Self);
    3: if Assigned(FOnError) then
         FOnError(Self,
                  Params[0] {const WideString},
                  Params[1] {Integer});
    4: if Assigned(FOnMotorPositionChange) then
         FOnMotorPositionChange(Self,
                                Params[0] {Integer},
                                Params[1] {Single});
  end; {case DispID}
end;

function TPhidgetServo.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetServo.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetServo.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetServo.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetServo.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetServo.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetServo.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetServo.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetServo.Get_MotorPosition(Index: Integer): Single;
begin
    Result := DefaultInterface.MotorPosition[Index];
end;

procedure TPhidgetServo.Set_MotorPosition(Index: Integer; pVal: Single);
begin
  DefaultInterface.MotorPosition[Index] := pVal;
end;

function TPhidgetServo.Get_NumMotors: Integer;
begin
    Result := DefaultInterface.NumMotors;
end;

procedure TPhidgetServo.Open(SerialNumber: Integer);
begin
  DefaultInterface.Open(SerialNumber);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPhidgetServoProperties.Create(AServer: TPhidgetServo);
begin
  inherited Create;
  FServer := AServer;
end;

function TPhidgetServoProperties.GetDefaultInterface: IPhidgetServo;
begin
  Result := FServer.DefaultInterface;
end;

function TPhidgetServoProperties.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetServoProperties.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetServoProperties.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetServoProperties.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetServoProperties.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetServoProperties.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetServoProperties.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetServoProperties.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetServoProperties.Get_MotorPosition(Index: Integer): Single;
begin
    Result := DefaultInterface.MotorPosition[Index];
end;

procedure TPhidgetServoProperties.Set_MotorPosition(Index: Integer; pVal: Single);
begin
  DefaultInterface.MotorPosition[Index] := pVal;
end;

function TPhidgetServoProperties.Get_NumMotors: Integer;
begin
    Result := DefaultInterface.NumMotors;
end;

{$ENDIF}

class function CoPhidgetInterfaceKit.Create: IPhidgetInterfaceKit;
begin
  Result := CreateComObject(CLASS_PhidgetInterfaceKit) as IPhidgetInterfaceKit;
end;

class function CoPhidgetInterfaceKit.CreateRemote(const MachineName: string): IPhidgetInterfaceKit;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_PhidgetInterfaceKit) as IPhidgetInterfaceKit;
end;

procedure TPhidgetInterfaceKit.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{50484945-4745-5453-3000-000000000003}';
    IntfIID:   '{50484945-4745-5453-1000-000000000003}';
    EventIID:  '{50484945-4745-5453-2000-000000000003}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TPhidgetInterfaceKit.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IPhidgetInterfaceKit;
  end;
end;

procedure TPhidgetInterfaceKit.ConnectTo(svrIntf: IPhidgetInterfaceKit);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TPhidgetInterfaceKit.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TPhidgetInterfaceKit.GetDefaultInterface: IPhidgetInterfaceKit;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TPhidgetInterfaceKit.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TPhidgetInterfaceKitProperties.Create(Self);
{$ENDIF}
end;

destructor TPhidgetInterfaceKit.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPhidgetInterfaceKit.GetServerProperties: TPhidgetInterfaceKitProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TPhidgetInterfaceKit.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
    1: if Assigned(FOnAttach) then
         FOnAttach(Self);
    2: if Assigned(FOnDetach) then
         FOnDetach(Self);
    3: if Assigned(FOnError) then
         FOnError(Self,
                  Params[0] {const WideString},
                  Params[1] {Integer});
    4: if Assigned(FOnInputChange) then
         FOnInputChange(Self,
                        Params[0] {Integer},
                        Params[1] {WordBool});
    5: if Assigned(FOnSensorChange) then
         FOnSensorChange(Self,
                         Params[0] {Integer},
                         Params[1] {Integer});
    6: if Assigned(FOnOutputChange) then
         FOnOutputChange(Self,
                         Params[0] {Integer},
                         Params[1] {WordBool});
  end; {case DispID}
end;

function TPhidgetInterfaceKit.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetInterfaceKit.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetInterfaceKit.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetInterfaceKit.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetInterfaceKit.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetInterfaceKit.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetInterfaceKit.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetInterfaceKit.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetInterfaceKit.Get_OutputState(Index: Integer): WordBool;
begin
    Result := DefaultInterface.OutputState[Index];
end;

procedure TPhidgetInterfaceKit.Set_OutputState(Index: Integer; pVal: WordBool);
begin
  DefaultInterface.OutputState[Index] := pVal;
end;

function TPhidgetInterfaceKit.Get_NumOutputs: Integer;
begin
    Result := DefaultInterface.NumOutputs;
end;

function TPhidgetInterfaceKit.Get_NumInputs: Integer;
begin
    Result := DefaultInterface.NumInputs;
end;

function TPhidgetInterfaceKit.Get_InputState(Index: Integer): WordBool;
begin
    Result := DefaultInterface.InputState[Index];
end;

function TPhidgetInterfaceKit.Get_NumSensors: Integer;
begin
    Result := DefaultInterface.NumSensors;
end;

function TPhidgetInterfaceKit.Get_SensorRawValue(Index: Integer): Integer;
begin
    Result := DefaultInterface.SensorRawValue[Index];
end;

function TPhidgetInterfaceKit.Get_SensorChangeTrigger(Index: Integer): Integer;
begin
    Result := DefaultInterface.SensorChangeTrigger[Index];
end;

procedure TPhidgetInterfaceKit.Set_SensorChangeTrigger(Index: Integer; pVal: Integer);
begin
  DefaultInterface.SensorChangeTrigger[Index] := pVal;
end;

function TPhidgetInterfaceKit.Get_SensorValue(Index: Integer): Integer;
begin
    Result := DefaultInterface.SensorValue[Index];
end;

procedure TPhidgetInterfaceKit.Set_Ratiometric(pVal: WordBool);
begin
  DefaultInterface.Set_Ratiometric(pVal);
end;

function TPhidgetInterfaceKit.Get_Ratiometric: WordBool;
begin
    Result := DefaultInterface.Ratiometric;
end;

procedure TPhidgetInterfaceKit.Open(SerialNumber: Integer);
begin
  DefaultInterface.Open(SerialNumber);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPhidgetInterfaceKitProperties.Create(AServer: TPhidgetInterfaceKit);
begin
  inherited Create;
  FServer := AServer;
end;

function TPhidgetInterfaceKitProperties.GetDefaultInterface: IPhidgetInterfaceKit;
begin
  Result := FServer.DefaultInterface;
end;

function TPhidgetInterfaceKitProperties.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetInterfaceKitProperties.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetInterfaceKitProperties.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetInterfaceKitProperties.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetInterfaceKitProperties.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetInterfaceKitProperties.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetInterfaceKitProperties.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetInterfaceKitProperties.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetInterfaceKitProperties.Get_OutputState(Index: Integer): WordBool;
begin
    Result := DefaultInterface.OutputState[Index];
end;

procedure TPhidgetInterfaceKitProperties.Set_OutputState(Index: Integer; pVal: WordBool);
begin
  DefaultInterface.OutputState[Index] := pVal;
end;

function TPhidgetInterfaceKitProperties.Get_NumOutputs: Integer;
begin
    Result := DefaultInterface.NumOutputs;
end;

function TPhidgetInterfaceKitProperties.Get_NumInputs: Integer;
begin
    Result := DefaultInterface.NumInputs;
end;

function TPhidgetInterfaceKitProperties.Get_InputState(Index: Integer): WordBool;
begin
    Result := DefaultInterface.InputState[Index];
end;

function TPhidgetInterfaceKitProperties.Get_NumSensors: Integer;
begin
    Result := DefaultInterface.NumSensors;
end;

function TPhidgetInterfaceKitProperties.Get_SensorRawValue(Index: Integer): Integer;
begin
    Result := DefaultInterface.SensorRawValue[Index];
end;

function TPhidgetInterfaceKitProperties.Get_SensorChangeTrigger(Index: Integer): Integer;
begin
    Result := DefaultInterface.SensorChangeTrigger[Index];
end;

procedure TPhidgetInterfaceKitProperties.Set_SensorChangeTrigger(Index: Integer; pVal: Integer);
begin
  DefaultInterface.SensorChangeTrigger[Index] := pVal;
end;

function TPhidgetInterfaceKitProperties.Get_SensorValue(Index: Integer): Integer;
begin
    Result := DefaultInterface.SensorValue[Index];
end;

procedure TPhidgetInterfaceKitProperties.Set_Ratiometric(pVal: WordBool);
begin
  DefaultInterface.Set_Ratiometric(pVal);
end;

function TPhidgetInterfaceKitProperties.Get_Ratiometric: WordBool;
begin
    Result := DefaultInterface.Ratiometric;
end;

{$ENDIF}

class function CoPhidgetRFID.Create: IPhidgetRFID;
begin
  Result := CreateComObject(CLASS_PhidgetRFID) as IPhidgetRFID;
end;

class function CoPhidgetRFID.CreateRemote(const MachineName: string): IPhidgetRFID;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_PhidgetRFID) as IPhidgetRFID;
end;

procedure TPhidgetRFID.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{50484945-4745-5453-3000-000000000007}';
    IntfIID:   '{50484945-4745-5453-1000-000000000007}';
    EventIID:  '{50484945-4745-5453-2000-000000000007}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TPhidgetRFID.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IPhidgetRFID;
  end;
end;

procedure TPhidgetRFID.ConnectTo(svrIntf: IPhidgetRFID);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TPhidgetRFID.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TPhidgetRFID.GetDefaultInterface: IPhidgetRFID;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TPhidgetRFID.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TPhidgetRFIDProperties.Create(Self);
{$ENDIF}
end;

destructor TPhidgetRFID.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPhidgetRFID.GetServerProperties: TPhidgetRFIDProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TPhidgetRFID.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
    1: if Assigned(FOnAttach) then
         FOnAttach(Self);
    2: if Assigned(FOnDetach) then
         FOnDetach(Self);
    3: if Assigned(FOnError) then
         FOnError(Self,
                  Params[0] {const WideString},
                  Params[1] {Integer});
    4: if Assigned(FOnTag) then
         FOnTag(Self, Params[0] {const WideString});
    5: if Assigned(FOnTagLost) then
         FOnTagLost(Self, Params[0] {const WideString});
    6: if Assigned(FOnOutputChange) then
         FOnOutputChange(Self,
                         Params[0] {Integer},
                         Params[1] {WordBool});
  end; {case DispID}
end;

function TPhidgetRFID.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetRFID.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetRFID.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetRFID.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetRFID.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetRFID.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetRFID.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetRFID.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetRFID.Get_OutputState(Index: Integer): WordBool;
begin
    Result := DefaultInterface.OutputState[Index];
end;

procedure TPhidgetRFID.Set_OutputState(Index: Integer; pVal: WordBool);
begin
  DefaultInterface.OutputState[Index] := pVal;
end;

function TPhidgetRFID.Get_NumOutputs: Integer;
begin
    Result := DefaultInterface.NumOutputs;
end;

function TPhidgetRFID.Get_AntennaOn: WordBool;
begin
    Result := DefaultInterface.AntennaOn;
end;

procedure TPhidgetRFID.Set_AntennaOn(pVal: WordBool);
begin
  DefaultInterface.Set_AntennaOn(pVal);
end;

function TPhidgetRFID.Get_LEDOn: WordBool;
begin
    Result := DefaultInterface.LEDOn;
end;

procedure TPhidgetRFID.Set_LEDOn(pVal: WordBool);
begin
  DefaultInterface.Set_LEDOn(pVal);
end;

function TPhidgetRFID.Get_LastTag: WideString;
begin
    Result := DefaultInterface.LastTag;
end;

procedure TPhidgetRFID.Open(SerialNumber: Integer);
begin
  DefaultInterface.Open(SerialNumber);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPhidgetRFIDProperties.Create(AServer: TPhidgetRFID);
begin
  inherited Create;
  FServer := AServer;
end;

function TPhidgetRFIDProperties.GetDefaultInterface: IPhidgetRFID;
begin
  Result := FServer.DefaultInterface;
end;

function TPhidgetRFIDProperties.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetRFIDProperties.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetRFIDProperties.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetRFIDProperties.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetRFIDProperties.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetRFIDProperties.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetRFIDProperties.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetRFIDProperties.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetRFIDProperties.Get_OutputState(Index: Integer): WordBool;
begin
    Result := DefaultInterface.OutputState[Index];
end;

procedure TPhidgetRFIDProperties.Set_OutputState(Index: Integer; pVal: WordBool);
begin
  DefaultInterface.OutputState[Index] := pVal;
end;

function TPhidgetRFIDProperties.Get_NumOutputs: Integer;
begin
    Result := DefaultInterface.NumOutputs;
end;

function TPhidgetRFIDProperties.Get_AntennaOn: WordBool;
begin
    Result := DefaultInterface.AntennaOn;
end;

procedure TPhidgetRFIDProperties.Set_AntennaOn(pVal: WordBool);
begin
  DefaultInterface.Set_AntennaOn(pVal);
end;

function TPhidgetRFIDProperties.Get_LEDOn: WordBool;
begin
    Result := DefaultInterface.LEDOn;
end;

procedure TPhidgetRFIDProperties.Set_LEDOn(pVal: WordBool);
begin
  DefaultInterface.Set_LEDOn(pVal);
end;

function TPhidgetRFIDProperties.Get_LastTag: WideString;
begin
    Result := DefaultInterface.LastTag;
end;

{$ENDIF}

class function CoPhidgetWeightSensor.Create: IPhidgetWeightSensor;
begin
  Result := CreateComObject(CLASS_PhidgetWeightSensor) as IPhidgetWeightSensor;
end;

class function CoPhidgetWeightSensor.CreateRemote(const MachineName: string): IPhidgetWeightSensor;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_PhidgetWeightSensor) as IPhidgetWeightSensor;
end;

procedure TPhidgetWeightSensor.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{50484945-4745-5453-3000-000000000008}';
    IntfIID:   '{50484945-4745-5453-1000-000000000008}';
    EventIID:  '{50484945-4745-5453-2000-000000000008}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TPhidgetWeightSensor.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IPhidgetWeightSensor;
  end;
end;

procedure TPhidgetWeightSensor.ConnectTo(svrIntf: IPhidgetWeightSensor);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TPhidgetWeightSensor.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TPhidgetWeightSensor.GetDefaultInterface: IPhidgetWeightSensor;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TPhidgetWeightSensor.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TPhidgetWeightSensorProperties.Create(Self);
{$ENDIF}
end;

destructor TPhidgetWeightSensor.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPhidgetWeightSensor.GetServerProperties: TPhidgetWeightSensorProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TPhidgetWeightSensor.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
    1: if Assigned(FOnAttach) then
         FOnAttach(Self);
    2: if Assigned(FOnDetach) then
         FOnDetach(Self);
    3: if Assigned(FOnError) then
         FOnError(Self,
                  Params[0] {const WideString},
                  Params[1] {Integer});
    4: if Assigned(FOnWeightChange) then
         FOnWeightChange(Self, Params[0] {Double});
  end; {case DispID}
end;

function TPhidgetWeightSensor.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetWeightSensor.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetWeightSensor.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetWeightSensor.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetWeightSensor.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetWeightSensor.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetWeightSensor.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetWeightSensor.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetWeightSensor.Get_WeightChangeTrigger: Double;
begin
    Result := DefaultInterface.WeightChangeTrigger;
end;

procedure TPhidgetWeightSensor.Set_WeightChangeTrigger(pVal: Double);
begin
  DefaultInterface.Set_WeightChangeTrigger(pVal);
end;

function TPhidgetWeightSensor.Get_Weight: Double;
begin
    Result := DefaultInterface.Weight;
end;

procedure TPhidgetWeightSensor.Open(SerialNumber: Integer);
begin
  DefaultInterface.Open(SerialNumber);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPhidgetWeightSensorProperties.Create(AServer: TPhidgetWeightSensor);
begin
  inherited Create;
  FServer := AServer;
end;

function TPhidgetWeightSensorProperties.GetDefaultInterface: IPhidgetWeightSensor;
begin
  Result := FServer.DefaultInterface;
end;

function TPhidgetWeightSensorProperties.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetWeightSensorProperties.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetWeightSensorProperties.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetWeightSensorProperties.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetWeightSensorProperties.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetWeightSensorProperties.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetWeightSensorProperties.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetWeightSensorProperties.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetWeightSensorProperties.Get_WeightChangeTrigger: Double;
begin
    Result := DefaultInterface.WeightChangeTrigger;
end;

procedure TPhidgetWeightSensorProperties.Set_WeightChangeTrigger(pVal: Double);
begin
  DefaultInterface.Set_WeightChangeTrigger(pVal);
end;

function TPhidgetWeightSensorProperties.Get_Weight: Double;
begin
    Result := DefaultInterface.Weight;
end;

{$ENDIF}

class function CoPhidgetTextLCD.Create: IPhidgetTextLCD;
begin
  Result := CreateComObject(CLASS_PhidgetTextLCD) as IPhidgetTextLCD;
end;

class function CoPhidgetTextLCD.CreateRemote(const MachineName: string): IPhidgetTextLCD;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_PhidgetTextLCD) as IPhidgetTextLCD;
end;

procedure TPhidgetTextLCD.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{50484945-4745-5453-3000-00000000000A}';
    IntfIID:   '{50484945-4745-5453-1000-00000000000A}';
    EventIID:  '{50484945-4745-5453-2000-00000000000A}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TPhidgetTextLCD.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IPhidgetTextLCD;
  end;
end;

procedure TPhidgetTextLCD.ConnectTo(svrIntf: IPhidgetTextLCD);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TPhidgetTextLCD.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TPhidgetTextLCD.GetDefaultInterface: IPhidgetTextLCD;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TPhidgetTextLCD.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TPhidgetTextLCDProperties.Create(Self);
{$ENDIF}
end;

destructor TPhidgetTextLCD.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPhidgetTextLCD.GetServerProperties: TPhidgetTextLCDProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TPhidgetTextLCD.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
    1: if Assigned(FOnAttach) then
         FOnAttach(Self);
    2: if Assigned(FOnDetach) then
         FOnDetach(Self);
    3: if Assigned(FOnError) then
         FOnError(Self,
                  Params[0] {const WideString},
                  Params[1] {Integer});
  end; {case DispID}
end;

function TPhidgetTextLCD.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetTextLCD.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetTextLCD.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetTextLCD.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetTextLCD.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetTextLCD.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetTextLCD.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetTextLCD.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

procedure TPhidgetTextLCD.Set_DisplayString(Row: Integer; const Param2: WideString);
  { Warning: The property DisplayString has a setter and a getter whose
    types do not match. Delphi was unable to generate a property of
    this sort and so is using a Variant as a passthrough. }
var
  InterfaceVariant: OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  InterfaceVariant.DisplayString := Param2;
end;

function TPhidgetTextLCD.Get_NumRows: Integer;
begin
    Result := DefaultInterface.NumRows;
end;

function TPhidgetTextLCD.Get_NumColumns: Integer;
begin
    Result := DefaultInterface.NumColumns;
end;

function TPhidgetTextLCD.Get_Backlight: WordBool;
begin
    Result := DefaultInterface.Backlight;
end;

procedure TPhidgetTextLCD.Set_Backlight(pVal: WordBool);
begin
  DefaultInterface.Set_Backlight(pVal);
end;

function TPhidgetTextLCD.Get_CursorOn: WordBool;
begin
    Result := DefaultInterface.CursorOn;
end;

procedure TPhidgetTextLCD.Set_CursorOn(pVal: WordBool);
begin
  DefaultInterface.Set_CursorOn(pVal);
end;

function TPhidgetTextLCD.Get_CursorBlink: WordBool;
begin
    Result := DefaultInterface.CursorBlink;
end;

procedure TPhidgetTextLCD.Set_CursorBlink(pVal: WordBool);
begin
  DefaultInterface.Set_CursorBlink(pVal);
end;

function TPhidgetTextLCD.Get_Contrast: Integer;
begin
    Result := DefaultInterface.Contrast;
end;

procedure TPhidgetTextLCD.Set_Contrast(pVal: Integer);
begin
  DefaultInterface.Set_Contrast(pVal);
end;

procedure TPhidgetTextLCD.Set_CustomCharacter(Index: Integer; Val1: Integer; Param3: Integer);
begin
  DefaultInterface.CustomCharacter[Index, Val1] := Param3;
end;

procedure TPhidgetTextLCD.Open(SerialNumber: Integer);
begin
  DefaultInterface.Open(SerialNumber);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPhidgetTextLCDProperties.Create(AServer: TPhidgetTextLCD);
begin
  inherited Create;
  FServer := AServer;
end;

function TPhidgetTextLCDProperties.GetDefaultInterface: IPhidgetTextLCD;
begin
  Result := FServer.DefaultInterface;
end;

function TPhidgetTextLCDProperties.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetTextLCDProperties.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetTextLCDProperties.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetTextLCDProperties.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetTextLCDProperties.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetTextLCDProperties.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetTextLCDProperties.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetTextLCDProperties.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

procedure TPhidgetTextLCDProperties.Set_DisplayString(Row: Integer; const Param2: WideString);
  { Warning: The property DisplayString has a setter and a getter whose
    types do not match. Delphi was unable to generate a property of
    this sort and so is using a Variant as a passthrough. }
var
  InterfaceVariant: OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  InterfaceVariant.DisplayString := Param2;
end;

function TPhidgetTextLCDProperties.Get_NumRows: Integer;
begin
    Result := DefaultInterface.NumRows;
end;

function TPhidgetTextLCDProperties.Get_NumColumns: Integer;
begin
    Result := DefaultInterface.NumColumns;
end;

function TPhidgetTextLCDProperties.Get_Backlight: WordBool;
begin
    Result := DefaultInterface.Backlight;
end;

procedure TPhidgetTextLCDProperties.Set_Backlight(pVal: WordBool);
begin
  DefaultInterface.Set_Backlight(pVal);
end;

function TPhidgetTextLCDProperties.Get_CursorOn: WordBool;
begin
    Result := DefaultInterface.CursorOn;
end;

procedure TPhidgetTextLCDProperties.Set_CursorOn(pVal: WordBool);
begin
  DefaultInterface.Set_CursorOn(pVal);
end;

function TPhidgetTextLCDProperties.Get_CursorBlink: WordBool;
begin
    Result := DefaultInterface.CursorBlink;
end;

procedure TPhidgetTextLCDProperties.Set_CursorBlink(pVal: WordBool);
begin
  DefaultInterface.Set_CursorBlink(pVal);
end;

function TPhidgetTextLCDProperties.Get_Contrast: Integer;
begin
    Result := DefaultInterface.Contrast;
end;

procedure TPhidgetTextLCDProperties.Set_Contrast(pVal: Integer);
begin
  DefaultInterface.Set_Contrast(pVal);
end;

procedure TPhidgetTextLCDProperties.Set_CustomCharacter(Index: Integer; Val1: Integer; 
                                                        Param3: Integer);
begin
  DefaultInterface.CustomCharacter[Index, Val1] := Param3;
end;

{$ENDIF}

class function CoPhidgetMotorControl.Create: IPhidgetMotorControl;
begin
  Result := CreateComObject(CLASS_PhidgetMotorControl) as IPhidgetMotorControl;
end;

class function CoPhidgetMotorControl.CreateRemote(const MachineName: string): IPhidgetMotorControl;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_PhidgetMotorControl) as IPhidgetMotorControl;
end;

procedure TPhidgetMotorControl.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{50484945-4745-5453-3000-00000000000B}';
    IntfIID:   '{50484945-4745-5453-1000-00000000000B}';
    EventIID:  '{50484945-4745-5453-2000-00000000000B}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TPhidgetMotorControl.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IPhidgetMotorControl;
  end;
end;

procedure TPhidgetMotorControl.ConnectTo(svrIntf: IPhidgetMotorControl);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TPhidgetMotorControl.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TPhidgetMotorControl.GetDefaultInterface: IPhidgetMotorControl;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TPhidgetMotorControl.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TPhidgetMotorControlProperties.Create(Self);
{$ENDIF}
end;

destructor TPhidgetMotorControl.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPhidgetMotorControl.GetServerProperties: TPhidgetMotorControlProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TPhidgetMotorControl.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
    1: if Assigned(FOnAttach) then
         FOnAttach(Self);
    2: if Assigned(FOnDetach) then
         FOnDetach(Self);
    3: if Assigned(FOnError) then
         FOnError(Self,
                  Params[0] {const WideString},
                  Params[1] {Integer});
    4: if Assigned(FOnInputChange) then
         FOnInputChange(Self,
                        Params[0] {Integer},
                        Params[1] {WordBool});
    5: if Assigned(FOnMotorChange) then
         FOnMotorChange(Self,
                        Params[0] {Integer},
                        Params[1] {Double});
  end; {case DispID}
end;

function TPhidgetMotorControl.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetMotorControl.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetMotorControl.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetMotorControl.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetMotorControl.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetMotorControl.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetMotorControl.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetMotorControl.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetMotorControl.Get_MotorSpeed(Index: Integer): Double;
begin
    Result := DefaultInterface.MotorSpeed[Index];
end;

procedure TPhidgetMotorControl.Set_MotorSpeed(Index: Integer; pVal: Double);
begin
  DefaultInterface.MotorSpeed[Index] := pVal;
end;

function TPhidgetMotorControl.Get_Acceleration(Index: Integer): Double;
begin
    Result := DefaultInterface.Acceleration[Index];
end;

procedure TPhidgetMotorControl.Set_Acceleration(Index: Integer; pVal: Double);
begin
  DefaultInterface.Acceleration[Index] := pVal;
end;

function TPhidgetMotorControl.Get_NumMotors: Integer;
begin
    Result := DefaultInterface.NumMotors;
end;

function TPhidgetMotorControl.Get_NumInputs: Integer;
begin
    Result := DefaultInterface.NumInputs;
end;

function TPhidgetMotorControl.Get_InputState(Index: Integer): WordBool;
begin
    Result := DefaultInterface.InputState[Index];
end;

procedure TPhidgetMotorControl.Open(SerialNumber: Integer);
begin
  DefaultInterface.Open(SerialNumber);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPhidgetMotorControlProperties.Create(AServer: TPhidgetMotorControl);
begin
  inherited Create;
  FServer := AServer;
end;

function TPhidgetMotorControlProperties.GetDefaultInterface: IPhidgetMotorControl;
begin
  Result := FServer.DefaultInterface;
end;

function TPhidgetMotorControlProperties.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetMotorControlProperties.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetMotorControlProperties.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetMotorControlProperties.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetMotorControlProperties.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetMotorControlProperties.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetMotorControlProperties.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetMotorControlProperties.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetMotorControlProperties.Get_MotorSpeed(Index: Integer): Double;
begin
    Result := DefaultInterface.MotorSpeed[Index];
end;

procedure TPhidgetMotorControlProperties.Set_MotorSpeed(Index: Integer; pVal: Double);
begin
  DefaultInterface.MotorSpeed[Index] := pVal;
end;

function TPhidgetMotorControlProperties.Get_Acceleration(Index: Integer): Double;
begin
    Result := DefaultInterface.Acceleration[Index];
end;

procedure TPhidgetMotorControlProperties.Set_Acceleration(Index: Integer; pVal: Double);
begin
  DefaultInterface.Acceleration[Index] := pVal;
end;

function TPhidgetMotorControlProperties.Get_NumMotors: Integer;
begin
    Result := DefaultInterface.NumMotors;
end;

function TPhidgetMotorControlProperties.Get_NumInputs: Integer;
begin
    Result := DefaultInterface.NumInputs;
end;

function TPhidgetMotorControlProperties.Get_InputState(Index: Integer): WordBool;
begin
    Result := DefaultInterface.InputState[Index];
end;

{$ENDIF}

class function CoPhidgetAdvancedServo.Create: IPhidgetAdvancedServo;
begin
  Result := CreateComObject(CLASS_PhidgetAdvancedServo) as IPhidgetAdvancedServo;
end;

class function CoPhidgetAdvancedServo.CreateRemote(const MachineName: string): IPhidgetAdvancedServo;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_PhidgetAdvancedServo) as IPhidgetAdvancedServo;
end;

procedure TPhidgetAdvancedServo.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{50484945-4745-5453-3000-00000000000C}';
    IntfIID:   '{50484945-4745-5453-1000-00000000000C}';
    EventIID:  '{50484945-4745-5453-2000-00000000000C}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TPhidgetAdvancedServo.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IPhidgetAdvancedServo;
  end;
end;

procedure TPhidgetAdvancedServo.ConnectTo(svrIntf: IPhidgetAdvancedServo);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TPhidgetAdvancedServo.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TPhidgetAdvancedServo.GetDefaultInterface: IPhidgetAdvancedServo;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TPhidgetAdvancedServo.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TPhidgetAdvancedServoProperties.Create(Self);
{$ENDIF}
end;

destructor TPhidgetAdvancedServo.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPhidgetAdvancedServo.GetServerProperties: TPhidgetAdvancedServoProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TPhidgetAdvancedServo.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
    1: if Assigned(FOnAttach) then
         FOnAttach(Self);
    2: if Assigned(FOnDetach) then
         FOnDetach(Self);
    3: if Assigned(FOnError) then
         FOnError(Self,
                  Params[0] {const WideString},
                  Params[1] {Integer});
    4: if Assigned(FOnPositionChange) then
         FOnPositionChange(Self,
                           Params[0] {Integer},
                           Params[1] {Single});
  end; {case DispID}
end;

function TPhidgetAdvancedServo.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetAdvancedServo.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetAdvancedServo.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetAdvancedServo.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetAdvancedServo.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetAdvancedServo.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetAdvancedServo.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetAdvancedServo.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetAdvancedServo.Get_MotorPosition(Index: Integer): Single;
begin
    Result := DefaultInterface.MotorPosition[Index];
end;

procedure TPhidgetAdvancedServo.Set_MotorPosition(Index: Integer; pVal: Single);
begin
  DefaultInterface.MotorPosition[Index] := pVal;
end;

function TPhidgetAdvancedServo.Get_MaxVelocity(Index: Integer): Single;
begin
    Result := DefaultInterface.MaxVelocity[Index];
end;

procedure TPhidgetAdvancedServo.Set_MaxVelocity(Index: Integer; pVal: Single);
begin
  DefaultInterface.MaxVelocity[Index] := pVal;
end;

function TPhidgetAdvancedServo.Get_Acceleration(Index: Integer): Single;
begin
    Result := DefaultInterface.Acceleration[Index];
end;

procedure TPhidgetAdvancedServo.Set_Acceleration(Index: Integer; pVal: Single);
begin
  DefaultInterface.Acceleration[Index] := pVal;
end;

function TPhidgetAdvancedServo.Get_MotorEnabled(Index: Integer): WordBool;
begin
    Result := DefaultInterface.MotorEnabled[Index];
end;

procedure TPhidgetAdvancedServo.Set_MotorEnabled(Index: Integer; pVal: WordBool);
begin
  DefaultInterface.MotorEnabled[Index] := pVal;
end;

function TPhidgetAdvancedServo.Get_NumMotors: Integer;
begin
    Result := DefaultInterface.NumMotors;
end;

procedure TPhidgetAdvancedServo.Open(SerialNumber: Integer);
begin
  DefaultInterface.Open(SerialNumber);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPhidgetAdvancedServoProperties.Create(AServer: TPhidgetAdvancedServo);
begin
  inherited Create;
  FServer := AServer;
end;

function TPhidgetAdvancedServoProperties.GetDefaultInterface: IPhidgetAdvancedServo;
begin
  Result := FServer.DefaultInterface;
end;

function TPhidgetAdvancedServoProperties.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetAdvancedServoProperties.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetAdvancedServoProperties.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetAdvancedServoProperties.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetAdvancedServoProperties.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetAdvancedServoProperties.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetAdvancedServoProperties.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetAdvancedServoProperties.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetAdvancedServoProperties.Get_MotorPosition(Index: Integer): Single;
begin
    Result := DefaultInterface.MotorPosition[Index];
end;

procedure TPhidgetAdvancedServoProperties.Set_MotorPosition(Index: Integer; pVal: Single);
begin
  DefaultInterface.MotorPosition[Index] := pVal;
end;

function TPhidgetAdvancedServoProperties.Get_MaxVelocity(Index: Integer): Single;
begin
    Result := DefaultInterface.MaxVelocity[Index];
end;

procedure TPhidgetAdvancedServoProperties.Set_MaxVelocity(Index: Integer; pVal: Single);
begin
  DefaultInterface.MaxVelocity[Index] := pVal;
end;

function TPhidgetAdvancedServoProperties.Get_Acceleration(Index: Integer): Single;
begin
    Result := DefaultInterface.Acceleration[Index];
end;

procedure TPhidgetAdvancedServoProperties.Set_Acceleration(Index: Integer; pVal: Single);
begin
  DefaultInterface.Acceleration[Index] := pVal;
end;

function TPhidgetAdvancedServoProperties.Get_MotorEnabled(Index: Integer): WordBool;
begin
    Result := DefaultInterface.MotorEnabled[Index];
end;

procedure TPhidgetAdvancedServoProperties.Set_MotorEnabled(Index: Integer; pVal: WordBool);
begin
  DefaultInterface.MotorEnabled[Index] := pVal;
end;

function TPhidgetAdvancedServoProperties.Get_NumMotors: Integer;
begin
    Result := DefaultInterface.NumMotors;
end;

{$ENDIF}

class function CoPhidgetLED.Create: IPhidgetLED;
begin
  Result := CreateComObject(CLASS_PhidgetLED) as IPhidgetLED;
end;

class function CoPhidgetLED.CreateRemote(const MachineName: string): IPhidgetLED;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_PhidgetLED) as IPhidgetLED;
end;

procedure TPhidgetLED.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{50484945-4745-5453-3000-00000000000D}';
    IntfIID:   '{50484945-4745-5453-1000-00000000000D}';
    EventIID:  '{50484945-4745-5453-2000-00000000000D}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TPhidgetLED.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IPhidgetLED;
  end;
end;

procedure TPhidgetLED.ConnectTo(svrIntf: IPhidgetLED);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TPhidgetLED.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TPhidgetLED.GetDefaultInterface: IPhidgetLED;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TPhidgetLED.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TPhidgetLEDProperties.Create(Self);
{$ENDIF}
end;

destructor TPhidgetLED.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPhidgetLED.GetServerProperties: TPhidgetLEDProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TPhidgetLED.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
    1: if Assigned(FOnAttach) then
         FOnAttach(Self);
    2: if Assigned(FOnDetach) then
         FOnDetach(Self);
    3: if Assigned(FOnError) then
         FOnError(Self,
                  Params[0] {const WideString},
                  Params[1] {Integer});
  end; {case DispID}
end;

function TPhidgetLED.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetLED.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetLED.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetLED.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetLED.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetLED.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetLED.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetLED.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

procedure TPhidgetLED.Set_DiscreteLED(Index: Integer; pVal: Integer);
begin
  DefaultInterface.DiscreteLED[Index] := pVal;
end;

function TPhidgetLED.Get_DiscreteLED(Index: Integer): Integer;
begin
    Result := DefaultInterface.DiscreteLED[Index];
end;

function TPhidgetLED.Get_NumLEDs: Integer;
begin
    Result := DefaultInterface.NumLEDs;
end;

procedure TPhidgetLED.Open(SerialNumber: Integer);
begin
  DefaultInterface.Open(SerialNumber);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPhidgetLEDProperties.Create(AServer: TPhidgetLED);
begin
  inherited Create;
  FServer := AServer;
end;

function TPhidgetLEDProperties.GetDefaultInterface: IPhidgetLED;
begin
  Result := FServer.DefaultInterface;
end;

function TPhidgetLEDProperties.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetLEDProperties.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetLEDProperties.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetLEDProperties.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetLEDProperties.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetLEDProperties.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetLEDProperties.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetLEDProperties.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

procedure TPhidgetLEDProperties.Set_DiscreteLED(Index: Integer; pVal: Integer);
begin
  DefaultInterface.DiscreteLED[Index] := pVal;
end;

function TPhidgetLEDProperties.Get_DiscreteLED(Index: Integer): Integer;
begin
    Result := DefaultInterface.DiscreteLED[Index];
end;

function TPhidgetLEDProperties.Get_NumLEDs: Integer;
begin
    Result := DefaultInterface.NumLEDs;
end;

{$ENDIF}

class function CoPhidgetEncoder.Create: IPhidgetEncoder;
begin
  Result := CreateComObject(CLASS_PhidgetEncoder) as IPhidgetEncoder;
end;

class function CoPhidgetEncoder.CreateRemote(const MachineName: string): IPhidgetEncoder;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_PhidgetEncoder) as IPhidgetEncoder;
end;

procedure TPhidgetEncoder.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{50484945-4745-5453-3000-00000000000E}';
    IntfIID:   '{50484945-4745-5453-1000-00000000000E}';
    EventIID:  '{50484945-4745-5453-2000-00000000000E}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TPhidgetEncoder.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IPhidgetEncoder;
  end;
end;

procedure TPhidgetEncoder.ConnectTo(svrIntf: IPhidgetEncoder);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TPhidgetEncoder.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TPhidgetEncoder.GetDefaultInterface: IPhidgetEncoder;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TPhidgetEncoder.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TPhidgetEncoderProperties.Create(Self);
{$ENDIF}
end;

destructor TPhidgetEncoder.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPhidgetEncoder.GetServerProperties: TPhidgetEncoderProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TPhidgetEncoder.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
    1: if Assigned(FOnAttach) then
         FOnAttach(Self);
    2: if Assigned(FOnDetach) then
         FOnDetach(Self);
    3: if Assigned(FOnError) then
         FOnError(Self,
                  Params[0] {const WideString},
                  Params[1] {Integer});
    4: if Assigned(FOnInputChange) then
         FOnInputChange(Self,
                        Params[0] {Integer},
                        Params[1] {WordBool});
    5: if Assigned(FOnPositionChange) then
         FOnPositionChange(Self,
                           Params[0] {Integer},
                           Params[1] {Integer},
                           Params[2] {Integer});
  end; {case DispID}
end;

function TPhidgetEncoder.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetEncoder.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetEncoder.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetEncoder.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetEncoder.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetEncoder.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetEncoder.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetEncoder.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetEncoder.Get_EncoderPosition(Index: Integer): Integer;
begin
    Result := DefaultInterface.EncoderPosition[Index];
end;

procedure TPhidgetEncoder.Set_EncoderPosition(Index: Integer; pVal: Integer);
begin
  DefaultInterface.EncoderPosition[Index] := pVal;
end;

function TPhidgetEncoder.Get_InputState(Index: Integer): WordBool;
begin
    Result := DefaultInterface.InputState[Index];
end;

function TPhidgetEncoder.Get_NumEncoders: Integer;
begin
    Result := DefaultInterface.NumEncoders;
end;

function TPhidgetEncoder.Get_NumInputs: Integer;
begin
    Result := DefaultInterface.NumInputs;
end;

procedure TPhidgetEncoder.Open(SerialNumber: Integer);
begin
  DefaultInterface.Open(SerialNumber);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPhidgetEncoderProperties.Create(AServer: TPhidgetEncoder);
begin
  inherited Create;
  FServer := AServer;
end;

function TPhidgetEncoderProperties.GetDefaultInterface: IPhidgetEncoder;
begin
  Result := FServer.DefaultInterface;
end;

function TPhidgetEncoderProperties.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetEncoderProperties.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetEncoderProperties.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetEncoderProperties.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetEncoderProperties.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetEncoderProperties.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetEncoderProperties.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetEncoderProperties.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetEncoderProperties.Get_EncoderPosition(Index: Integer): Integer;
begin
    Result := DefaultInterface.EncoderPosition[Index];
end;

procedure TPhidgetEncoderProperties.Set_EncoderPosition(Index: Integer; pVal: Integer);
begin
  DefaultInterface.EncoderPosition[Index] := pVal;
end;

function TPhidgetEncoderProperties.Get_InputState(Index: Integer): WordBool;
begin
    Result := DefaultInterface.InputState[Index];
end;

function TPhidgetEncoderProperties.Get_NumEncoders: Integer;
begin
    Result := DefaultInterface.NumEncoders;
end;

function TPhidgetEncoderProperties.Get_NumInputs: Integer;
begin
    Result := DefaultInterface.NumInputs;
end;

{$ENDIF}

class function CoPhidgetStepper.Create: IPhidgetStepper;
begin
  Result := CreateComObject(CLASS_PhidgetStepper) as IPhidgetStepper;
end;

class function CoPhidgetStepper.CreateRemote(const MachineName: string): IPhidgetStepper;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_PhidgetStepper) as IPhidgetStepper;
end;

procedure TPhidgetStepper.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{50484945-4745-5453-3000-00000000000F}';
    IntfIID:   '{50484945-4745-5453-1000-00000000000F}';
    EventIID:  '{50484945-4745-5453-2000-00000000000F}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TPhidgetStepper.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IPhidgetStepper;
  end;
end;

procedure TPhidgetStepper.ConnectTo(svrIntf: IPhidgetStepper);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TPhidgetStepper.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TPhidgetStepper.GetDefaultInterface: IPhidgetStepper;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TPhidgetStepper.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TPhidgetStepperProperties.Create(Self);
{$ENDIF}
end;

destructor TPhidgetStepper.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPhidgetStepper.GetServerProperties: TPhidgetStepperProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TPhidgetStepper.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
    1: if Assigned(FOnAttach) then
         FOnAttach(Self);
    2: if Assigned(FOnDetach) then
         FOnDetach(Self);
    3: if Assigned(FOnError) then
         FOnError(Self,
                  Params[0] {const WideString},
                  Params[1] {Integer});
    4: if Assigned(FOnInputChange) then
         FOnInputChange(Self,
                        Params[0] {Integer},
                        Params[1] {WordBool});
    5: if Assigned(FOnPositionChange) then
         FOnPositionChange(Self,
                           Params[0] {Integer},
                           Params[1] {Double});
  end; {case DispID}
end;

function TPhidgetStepper.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetStepper.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetStepper.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetStepper.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetStepper.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetStepper.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetStepper.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetStepper.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetStepper.Get_MotorPosition(Index: Integer): Double;
begin
    Result := DefaultInterface.MotorPosition[Index];
end;

procedure TPhidgetStepper.Set_MotorPosition(Index: Integer; pVal: Double);
begin
  DefaultInterface.MotorPosition[Index] := pVal;
end;

function TPhidgetStepper.Get_Acceleration(Index: Integer): Double;
begin
    Result := DefaultInterface.Acceleration[Index];
end;

procedure TPhidgetStepper.Set_Acceleration(Index: Integer; pVal: Double);
begin
  DefaultInterface.Acceleration[Index] := pVal;
end;

function TPhidgetStepper.Get_MotorSpeed(Index: Integer): Double;
begin
    Result := DefaultInterface.MotorSpeed[Index];
end;

procedure TPhidgetStepper.Set_MotorSpeed(Index: Integer; pVal: Double);
begin
  DefaultInterface.MotorSpeed[Index] := pVal;
end;

function TPhidgetStepper.Get_NumMotors: Integer;
begin
    Result := DefaultInterface.NumMotors;
end;

function TPhidgetStepper.Get_NumInputs: Integer;
begin
    Result := DefaultInterface.NumInputs;
end;

function TPhidgetStepper.Get_InputState(Index: Integer): WordBool;
begin
    Result := DefaultInterface.InputState[Index];
end;

procedure TPhidgetStepper.Open(SerialNumber: Integer);
begin
  DefaultInterface.Open(SerialNumber);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPhidgetStepperProperties.Create(AServer: TPhidgetStepper);
begin
  inherited Create;
  FServer := AServer;
end;

function TPhidgetStepperProperties.GetDefaultInterface: IPhidgetStepper;
begin
  Result := FServer.DefaultInterface;
end;

function TPhidgetStepperProperties.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetStepperProperties.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetStepperProperties.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetStepperProperties.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetStepperProperties.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetStepperProperties.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetStepperProperties.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetStepperProperties.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetStepperProperties.Get_MotorPosition(Index: Integer): Double;
begin
    Result := DefaultInterface.MotorPosition[Index];
end;

procedure TPhidgetStepperProperties.Set_MotorPosition(Index: Integer; pVal: Double);
begin
  DefaultInterface.MotorPosition[Index] := pVal;
end;

function TPhidgetStepperProperties.Get_Acceleration(Index: Integer): Double;
begin
    Result := DefaultInterface.Acceleration[Index];
end;

procedure TPhidgetStepperProperties.Set_Acceleration(Index: Integer; pVal: Double);
begin
  DefaultInterface.Acceleration[Index] := pVal;
end;

function TPhidgetStepperProperties.Get_MotorSpeed(Index: Integer): Double;
begin
    Result := DefaultInterface.MotorSpeed[Index];
end;

procedure TPhidgetStepperProperties.Set_MotorSpeed(Index: Integer; pVal: Double);
begin
  DefaultInterface.MotorSpeed[Index] := pVal;
end;

function TPhidgetStepperProperties.Get_NumMotors: Integer;
begin
    Result := DefaultInterface.NumMotors;
end;

function TPhidgetStepperProperties.Get_NumInputs: Integer;
begin
    Result := DefaultInterface.NumInputs;
end;

function TPhidgetStepperProperties.Get_InputState(Index: Integer): WordBool;
begin
    Result := DefaultInterface.InputState[Index];
end;

{$ENDIF}

class function CoPhidgetTemperatureSensor.Create: IPhidgetTemperatureSensor;
begin
  Result := CreateComObject(CLASS_PhidgetTemperatureSensor) as IPhidgetTemperatureSensor;
end;

class function CoPhidgetTemperatureSensor.CreateRemote(const MachineName: string): IPhidgetTemperatureSensor;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_PhidgetTemperatureSensor) as IPhidgetTemperatureSensor;
end;

procedure TPhidgetTemperatureSensor.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{50484945-4745-5453-3000-000000000010}';
    IntfIID:   '{50484945-4745-5453-1000-000000000010}';
    EventIID:  '{50484945-4745-5453-2000-000000000010}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TPhidgetTemperatureSensor.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IPhidgetTemperatureSensor;
  end;
end;

procedure TPhidgetTemperatureSensor.ConnectTo(svrIntf: IPhidgetTemperatureSensor);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TPhidgetTemperatureSensor.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TPhidgetTemperatureSensor.GetDefaultInterface: IPhidgetTemperatureSensor;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TPhidgetTemperatureSensor.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TPhidgetTemperatureSensorProperties.Create(Self);
{$ENDIF}
end;

destructor TPhidgetTemperatureSensor.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPhidgetTemperatureSensor.GetServerProperties: TPhidgetTemperatureSensorProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TPhidgetTemperatureSensor.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
    1: if Assigned(FOnAttach) then
         FOnAttach(Self);
    2: if Assigned(FOnDetach) then
         FOnDetach(Self);
    3: if Assigned(FOnError) then
         FOnError(Self,
                  Params[0] {const WideString},
                  Params[1] {Integer});
    4: if Assigned(FOnTemperatureChange) then
         FOnTemperatureChange(Self,
                              Params[0] {Integer},
                              Params[1] {Single});
  end; {case DispID}
end;

function TPhidgetTemperatureSensor.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetTemperatureSensor.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetTemperatureSensor.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetTemperatureSensor.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetTemperatureSensor.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetTemperatureSensor.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetTemperatureSensor.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetTemperatureSensor.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetTemperatureSensor.Get_TemperatureChangeTrigger(Index: Integer): Double;
begin
    Result := DefaultInterface.TemperatureChangeTrigger[Index];
end;

procedure TPhidgetTemperatureSensor.Set_TemperatureChangeTrigger(Index: Integer; pVal: Double);
begin
  DefaultInterface.TemperatureChangeTrigger[Index] := pVal;
end;

function TPhidgetTemperatureSensor.Get_Temperature(Index: Integer): Double;
begin
    Result := DefaultInterface.Temperature[Index];
end;

function TPhidgetTemperatureSensor.Get_NumTemperatureInputs: Integer;
begin
    Result := DefaultInterface.NumTemperatureInputs;
end;

procedure TPhidgetTemperatureSensor.Open(SerialNumber: Integer);
begin
  DefaultInterface.Open(SerialNumber);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPhidgetTemperatureSensorProperties.Create(AServer: TPhidgetTemperatureSensor);
begin
  inherited Create;
  FServer := AServer;
end;

function TPhidgetTemperatureSensorProperties.GetDefaultInterface: IPhidgetTemperatureSensor;
begin
  Result := FServer.DefaultInterface;
end;

function TPhidgetTemperatureSensorProperties.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetTemperatureSensorProperties.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetTemperatureSensorProperties.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetTemperatureSensorProperties.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetTemperatureSensorProperties.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetTemperatureSensorProperties.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetTemperatureSensorProperties.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetTemperatureSensorProperties.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetTemperatureSensorProperties.Get_TemperatureChangeTrigger(Index: Integer): Double;
begin
    Result := DefaultInterface.TemperatureChangeTrigger[Index];
end;

procedure TPhidgetTemperatureSensorProperties.Set_TemperatureChangeTrigger(Index: Integer; 
                                                                           pVal: Double);
begin
  DefaultInterface.TemperatureChangeTrigger[Index] := pVal;
end;

function TPhidgetTemperatureSensorProperties.Get_Temperature(Index: Integer): Double;
begin
    Result := DefaultInterface.Temperature[Index];
end;

function TPhidgetTemperatureSensorProperties.Get_NumTemperatureInputs: Integer;
begin
    Result := DefaultInterface.NumTemperatureInputs;
end;

{$ENDIF}

class function CoPhidgetAccelerometer.Create: IPhidgetAccelerometer;
begin
  Result := CreateComObject(CLASS_PhidgetAccelerometer) as IPhidgetAccelerometer;
end;

class function CoPhidgetAccelerometer.CreateRemote(const MachineName: string): IPhidgetAccelerometer;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_PhidgetAccelerometer) as IPhidgetAccelerometer;
end;

procedure TPhidgetAccelerometer.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{50484945-4745-5453-3000-000000000011}';
    IntfIID:   '{50484945-4745-5453-1000-000000000011}';
    EventIID:  '{50484945-4745-5453-2000-000000000011}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TPhidgetAccelerometer.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IPhidgetAccelerometer;
  end;
end;

procedure TPhidgetAccelerometer.ConnectTo(svrIntf: IPhidgetAccelerometer);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TPhidgetAccelerometer.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TPhidgetAccelerometer.GetDefaultInterface: IPhidgetAccelerometer;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TPhidgetAccelerometer.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TPhidgetAccelerometerProperties.Create(Self);
{$ENDIF}
end;

destructor TPhidgetAccelerometer.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPhidgetAccelerometer.GetServerProperties: TPhidgetAccelerometerProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TPhidgetAccelerometer.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
    1: if Assigned(FOnAttach) then
         FOnAttach(Self);
    2: if Assigned(FOnDetach) then
         FOnDetach(Self);
    3: if Assigned(FOnError) then
         FOnError(Self,
                  Params[0] {const WideString},
                  Params[1] {Integer});
    4: if Assigned(FOnAccelerationChange) then
         FOnAccelerationChange(Self,
                               Params[0] {Integer},
                               Params[1] {Double});
  end; {case DispID}
end;

function TPhidgetAccelerometer.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetAccelerometer.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetAccelerometer.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetAccelerometer.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetAccelerometer.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetAccelerometer.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetAccelerometer.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetAccelerometer.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetAccelerometer.Get_AccelerationChangeTrigger(Index: Integer): Double;
begin
    Result := DefaultInterface.AccelerationChangeTrigger[Index];
end;

procedure TPhidgetAccelerometer.Set_AccelerationChangeTrigger(Index: Integer; pVal: Double);
begin
  DefaultInterface.AccelerationChangeTrigger[Index] := pVal;
end;

function TPhidgetAccelerometer.Get_Acceleration(Index: Integer): Double;
begin
    Result := DefaultInterface.Acceleration[Index];
end;

function TPhidgetAccelerometer.Get_NumAxis: Integer;
begin
    Result := DefaultInterface.NumAxis;
end;

procedure TPhidgetAccelerometer.Open(SerialNumber: Integer);
begin
  DefaultInterface.Open(SerialNumber);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPhidgetAccelerometerProperties.Create(AServer: TPhidgetAccelerometer);
begin
  inherited Create;
  FServer := AServer;
end;

function TPhidgetAccelerometerProperties.GetDefaultInterface: IPhidgetAccelerometer;
begin
  Result := FServer.DefaultInterface;
end;

function TPhidgetAccelerometerProperties.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetAccelerometerProperties.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetAccelerometerProperties.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetAccelerometerProperties.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetAccelerometerProperties.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetAccelerometerProperties.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetAccelerometerProperties.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetAccelerometerProperties.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

function TPhidgetAccelerometerProperties.Get_AccelerationChangeTrigger(Index: Integer): Double;
begin
    Result := DefaultInterface.AccelerationChangeTrigger[Index];
end;

procedure TPhidgetAccelerometerProperties.Set_AccelerationChangeTrigger(Index: Integer; pVal: Double);
begin
  DefaultInterface.AccelerationChangeTrigger[Index] := pVal;
end;

function TPhidgetAccelerometerProperties.Get_Acceleration(Index: Integer): Double;
begin
    Result := DefaultInterface.Acceleration[Index];
end;

function TPhidgetAccelerometerProperties.Get_NumAxis: Integer;
begin
    Result := DefaultInterface.NumAxis;
end;

{$ENDIF}

class function CoPhidgetTextLED.Create: IPhidgetTextLED;
begin
  Result := CreateComObject(CLASS_PhidgetTextLED) as IPhidgetTextLED;
end;

class function CoPhidgetTextLED.CreateRemote(const MachineName: string): IPhidgetTextLED;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_PhidgetTextLED) as IPhidgetTextLED;
end;

procedure TPhidgetTextLED.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{50484945-4745-5453-3000-000000000012}';
    IntfIID:   '{50484945-4745-5453-1000-000000000012}';
    EventIID:  '{50484945-4745-5453-2000-000000000012}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TPhidgetTextLED.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IPhidgetTextLED;
  end;
end;

procedure TPhidgetTextLED.ConnectTo(svrIntf: IPhidgetTextLED);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TPhidgetTextLED.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TPhidgetTextLED.GetDefaultInterface: IPhidgetTextLED;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TPhidgetTextLED.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TPhidgetTextLEDProperties.Create(Self);
{$ENDIF}
end;

destructor TPhidgetTextLED.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPhidgetTextLED.GetServerProperties: TPhidgetTextLEDProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TPhidgetTextLED.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
    1: if Assigned(FOnAttach) then
         FOnAttach(Self);
    2: if Assigned(FOnDetach) then
         FOnDetach(Self);
    3: if Assigned(FOnError) then
         FOnError(Self,
                  Params[0] {const WideString},
                  Params[1] {Integer});
  end; {case DispID}
end;

function TPhidgetTextLED.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetTextLED.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetTextLED.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetTextLED.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetTextLED.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetTextLED.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetTextLED.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetTextLED.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

procedure TPhidgetTextLED.Set_DisplayString(Row: Integer; const Param2: WideString);
  { Warning: The property DisplayString has a setter and a getter whose
    types do not match. Delphi was unable to generate a property of
    this sort and so is using a Variant as a passthrough. }
var
  InterfaceVariant: OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  InterfaceVariant.DisplayString := Param2;
end;

function TPhidgetTextLED.Get_NumRows: Integer;
begin
    Result := DefaultInterface.NumRows;
end;

function TPhidgetTextLED.Get_NumColumns: Integer;
begin
    Result := DefaultInterface.NumColumns;
end;

function TPhidgetTextLED.Get_Brightness: Integer;
begin
    Result := DefaultInterface.Brightness;
end;

procedure TPhidgetTextLED.Set_Brightness(pVal: Integer);
begin
  DefaultInterface.Set_Brightness(pVal);
end;

procedure TPhidgetTextLED.Open(SerialNumber: Integer);
begin
  DefaultInterface.Open(SerialNumber);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPhidgetTextLEDProperties.Create(AServer: TPhidgetTextLED);
begin
  inherited Create;
  FServer := AServer;
end;

function TPhidgetTextLEDProperties.GetDefaultInterface: IPhidgetTextLED;
begin
  Result := FServer.DefaultInterface;
end;

function TPhidgetTextLEDProperties.Get_DeviceType: WideString;
begin
    Result := DefaultInterface.DeviceType;
end;

function TPhidgetTextLEDProperties.Get_SerialNumber: SYSINT;
begin
    Result := DefaultInterface.SerialNumber;
end;

function TPhidgetTextLEDProperties.Get_Name: WideString;
begin
    Result := DefaultInterface.Name;
end;

function TPhidgetTextLEDProperties.Get_Tag: OleVariant;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Tag;
end;

procedure TPhidgetTextLEDProperties.Set_Tag(pVal: OleVariant);
begin
  DefaultInterface.Set_Tag(pVal);
end;

function TPhidgetTextLEDProperties.Get_IsAttached: WordBool;
begin
    Result := DefaultInterface.IsAttached;
end;

function TPhidgetTextLEDProperties.Get_DeviceVersion: Single;
begin
    Result := DefaultInterface.DeviceVersion;
end;

function TPhidgetTextLEDProperties.Get_LibraryVersion: WideString;
begin
    Result := DefaultInterface.LibraryVersion;
end;

procedure TPhidgetTextLEDProperties.Set_DisplayString(Row: Integer; const Param2: WideString);
  { Warning: The property DisplayString has a setter and a getter whose
    types do not match. Delphi was unable to generate a property of
    this sort and so is using a Variant as a passthrough. }
var
  InterfaceVariant: OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  InterfaceVariant.DisplayString := Param2;
end;

function TPhidgetTextLEDProperties.Get_NumRows: Integer;
begin
    Result := DefaultInterface.NumRows;
end;

function TPhidgetTextLEDProperties.Get_NumColumns: Integer;
begin
    Result := DefaultInterface.NumColumns;
end;

function TPhidgetTextLEDProperties.Get_Brightness: Integer;
begin
    Result := DefaultInterface.Brightness;
end;

procedure TPhidgetTextLEDProperties.Set_Brightness(pVal: Integer);
begin
  DefaultInterface.Set_Brightness(pVal);
end;

{$ENDIF}

procedure Register;
begin
  RegisterComponents(dtlServerPage, [TPhidgetManager, TPhidgetServo, TPhidgetInterfaceKit, TPhidgetRFID, 
    TPhidgetWeightSensor, TPhidgetTextLCD, TPhidgetMotorControl, TPhidgetAdvancedServo, TPhidgetLED, 
    TPhidgetEncoder, TPhidgetStepper, TPhidgetTemperatureSensor, TPhidgetAccelerometer, TPhidgetTextLED]);
end;

end.
