Beispiel #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;
 }
Beispiel #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
        }
Beispiel #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;
 }
Beispiel #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;
 }
Beispiel #5
0
 /// <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;
 }
Beispiel #6
0
 /// <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);
 }
Beispiel #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;
 }
Beispiel #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;
 }
Beispiel #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
 }
 /// <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;
 }
Beispiel #11
0
 /// <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
 }
Beispiel #12
0
 /// <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;
 }
Beispiel #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);
 }