コード例 #1
0
 /// <summary>
 /// Creates an instance of the camera class.
 /// </summary>
 /// <param name="cameraId">The ProgID for the camera</param>
 public Camera(string cameraId)
 {
     TL                      = new TraceLogger("", "DriverAccessCamera");
     TL.Enabled              = RegistryCommonCode.GetBool(GlobalConstants.DRIVERACCESS_TRACE, GlobalConstants.DRIVERACCESS_TRACE_DEFAULT);
     _memberFactory          = new MemberFactory(cameraId, TL);
     _driverInterfaceVersion = InterfaceVersion;
 }
コード例 #2
0
        /// <summary>
        /// Creates a new instance of the <see cref="AscomDriver"/> class.
        /// </summary>
        /// <param name="deviceProgId">The prog id. of the device being created.</param>
        public AscomDriver(string deviceProgId)
        {
            // Create a new TraceLogger and enable if appropriate
            TL         = new TraceLogger("", "DriverAccess");
            TL.Enabled = RegistryCommonCode.GetBool(GlobalConstants.DRIVERACCESS_TRACE, GlobalConstants.DRIVERACCESS_TRACE_DEFAULT);
            TL.LogMessage("AscomDriver", "Successfully created TraceLogger");
            TL.LogMessage("AscomDriver", "Device ProgID: " + deviceProgId);

            //deviceType = deviceProgId.Substring(deviceProgId.LastIndexOf(".") + 1).ToUpper();
            deviceType = this.GetType().Name.ToUpperInvariant();
            TL.LogMessage("AscomDriver", "Device type: " + this.GetType().Name);

            memberFactory = new MemberFactory(deviceProgId, TL); // Create a MemberFactory object and pass in the TraceLogger
        }
コード例 #3
0
 /// <summary>
 /// Disposes of managed and unmanged resources
 /// </summary>
 /// <param name="disposing">True to dispose of managed resources, false to dispose of unmanged resources</param>
 protected virtual void Dispose(bool disposing)
 {
     if (!this.disposedValue)
     {
         if (disposing)
         {
             if (memberFactory != null)
             {
                 memberFactory.Dispose();
                 memberFactory = null;
             }
             if (TL != null)
             {
                 TL.Dispose();
             }
         }
     }
     this.disposedValue = true;
 }
コード例 #4
0
 /// <summary>
 /// Creates a focuser object with the given Prog ID
 /// </summary>
 /// <param name="focuserId">ProgID of the focuser device to be accessed.</param>
 public Focuser(string focuserId)
     : base(focuserId)
 {
     memberFactory = base.MemberFactory;
 }
コード例 #5
0
ファイル: SafetyMonitor.cs プロジェクト: tshaug/ASCOMPlatform
 /// <summary>
 /// Creates a SafetyMonitor object with the given Prog ID
 /// </summary>
 /// <param name="safetyMonitorId">ProgID of the device to be accessed.</param>
 public SafetyMonitor(string safetyMonitorId)
     : base(safetyMonitorId)
 {
     _memberFactory = MemberFactory;
 }
コード例 #6
0
ファイル: Switch.cs プロジェクト: ytywytyw/ASCOMPlatform
 /// <summary>
 ///   Creates a Switch object with the given Prog ID
 /// </summary>
 /// <param name = "switchId"></param>
 public Switch(string switchId)
 {
     TL             = new TraceLogger("", "DriverAccessSwitch");
     TL.Enabled     = RegistryCommonCode.GetBool(GlobalConstants.DRIVERACCESS_TRACE, GlobalConstants.DRIVERACCESS_TRACE_DEFAULT);
     _memberFactory = new MemberFactory(switchId, TL);
 }
コード例 #7
0
 /// <summary>
 /// Creates a rotator object with the given ProgID
 /// </summary>
 /// <param name="rotatorId">ProgID of the rotator to be accessed.</param>
 public Rotator(string rotatorId)
     : base(rotatorId)
 {
     memberFactory = base.MemberFactory;
 }
コード例 #8
0
 /// <summary>
 /// Creates a CoverCalibrator object with the given ProgID
 /// </summary>
 /// <param name="coverCalibratorId">ProgID of the CoverCalibrator device to be accessed.</param>
 public CoverCalibrator(string coverCalibratorId)
     : base(coverCalibratorId)
 {
     memberFactory = base.MemberFactory;
 }
コード例 #9
0
 /// <summary>
 /// Creates a Switch object with the given Prog ID
 /// </summary>
 /// <param name="switchId">ProgID of the Switch device to be accessed.</param>
 public Switch(string switchId)
     : base(switchId)
 {
     memberFactory = base.MemberFactory; //Get the member factory created by the base class
 }
コード例 #10
0
 /// <summary>
 /// Creates an ObservingConditions object with the given Prog ID
 /// </summary>
 /// <param name="observingConditionsId">ProgID of the device to be accessed.</param>
 public ObservingConditions(string observingConditionsId)
     : base(observingConditionsId)
 {
     _memberFactory = MemberFactory;
 }
コード例 #11
0
ファイル: FilterWheel.cs プロジェクト: tshaug/ASCOMPlatform
 /// <summary>
 /// Creates a FilterWheel object with the given Prog ID
 /// </summary>
 /// <param name="filterWheelId">ProgID of the filterwheel device to be accessed.</param>
 public FilterWheel(string filterWheelId)
     : base(filterWheelId)
 {
     //memberFactory = new MemberFactory(filterWheelID);
     memberFactory = base.MemberFactory; //Get the member factory created by the base class
 }
コード例 #12
0
ファイル: Dome.cs プロジェクト: ytywytyw/ASCOMPlatform
 /// <summary>
 /// Constructor for Dome class. Creates a Dome based on the ProgID in the DomeID string.
 /// </summary>
 /// <param name="domeId">The progID of the dome to be instantiated</param>
 public Dome(string domeId)
     : base(domeId)
 {
     memberFactory = base.MemberFactory;
 }
コード例 #13
0
 /// <summary>
 /// Creates a FilterWheel object with the given Prog ID
 /// </summary>
 /// <param name="filterWheelId"></param>
 public FilterWheel(string filterWheelId)
 {
     TL             = new TraceLogger("", "DriverAccessFilterWheel");
     TL.Enabled     = RegistryCommonCode.GetBool(GlobalConstants.DRIVERACCESS_TRACE, GlobalConstants.DRIVERACCESS_TRACE_DEFAULT);
     _memberFactory = new MemberFactory(filterWheelId, TL);
 }