Compare commits
158 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 633babd967 | |||
| 81a3a29743 | |||
| e1a0d6449d | |||
| f6556716a5 | |||
| f10936a9e8 | |||
| 98feb74870 | |||
| 7542e86aeb | |||
| 68928a2289 | |||
| b3dc507aff | |||
| c5e9f67f84 | |||
| 4568f49f5f | |||
| fa613ecc92 | |||
| a9e2ec9528 | |||
| 027cb24d3f | |||
| 93c63cc014 | |||
| 355320a4ba | |||
| 87c8457bf0 | |||
| cc05808542 | |||
| e9d41a2412 | |||
| 1452f3cf07 | |||
| 64e2b9c6f9 | |||
| 37437b7c7c | |||
| 692e39771c | |||
| e582761f53 | |||
| c4eb74b274 | |||
| 6b9eff2b86 | |||
| 5d3688bde7 | |||
| 6d8702a011 | |||
| c2ebe329c5 | |||
| ce74e980fa | |||
| 1c3eb9f3d7 | |||
| b6e12d687b | |||
| e15537e6c3 | |||
| d9e551707f | |||
| 5f55d9f28f | |||
| c9ec7f3fca | |||
| df3887c385 | |||
| 53150f9400 | |||
| ac887ccdff | |||
| 0e98f0e370 | |||
| 9cf63c4912 | |||
| d6f72c8222 | |||
| c1cae2b0c4 | |||
| 2ce8c4e123 | |||
| dfef48ff0c | |||
| 4b65c946d2 | |||
| 3579189465 | |||
| 8b31c8d7a9 | |||
| 04845cea7a | |||
| aeaaf9df95 | |||
| 1d5dcb529e | |||
| fdeee5b822 | |||
| a53f99810d | |||
| 325e9908a7 | |||
| 83865a3911 | |||
| b3b1d95cda | |||
| bfb8f257a1 | |||
| 3109d1dcef | |||
| 0ac7b8b7bd | |||
| ee60613a95 | |||
| a6308f1a64 | |||
| 0475217d62 | |||
| e89f01ed51 | |||
| 2846e9f719 | |||
| a7904d7485 | |||
| 12c11b4987 | |||
| 07569b146e | |||
| 112fdf0bb9 | |||
| 73e8e8ffe8 | |||
| 34a145765b | |||
| e3f82ff232 | |||
| 5f5d819f3b | |||
| 69434454ca | |||
| 8980c3c6b5 | |||
| bfde58c6af | |||
| 64b949551e | |||
| bd49a86866 | |||
| 8089e8d536 | |||
| 3162827396 | |||
| 02f69b54a4 | |||
| 4ea22d9455 | |||
| 916c04a791 | |||
| d03b0f2cd1 | |||
| feb69c970f | |||
| 9049412acc | |||
| 44e02dda1d | |||
| c72d2c00fc | |||
| 465d4cb5d9 | |||
| f8cbc3fa8d | |||
| ca3dd0e4fd | |||
| bc90049798 | |||
| a0a908d67d | |||
| 69c690aa54 | |||
| 617faee9dd | |||
| 335c7da935 | |||
| 71bc7fd49a | |||
| 621b7dc2da | |||
| 8e1188ac49 | |||
| c85f65c3e9 | |||
| d8b4886b85 | |||
| 4c92bf13c2 | |||
| 22de5679b7 | |||
| 58ba1e6ee3 | |||
| 5501e97b7e | |||
| 675ed08425 | |||
| 8da41cad6f | |||
| 2b5b5d7188 | |||
| d328c3ae4d | |||
| 546d0bf7f4 | |||
| 678b5f1ece | |||
| 7cb50de30d | |||
| d39846fa18 | |||
| cf28ecc7c2 | |||
| cf5a6c72fe | |||
| 85fcb8a73c | |||
| 79a77d4e1d | |||
| b795634d70 | |||
| cf3b268ef3 | |||
| ef555796a4 | |||
| 404366d552 | |||
| 3dc5efee9a | |||
| 0c1d7d7f09 | |||
| 9ec9610a3b | |||
| 9b7a850607 | |||
| 43f10bad7a | |||
| 3f8853c7c5 | |||
| fed8b1a24b | |||
| 6a4c08a7c4 | |||
| 9608e5a31f | |||
| 5d16edee2e | |||
| cc5eabdfab | |||
| 56febb46cc | |||
| eab151d295 | |||
| 76eb088d4e | |||
| ee088ff35c | |||
| 75d2d080a3 | |||
| 2d69a4fba8 | |||
| e8793231d1 | |||
| 7df8da2f59 | |||
| ae4ba48ce2 | |||
| c0c0bedbba | |||
| 76c88420ca | |||
| 7225c2d70f | |||
| d2fae7607b | |||
| d1b3f5718f | |||
| c2ecb1891c | |||
| 9e4c7862f9 | |||
| 0d04ecd587 | |||
| a59b602b54 | |||
| eb3c7710d7 | |||
| ef982a3aba | |||
| 90eb1c604b | |||
| e339831f0c | |||
| dc2a24ad25 | |||
| da6b7ec55f | |||
| f2f4b05911 | |||
| a742867377 | |||
| 3be908e6bd |
@@ -1,68 +0,0 @@
|
||||
Conform Report Hash (V1): 55AB333E4394ADF3F35929567EAB46A092F3574DF38E1F00BF586967B7EE826AA2D92647409F699E62954B07AF3389CEA7DB7FAAFFE04E05BE358A744E95A624
|
||||
|
||||
|
||||
ConformanceCheck ASCOM Device Conformance Checker Version 6.4.63.0, Build time: 18/12/2018 08:58:34
|
||||
ConformanceCheck Running on: ASCOM Platform 6.4 SP1 6.4.1.2695
|
||||
|
||||
ConformanceCheck Driver ProgID: ASCOM.MeadeAutostar497.Telescope
|
||||
|
||||
Error handling
|
||||
Error number for "Not Implemented" is: 80040400
|
||||
Error number for "Invalid Value 1" is: 80040404
|
||||
Error number for "Value Not Set 1" is: 80040402
|
||||
Error number for "Value Not Set 2" is: 80040403
|
||||
Error messages will not be interpreted to infer state.
|
||||
|
||||
00:21:34.375 Driver Access Checks OK
|
||||
00:21:35.008 AccessChecks OK Successfully created driver using late binding
|
||||
00:21:35.253 AccessChecks OK Successfully connected using late binding
|
||||
00:21:35.257 AccessChecks INFO The driver is a .NET object
|
||||
00:21:35.260 AccessChecks INFO The AssemblyQualifiedName is: ASCOM.MeadeAutostar497.Telescope, ASCOM.MeadeAutostar497.Telescope, Version=
|
||||
00:21:35.265 AccessChecks INFO The driver implements interface: ASCOM.DeviceInterface.ITelescopeV3
|
||||
00:21:35.269 AccessChecks INFO The driver implements interface: ASCOM.DeviceInterface.IFocuserV3
|
||||
00:21:35.992 AccessChecks INFO Device does not expose IFocuser interface
|
||||
00:21:36.147 AccessChecks INFO Device does not expose IFocuserV2 interface
|
||||
00:21:36.479 AccessChecks INFO Device exposes IFocuserV3 interface
|
||||
00:21:36.692 AccessChecks OK Successfully created driver using driver access toolkit
|
||||
00:21:36.895 AccessChecks OK Successfully connected using driver access toolkit
|
||||
00:21:36.958 AccessChecks OK Successfully disconnected using driver access toolkit
|
||||
|
||||
Conform is using ASCOM.DriverAccess.Focuser to get a Focuser object
|
||||
00:21:37.078 ConformanceCheck OK Driver instance created successfully
|
||||
00:21:37.311 ConformanceCheck OK Connected OK
|
||||
|
||||
Common Driver Methods
|
||||
00:21:37.348 InterfaceVersion OK 3
|
||||
00:21:37.374 Connected OK True
|
||||
00:21:37.401 Description OK Meade Autostar 497 .net
|
||||
00:21:37.428 DriverInfo OK Information about the driver itself. Version: 0.2
|
||||
00:21:37.457 DriverVersion OK 0.2
|
||||
00:21:37.485 Name OK Meade Autostar 497 .net
|
||||
00:21:37.511 CommandXXX INFO Tests skipped
|
||||
00:21:37.515 Action INFO Conform cannot test the Action method
|
||||
00:21:37.521 SupportedActions OK Driver returned an empty action list
|
||||
|
||||
Properties
|
||||
00:21:37.626 Absolute OK False
|
||||
00:21:37.631 IsMoving OK False
|
||||
00:21:37.637 MaxStep OK 7000
|
||||
00:21:37.642 MaxIncrement OK 7000
|
||||
00:21:37.820 Position OK Position must not be implemented for a relative focuser and a PropertyNotImplementedException exception was generated as expected
|
||||
00:21:37.988 StepSize OK Optional member threw a PropertyNotImplementedException exception.
|
||||
00:21:37.993 TempCompAvailable OK False
|
||||
00:21:37.999 TempComp Read OK False
|
||||
00:21:38.167 TempComp Write OK Temperature compensation is not available and a PropertyNotImplementedException exception was generated as expected
|
||||
00:21:38.504 Temperature OK Optional member threw a PropertyNotImplementedException exception.
|
||||
|
||||
Methods
|
||||
00:21:38.544 Halt OK Focuser halted OK
|
||||
00:21:38.552 Move - TempComp False Moving by: 700
|
||||
00:21:39.264 Move - TempComp False Asynchronous move found
|
||||
00:21:39.270 Move - TempComp False OK Relative move OK
|
||||
00:21:39.278 Move - TempComp False INFO Returning to original position: 0
|
||||
|
||||
Conformance test complete
|
||||
|
||||
No errors, warnings or issues found: your driver passes ASCOM validation!!
|
||||
|
||||
Driver Hash Value: DBF36156F87DA91F130E0AABEFE80B250D62C2DB689AD8B44243AE0D9322245CF15AAE2E663962402E87B6B1A15440A6DDB46562EFB9527E3596096319C2AC85
|
||||
@@ -1,268 +0,0 @@
|
||||
Conform Report Hash (V1): 671D83C15427DD14D9FA7F5A6C62D6B21372362C5173A2B95171D14D7442358DCF3950481797D63EB94E642D2563C3094C387C23D65466833FEA5E64CD045B46
|
||||
|
||||
|
||||
ConformanceCheck ASCOM Device Conformance Checker Version 6.4.63.0, Build time: 18/12/2018 08:58:34
|
||||
ConformanceCheck Running on: ASCOM Platform 6.4 SP1 6.4.1.2695
|
||||
|
||||
ConformanceCheck Driver ProgID: ASCOM.MeadeAutostar497.Telescope
|
||||
|
||||
Error handling
|
||||
Error number for "Not Implemented" is: 80040400
|
||||
Error number for "Invalid Value 1" is: 80040401
|
||||
Error number for "Invalid Value 2" is: 80040405
|
||||
Error number for "Value Not Set 1" is: 80040402
|
||||
Error number for "Value Not Set 2" is: 80040403
|
||||
Error messages will not be interpreted to infer state.
|
||||
|
||||
18:07:45.625 Driver Access Checks OK
|
||||
18:07:46.272 AccessChecks OK Successfully created driver using late binding
|
||||
18:07:46.685 AccessChecks OK Successfully connected using late binding
|
||||
18:07:46.689 AccessChecks INFO The driver is a .NET object
|
||||
18:07:46.693 AccessChecks INFO The AssemblyQualifiedName is: ASCOM.MeadeAutostar497.Telescope, ASCOM.MeadeAutostar497.Telescope, Version=
|
||||
18:07:46.697 AccessChecks INFO The driver implements interface: ASCOM.DeviceInterface.ITelescopeV3
|
||||
18:07:46.701 AccessChecks INFO The driver implements interface: ASCOM.DeviceInterface.IFocuserV3
|
||||
18:07:47.416 AccessChecks INFO Device does not expose interface ITelescopeV2
|
||||
18:07:48.387 AccessChecks INFO Device exposes interface ITelescopeV3
|
||||
18:07:49.708 AccessChecks OK Successfully created driver using driver access toolkit
|
||||
18:07:50.029 AccessChecks OK Successfully connected using driver access toolkit
|
||||
|
||||
Conform is using ASCOM.DriverAccess.Telescope to get a Telescope object
|
||||
18:07:51.351 ConformanceCheck OK Driver instance created successfully
|
||||
18:07:51.775 ConformanceCheck OK Connected OK
|
||||
|
||||
Common Driver Methods
|
||||
18:07:51.817 InterfaceVersion OK 3
|
||||
18:07:51.845 Connected OK True
|
||||
18:07:51.874 Description OK Meade Autostar 497 .net
|
||||
18:07:51.903 DriverInfo OK Information about the driver itself. Version: 0.0
|
||||
18:07:51.932 DriverVersion OK 0.0
|
||||
18:07:51.961 Name OK Meade Autostar 497 .net
|
||||
18:07:51.990 CommandString INFO Conform cannot test the CommandString method
|
||||
18:07:51.996 CommandBlind INFO Conform cannot test the CommandBlind method
|
||||
18:07:52.002 CommandBool INFO Conform cannot test the CommandBool method
|
||||
18:07:52.008 Action INFO Conform cannot test the Action method
|
||||
18:07:52.015 SupportedActions OK Driver returned an empty action list
|
||||
|
||||
Can Properties
|
||||
18:07:52.082 CanFindHome OK False
|
||||
18:07:52.089 CanPark OK True
|
||||
18:07:52.096 CanPulseGuide OK True
|
||||
18:07:52.102 CanSetDeclinationRate OK False
|
||||
18:07:52.109 CanSetGuideRates OK False
|
||||
18:07:52.117 CanSetPark OK False
|
||||
18:07:52.125 CanSetPierSide OK False
|
||||
18:07:52.177 CanSetRightAscensionRate OK False
|
||||
18:07:52.185 CanSetTracking OK False
|
||||
18:07:52.193 CanSlew OK True
|
||||
18:07:52.200 CanSlewltAz OK True
|
||||
18:07:52.208 CanSlewAltAzAsync OK True
|
||||
18:07:52.216 CanSlewAsync OK True
|
||||
18:07:52.224 CanSync OK True
|
||||
18:07:52.231 CanSyncAltAz OK False
|
||||
18:07:52.239 CanUnPark OK False
|
||||
|
||||
Pre-run Checks
|
||||
18:07:52.286 Mount Safety INFO Scope is not parked, continuing testing
|
||||
18:07:52.339 TimeCheck INFO PC Time Zone: GMT Summer Time, offset -1 hours.
|
||||
18:07:52.348 TimeCheck INFO PC UTCDate: 08-May-2019 17:07:52.347
|
||||
18:07:53.254 TimeCheck INFO Mount UTCDate: 02-May-2019 19:33:55.000
|
||||
|
||||
Properties
|
||||
18:07:53.358 AlignmentMode OK algPolar
|
||||
18:07:53.515 Altitude OK 1.00
|
||||
18:07:53.555 ApertureArea OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:53.591 ApertureDiameter OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:53.622 AtHome OK False
|
||||
18:07:53.654 AtPark OK False
|
||||
18:07:53.847 Azimuth OK 45.67
|
||||
18:07:54.028 Declination OK -01:00:01.00
|
||||
18:07:54.060 DeclinationRate Read OK 0.00
|
||||
18:07:54.093 DeclinationRate Write OK CanSetDeclinationRate is False and a PropertyNotImplementedException exception was generated as expected
|
||||
18:07:54.126 DoesRefraction Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.159 DoesRefraction Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.193 EquatorialSystem OK equLocalTopocentric
|
||||
18:07:54.227 FocalLength OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.260 GuideRateDeclination Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.270 GuideRateDeclination Write OK CanSetGuideRates is False and a PropertyNotImplementedException exception was generated as expected
|
||||
18:07:54.303 GuideRateRightAscension Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.314 GuideRateRightAscension Write OK CanSetGuideRates is False and a PropertyNotImplementedException exception was generated as expected
|
||||
18:07:54.347 IsPulseGuiding OK False
|
||||
18:07:54.541 RightAscension OK 03:59:09.00
|
||||
18:07:54.575 RightAscensionRate Read OK 0.00
|
||||
18:07:54.609 RightAscensionRate Write OK CanSetRightAscensionRate is False and a PropertyNotImplementedException exception was generated as expected
|
||||
18:07:54.644 SiteElevation Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.678 SiteElevation Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.691 SiteElevation Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.703 SiteElevation Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.861 SiteLatitude Read OK 00:00:00.00
|
||||
18:07:54.900 SiteLatitude Write OK Invalid Value exception generated as expected on set site latitude < -90 degrees
|
||||
18:07:54.912 SiteLatitude Write OK Invalid Value exception generated as expected on set site latitude > 90 degrees
|
||||
18:07:55.315 SiteLatitude Write OK Legal value 00:00:00.00 degrees written successfully
|
||||
18:07:55.455 SiteLongitude Read OK -42:12:00.00
|
||||
18:07:55.490 SiteLongitude Write OK Invalid Value exception generated as expected on set site longitude < -180 degrees
|
||||
18:07:55.502 SiteLongitude Write OK Invalid Value exception generated as expected on set site longitude > 180 degrees
|
||||
18:07:56.090 SiteLongitude Write OK Legal value -42:12:00.00 degrees written successfully
|
||||
18:07:56.246 Slewing OK False
|
||||
18:07:56.280 SlewSettleTime Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:56.315 SlewSettleTime Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:56.328 SlewSettleTime Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:56.363 SideOfPier Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:56.578 SiderealTime OK 05:17:41.24
|
||||
18:07:56.590 SiderealTime INFO Scope and ASCOM sidereal times are up to 0.5 hour different, Scope: 05:17:41.24, ASCOM: 05:24:06.50
|
||||
18:07:56.626 TargetDeclination Read OK .NET Not InvalidOperationException generated on read before write
|
||||
18:07:56.661 TargetDeclination Write INFO Tests moved after the SlewToCoordinates tests so that Conform can check they properly set target coordinates.
|
||||
18:07:56.673 TargetRightAscension Read OK .NET Not InvalidOperationException generated on read before write
|
||||
18:07:56.708 TargetRightAscension Write INFO Tests moved after the SlewToCoordinates tests so that Conform can check they properly set target coordinates.
|
||||
18:07:56.720 Tracking Read OK True
|
||||
18:07:56.756 Tracking Write OK CanSetTracking is False and a PropertyNotImplementedException exception was generated as expected
|
||||
18:07:56.797 TrackingRates Found drive rate: driveSidereal
|
||||
18:07:56.809 TrackingRates OK Drive rates read OK
|
||||
18:07:56.822 TrackingRates OK Disposed tracking rates OK
|
||||
18:07:56.858 TrackingRates OK Successfully obtained a TrackingRates object after the previous TrackingRates object was disposed
|
||||
18:07:57.039 TrackingRate Read OK driveLunar
|
||||
18:07:57.075 TrackingRate Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:57.088 TrackingRate Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:57.624 UTCDate Read OK 02-May-2019 19:33:59.000
|
||||
18:07:58.626 UTCDate Write OK New UTCDate written successfully: 02/05/2019 20:33:59
|
||||
|
||||
Methods
|
||||
18:07:59.997 CanMoveAxis:Primary OK CanMoveAxis:Primary True
|
||||
18:08:00.035 CanMoveAxis:Secondary OK CanMoveAxis:Secondary True
|
||||
18:08:00.072 CanMoveAxis:Tertiary OK CanMoveAxis:Tertiary False
|
||||
18:08:00.108 Park/Unpark INFO Tests skipped
|
||||
18:08:00.131 AbortSlew OK AbortSlew OK when not slewing
|
||||
18:08:00.199 AxisRate:Primary OK Axis rate minimum: 1 Axis rate maximum: 1
|
||||
18:08:00.211 AxisRate:Primary OK Axis rate minimum: 2 Axis rate maximum: 2
|
||||
18:08:00.225 AxisRate:Primary OK Axis rate minimum: 3 Axis rate maximum: 3
|
||||
18:08:00.239 AxisRate:Primary OK Axis rate minimum: 4 Axis rate maximum: 4
|
||||
18:08:00.253 AxisRate:Primary OK No overlapping axis rates found
|
||||
18:08:00.266 AxisRate:Primary OK No duplicate axis rates found
|
||||
18:08:00.279 AxisRate:Primary OK Successfully disposed of rate 1 - 1
|
||||
18:08:00.295 AxisRate:Primary OK Successfully disposed of rate 2 - 2
|
||||
18:08:00.310 AxisRate:Primary OK Successfully disposed of rate 3 - 3
|
||||
18:08:00.322 AxisRate:Primary OK Successfully disposed of rate 4 - 4
|
||||
18:08:00.336 AxisRate:Primary OK Disposed axis rates OK
|
||||
18:08:00.350 AxisRate:Secondary OK Axis rate minimum: 1 Axis rate maximum: 1
|
||||
18:08:00.362 AxisRate:Secondary OK Axis rate minimum: 2 Axis rate maximum: 2
|
||||
18:08:00.375 AxisRate:Secondary OK Axis rate minimum: 3 Axis rate maximum: 3
|
||||
18:08:00.387 AxisRate:Secondary OK Axis rate minimum: 4 Axis rate maximum: 4
|
||||
18:08:00.400 AxisRate:Secondary OK No overlapping axis rates found
|
||||
18:08:00.414 AxisRate:Secondary OK No duplicate axis rates found
|
||||
18:08:00.445 AxisRate:Secondary OK Successfully disposed of rate 1 - 1
|
||||
18:08:00.458 AxisRate:Secondary OK Successfully disposed of rate 2 - 2
|
||||
18:08:00.472 AxisRate:Secondary OK Successfully disposed of rate 3 - 3
|
||||
18:08:00.487 AxisRate:Secondary OK Successfully disposed of rate 4 - 4
|
||||
18:08:00.501 AxisRate:Secondary OK Disposed axis rates OK
|
||||
18:08:00.517 AxisRate:Tertiary OK Empty axis rate returned
|
||||
18:08:00.531 AxisRate:Tertiary OK Disposed axis rates OK
|
||||
18:08:00.550 FindHome OK CanFindHome is False and a MethodNotImplementedException exception was generated as expected
|
||||
18:08:00.606 MoveAxis Primary OK Can successfully set a movement rate of zero
|
||||
18:08:00.622 MoveAxis Primary OK Exception correctly generated when move axis is set below lowest rate (0.5)
|
||||
18:08:00.659 MoveAxis Primary OK Exception correctly generated when move axis is set above highest rate (5)
|
||||
18:08:04.867 MoveAxis Primary OK Successfully moved axis at minimum rate: 1
|
||||
18:08:09.770 MoveAxis Primary OK Successfully moved axis at maximum rate: 4
|
||||
18:08:13.981 MoveAxis Primary OK Tracking state correctly restored after MoveAxis when CanSetTracking is false
|
||||
18:08:13.998 MoveAxis Primary OK AxisRates object successfully disposed
|
||||
18:08:14.057 MoveAxis Secondary OK Can successfully set a movement rate of zero
|
||||
18:08:14.072 MoveAxis Secondary OK Exception correctly generated when move axis is set below lowest rate (0.5)
|
||||
18:08:14.107 MoveAxis Secondary OK Exception correctly generated when move axis is set above highest rate (5)
|
||||
18:08:18.317 MoveAxis Secondary OK Successfully moved axis at minimum rate: 1
|
||||
18:08:23.262 MoveAxis Secondary OK Successfully moved axis at maximum rate: 4
|
||||
18:08:27.473 MoveAxis Secondary OK Tracking state correctly restored after MoveAxis when CanSetTracking is false
|
||||
18:08:27.492 MoveAxis Secondary OK AxisRates object successfully disposed
|
||||
18:08:27.551 MoveAxis Tertiary OK CanMoveAxis Tertiary is False and a MethodNotImplementedException exception was generated as expected
|
||||
18:08:29.592 PulseGuide OK Synchronous pulse guide found OK
|
||||
18:08:54.449 SlewToCoordinates INFO Slewed within 39.2 arc seconds of expected RA: 04:18:14.61, actual RA: 04:18:12.00
|
||||
18:08:54.463 SlewToCoordinates INFO Slewed within 7199.0 arc seconds of expected DEC: 01:00:00.00, actual DEC: -00:59:59.00
|
||||
18:08:54.478 SlewToCoordinates OK The TargetRightAscension property 04:18:14.61 matches the expected RA OK.
|
||||
18:08:54.492 SlewToCoordinates OK The TargetDeclination property 01:00:00.00 matches the expected Declination OK.
|
||||
18:08:54.548 SlewToCoordinates (Bad L) OK Correctly rejected bad RA coordinate: -01:00:00.00
|
||||
18:08:55.301 SlewToCoordinates (Bad L) OK Correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
18:08:55.360 SlewToCoordinates (Bad H) OK Correctly rejected bad RA coordinate: 25:00:00.00
|
||||
18:08:56.199 SlewToCoordinates (Bad H) OK Correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
18:09:20.477 SlewToCoordinatesAsync INFO Slewed within 19.3 arc seconds of expected RA: 03:18:41.28, actual RA: 03:18:40.00
|
||||
18:09:20.490 SlewToCoordinatesAsync INFO Slewed within 14398.0 arc seconds of expected DEC: 02:00:00.00, actual DEC: -01:59:58.00
|
||||
18:09:20.503 SlewToCoordinatesAsync OK The TargetRightAscension property 03:18:41.28 matches the expected RA OK.
|
||||
18:09:20.516 SlewToCoordinatesAsync OK The TargetDeclination property 02:00:00.00 matches the expected Declination OK.
|
||||
18:09:20.558 SlewToCoordinatesAsync (Bad L) OK Correctly rejected bad RA coordinate: -01:00:00.00
|
||||
18:09:21.381 SlewToCoordinatesAsync (Bad L) OK Correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
18:09:21.442 SlewToCoordinatesAsync (Bad H) OK Correctly rejected bad RA coordinate: 25:00:00.00
|
||||
18:09:22.292 SlewToCoordinatesAsync (Bad H) OK Correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
18:09:44.520 SyncToCoordinates INFO Slewed to start position within 56.8 arc seconds of expected RA: 02:19:07.79, actual RA: 02:19:04.00
|
||||
18:09:44.534 SyncToCoordinates OK Slewed to start position OK. DEC: 00:00:00.00
|
||||
18:09:47.045 SyncToCoordinates INFO Synced to sync position within 71.8 arc seconds of expected RA: 02:15:07.79, actual RA: 02:15:03.00
|
||||
18:09:47.058 SyncToCoordinates INFO Synced to sync position within 3660.0 arc seconds of expected DEC: -01:00:00.00, actual DEC: 00:01:00.00
|
||||
18:09:47.071 SyncToCoordinates OK The TargetRightAscension property 02:15:07.79 matches the expected RA OK.
|
||||
18:09:47.085 SyncToCoordinates OK The TargetDeclination property -01:00:00.00 matches the expected Declination OK.
|
||||
18:10:08.444 SyncToCoordinates INFO Slewed back to start position within 56.8 arc seconds of expected RA: 02:19:07.79, actual RA: 02:19:04.00
|
||||
18:10:08.458 SyncToCoordinates OK Slewed back to start position OK. DEC: 00:00:00.00
|
||||
18:10:10.791 SyncToCoordinates INFO Synced to reversed sync position within 71.8 arc seconds of expected RA: 02:23:07.79, actual RA: 02:23:03.00
|
||||
18:10:10.806 SyncToCoordinates INFO Synced to reversed sync position within 7200.0 arc seconds of expected DEC: 01:00:00.00, actual DEC: -01:00:00.00
|
||||
18:10:32.484 SyncToCoordinates INFO Slewed back to start position within 56.8 arc seconds of expected RA: 02:19:07.79, actual RA: 02:19:04.00
|
||||
18:10:32.498 SyncToCoordinates OK Slewed back to start position OK. DEC: 00:00:00.00
|
||||
18:10:32.537 SyncToCoordinates (Bad L) OK Correctly rejected bad RA coordinate: -01:00:00.00
|
||||
18:10:33.329 SyncToCoordinates (Bad L) OK Correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
18:10:33.389 SyncToCoordinates (Bad H) OK Correctly rejected bad RA coordinate: 25:00:00.00
|
||||
18:10:34.242 SyncToCoordinates (Bad H) OK Correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
18:10:34.301 TargetRightAscension Write OK Invalid Value exception generated as expected on set TargetRightAscension < 0 hours
|
||||
18:10:34.315 TargetRightAscension Write OK Invalid Value exception generated as expected on set TargetRightAscension > 24 hours
|
||||
18:10:34.979 TargetRightAscension Write OK Legal value 01:20:19.62 HH:MM:SS written successfully
|
||||
18:10:35.016 TargetDeclination Write OK Invalid Value exception generated as expected on set TargetDeclination < -90 degrees
|
||||
18:10:35.032 TargetDeclination Write OK Invalid Value exception generated as expected on set TargetDeclination < -90 degrees
|
||||
18:10:35.652 TargetDeclination Write OK Legal value 01:00:00.00 DD:MM:SS written successfully
|
||||
18:10:56.417 SlewToTarget INFO Slewed within 14.8 arc seconds of expected RA: 02:20:20.99, actual RA: 02:20:20.00
|
||||
18:10:56.434 SlewToTarget INFO Slewed within 21596.0 arc seconds of expected DEC: 03:00:00.00, actual DEC: -02:59:56.00
|
||||
18:10:56.449 SlewToTarget OK The TargetRightAscension property 02:20:20.99 matches the expected RA OK.
|
||||
18:10:56.463 SlewToTarget OK The TargetDeclination property 03:00:00.00 matches the expected Declination OK.
|
||||
18:10:56.504 SlewToTarget (Bad L) OK Telescope.TargetRA correctly rejected bad RA coordinate: -01:00:00.00
|
||||
18:10:56.676 SlewToTarget (Bad L) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
18:10:56.736 SlewToTarget (Bad H) OK Telescope.TargetRA correctly rejected bad RA coordinate: 25:00:00.00
|
||||
18:10:56.915 SlewToTarget (Bad H) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
18:11:20.512 SlewToTargetAsync INFO Slewed within 35.1 arc seconds of expected RA: 01:20:42.34, actual RA: 01:20:40.00
|
||||
18:11:20.526 SlewToTargetAsync INFO Slewed within 28797.0 arc seconds of expected DEC: 04:00:00.00, actual DEC: -03:59:57.00
|
||||
18:11:20.539 SlewToTargetAsync OK The TargetRightAscension property 01:20:42.34 matches the expected RA OK.
|
||||
18:11:20.553 SlewToTargetAsync OK The TargetDeclination property 04:00:00.00 matches the expected Declination OK.
|
||||
18:11:20.593 SlewToTargetAsync (Bad L) OK Telescope.TargetRA correctly rejected bad RA coordinate: -01:00:00.00
|
||||
18:11:20.774 SlewToTargetAsync (Bad L) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
18:11:20.833 SlewToTargetAsync (Bad H) OK Telescope.TargetRA correctly rejected bad RA coordinate: 25:00:00.00
|
||||
18:11:21.032 SlewToTargetAsync (Bad H) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
18:11:21.091 DestinationSideOfPier Test skipped as AligmentMode is not German Polar
|
||||
18:11:22.864 SlewToAltAz INFO Slewed to within 144:49:47.00 DD:MM:SS of expected Azimuth: 150:00:00.00
|
||||
18:11:22.880 SlewToAltAz INFO Slewed to within 46:00:01.00 DD:MM:SS of expected Altitude: 50:00:00.00
|
||||
18:11:22.920 SlewToAltAz (Bad L) OK Correctly rejected bad Altitude coordinate: -100:00:00.00
|
||||
18:11:23.710 SlewToAltAz (Bad L) OK Correctly rejected bad Azimuth coordinate: -10:00:00.00
|
||||
18:11:23.771 SlewToAltAz (Bad H) OK Correctly rejected bad Altitude coordinate: 100:00:00.00
|
||||
18:11:24.447 SlewToAltAz (Bad H) OK Correctly rejected bad Azimuth coordinate: 370:00:00.00
|
||||
18:11:31.196 SlewToAltAzAsync INFO Slewed to within 149:51:53.00 DD:MM:SS of expected Azimuth: 155:00:00.00
|
||||
18:11:31.210 SlewToAltAzAsync INFO Slewed to within 51:00:01.00 DD:MM:SS of expected Altitude: 55:00:00.00
|
||||
18:11:31.251 SlewToAltAzAsync (Bad L) OK Correctly rejected bad Altitude coordinate: -100:00:00.00
|
||||
18:11:32.060 SlewToAltAzAsync (Bad L) OK Correctly rejected bad Azimuth coordinate: -10:00:00.00
|
||||
18:11:32.121 SlewToAltAzAsync (Bad H) OK Correctly rejected bad Altitude coordinate: 100:00:00.00
|
||||
18:11:32.814 SlewToAltAzAsync (Bad H) OK Correctly rejected bad Azimuth coordinate: 370:00:00.00
|
||||
18:11:56.494 SyncToTarget INFO Slewed to start position within 40.1 arc seconds of expected RA: 02:21:18.67, actual RA: 02:21:16.00
|
||||
18:11:56.509 SyncToTarget OK Slewed to start position OK. DEC: 00:00:00.00
|
||||
18:11:59.005 SyncToTarget INFO Synced to sync position within 55.1 arc seconds of expected RA: 02:17:18.67, actual RA: 02:17:15.00
|
||||
18:11:59.019 SyncToTarget INFO Synced to sync position within 3660.0 arc seconds of expected DEC: -01:00:00.00, actual DEC: 00:01:00.00
|
||||
18:12:22.398 SyncToTarget INFO Slewed back to start position within 40.1 arc seconds of expected RA: 02:21:18.67, actual RA: 02:21:16.00
|
||||
18:12:22.416 SyncToTarget OK Slewed back to start position OK. DEC: 00:00:00.00
|
||||
18:12:24.739 SyncToTarget INFO Synced to reversed sync position within 55.1 arc seconds of expected RA: 02:25:18.67, actual RA: 02:25:15.00
|
||||
18:12:24.754 SyncToTarget INFO Synced to reversed sync position within 7200.0 arc seconds of expected DEC: 01:00:00.00, actual DEC: -01:00:00.00
|
||||
18:12:46.438 SyncToTarget INFO Slewed back to start position within 40.1 arc seconds of expected RA: 02:21:18.67, actual RA: 02:21:16.00
|
||||
18:12:46.452 SyncToTarget OK Slewed back to start position OK. DEC: 00:00:00.00
|
||||
18:12:46.491 SyncToTarget (Bad L) OK Telescope.TargetRA correctly rejected bad RA coordinate: -01:00:00.00
|
||||
18:12:46.643 SyncToTarget (Bad L) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
18:12:46.702 SyncToTarget (Bad H) OK Telescope.TargetRA correctly rejected bad RA coordinate: 25:00:00.00
|
||||
18:12:46.884 SyncToTarget (Bad H) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
18:12:47.702 SyncToAltAz OK CanSyncAltAz is False and a MethodNotImplementedException exception was generated as expected
|
||||
|
||||
SideOfPier Model Tests
|
||||
18:12:47.769 SideOfPier Model Tests INFO Tests skipped because this driver does Not support SideOfPier Read
|
||||
|
||||
Post-run Checks
|
||||
18:12:47.862 Mount Safety INFO Tracking can't be turned off for this mount, please switch off manually.
|
||||
|
||||
Conformance test complete
|
||||
|
||||
No errors, warnings or issues found: your driver passes ASCOM validation!!
|
||||
|
||||
Driver Hash Value: 0C55C8535B9B3A4048581454F9D6A263EFD16E20AEC783762006739F671F586B64F1D8DD3E1E613C27A5B24838AEB8656C2A19BD1EE69177ECF2619599C0DA3C
|
||||
@@ -0,0 +1,269 @@
|
||||
Conform Report Hash (V1): EE943505837FAD1E4F4998D567C304701AB845611D748A5A9517BF10842F951F5DD946834D8E59B5E7B84C7C067D24F52AC1C4F7E4A879A7CDAF4AB7BFEF8BB4
|
||||
|
||||
|
||||
ConformanceCheck ASCOM Device Conformance Checker Version 6.4.63.0, Build time: 18/12/2018 08:58:32
|
||||
ConformanceCheck Running on: ASCOM Platform 6.4 SP1 6.4.1.2695
|
||||
|
||||
ConformanceCheck Driver ProgID: ASCOM.MeadeGeneric.Telescope
|
||||
|
||||
Error handling
|
||||
Error number for "Not Implemented" is: 80040400
|
||||
Error number for "Invalid Value 1" is: 80040401
|
||||
Error number for "Invalid Value 2" is: 80040405
|
||||
Error number for "Value Not Set 1" is: 80040402
|
||||
Error number for "Value Not Set 2" is: 80040403
|
||||
Error messages will not be interpreted to infer state.
|
||||
|
||||
19:18:57.428 Driver Access Checks OK
|
||||
19:18:58.079 AccessChecks OK Successfully created driver using late binding
|
||||
19:18:58.893 AccessChecks OK Successfully connected using late binding
|
||||
19:18:58.898 AccessChecks INFO The driver is a .NET object
|
||||
19:18:58.903 AccessChecks INFO The AssemblyQualifiedName is: ASCOM.Meade.net.Telescope, ASCOM.Meade.net.Telescope, Version=0.4.0.0, Cultu
|
||||
19:18:58.907 AccessChecks INFO The driver implements interface: ASCOM.DeviceInterface.ITelescopeV3
|
||||
19:18:59.617 AccessChecks INFO Device does not expose interface ITelescopeV2
|
||||
19:19:00.617 AccessChecks INFO Device exposes interface ITelescopeV3
|
||||
19:19:01.929 AccessChecks OK Successfully created driver using driver access toolkit
|
||||
19:19:02.635 AccessChecks OK Successfully connected using driver access toolkit
|
||||
|
||||
Conform is using ASCOM.DriverAccess.Telescope to get a Telescope object
|
||||
19:19:03.962 ConformanceCheck OK Driver instance created successfully
|
||||
19:19:04.542 ConformanceCheck OK Connected OK
|
||||
|
||||
Common Driver Methods
|
||||
19:19:04.582 InterfaceVersion OK 3
|
||||
19:19:04.611 Connected OK True
|
||||
19:19:04.640 Description OK Meade Generic
|
||||
19:19:04.668 DriverInfo OK Information about the driver itself. Version: 0.4
|
||||
19:19:04.696 DriverVersion OK 0.4
|
||||
19:19:04.724 Name OK Meade Generic
|
||||
19:19:04.753 CommandString INFO Conform cannot test the CommandString method
|
||||
19:19:04.758 CommandBlind INFO Conform cannot test the CommandBlind method
|
||||
19:19:04.765 CommandBool INFO Conform cannot test the CommandBool method
|
||||
19:19:04.771 Action INFO Conform cannot test the Action method
|
||||
19:19:04.778 SupportedActions OK Driver returned an empty action list
|
||||
|
||||
Can Properties
|
||||
19:19:04.843 CanFindHome OK False
|
||||
19:19:04.850 CanPark OK True
|
||||
19:19:04.858 CanPulseGuide OK True
|
||||
19:19:04.866 CanSetDeclinationRate OK False
|
||||
19:19:04.874 CanSetGuideRates OK False
|
||||
19:19:04.881 CanSetPark OK False
|
||||
19:19:04.889 CanSetPierSide OK False
|
||||
19:19:04.923 CanSetRightAscensionRate OK False
|
||||
19:19:04.932 CanSetTracking OK True
|
||||
19:19:04.939 CanSlew OK True
|
||||
19:19:04.947 CanSlewltAz OK True
|
||||
19:19:04.954 CanSlewAltAzAsync OK True
|
||||
19:19:04.962 CanSlewAsync OK True
|
||||
19:19:04.971 CanSync OK True
|
||||
19:19:04.979 CanSyncAltAz OK False
|
||||
19:19:04.990 CanUnPark OK False
|
||||
|
||||
Pre-run Checks
|
||||
19:19:05.040 Mount Safety INFO Scope is not parked, continuing testing
|
||||
19:19:05.070 Mount Safety INFO Scope tracking has been enabled
|
||||
19:19:05.100 TimeCheck INFO PC Time Zone: GMT Summer Time, offset -1 hours.
|
||||
19:19:05.108 TimeCheck INFO PC UTCDate: 19-May-2019 18:19:05.108
|
||||
19:19:05.604 TimeCheck INFO Mount UTCDate: 19-May-2019 18:18:16.000
|
||||
|
||||
Properties
|
||||
19:19:05.689 AlignmentMode OK algPolar
|
||||
19:19:06.820 Altitude OK 50.09
|
||||
19:19:06.854 ApertureArea OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:06.886 ApertureDiameter OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:06.920 AtHome OK False
|
||||
19:19:06.952 AtPark OK False
|
||||
19:19:07.636 Azimuth OK 150.49
|
||||
19:19:07.938 Declination OK 16:49:00.00
|
||||
19:19:07.971 DeclinationRate Read OK 0.00
|
||||
19:19:08.003 DeclinationRate Write OK CanSetDeclinationRate is False and a PropertyNotImplementedException exception was generated as expected
|
||||
19:19:08.037 DoesRefraction Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:08.071 DoesRefraction Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:08.104 EquatorialSystem OK equLocalTopocentric
|
||||
19:19:08.136 FocalLength OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:08.169 GuideRateDeclination Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:08.179 GuideRateDeclination Write OK CanSetGuideRates is False and a PropertyNotImplementedException exception was generated as expected
|
||||
19:19:08.212 GuideRateRightAscension Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:08.223 GuideRateRightAscension Write OK CanSetGuideRates is False and a PropertyNotImplementedException exception was generated as expected
|
||||
19:19:08.257 IsPulseGuiding OK False
|
||||
19:19:08.539 RightAscension OK 11:16:48.00
|
||||
19:19:08.572 RightAscensionRate Read OK 0.00
|
||||
19:19:08.605 RightAscensionRate Write OK CanSetRightAscensionRate is False and a PropertyNotImplementedException exception was generated as expected
|
||||
19:19:08.639 SiteElevation Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:08.675 SiteElevation Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:08.687 SiteElevation Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:08.698 SiteElevation Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:08.758 SiteLatitude Read OK 53:48:00.00
|
||||
19:19:08.793 SiteLatitude Write OK Invalid Value exception generated as expected on set site latitude < -90 degrees
|
||||
19:19:08.808 SiteLatitude Write OK Invalid Value exception generated as expected on set site latitude > 90 degrees
|
||||
19:19:08.973 SiteLatitude Write OK Legal value 53:48:00.00 degrees written successfully
|
||||
19:19:09.052 SiteLongitude Read OK -01:47:00.00
|
||||
19:19:09.088 SiteLongitude Write OK Invalid Value exception generated as expected on set site longitude < -180 degrees
|
||||
19:19:09.100 SiteLongitude Write OK Invalid Value exception generated as expected on set site longitude > 180 degrees
|
||||
19:19:09.267 SiteLongitude Write OK Legal value -01:47:00.00 degrees written successfully
|
||||
19:19:09.326 Slewing OK False
|
||||
19:19:09.361 SlewSettleTime Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:09.400 SlewSettleTime Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:09.413 SlewSettleTime Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:09.447 SideOfPier Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:19:09.493 SiderealTime OK 10:00:32.13
|
||||
19:19:09.505 SiderealTime OK Scope and ASCOM sidereal times agree to better than 2 seconds, Scope: 10:00:32.13, ASCOM: 10:00:33.22
|
||||
19:19:09.540 TargetDeclination Read OK .NET Not InvalidOperationException generated on read before write
|
||||
19:19:09.575 TargetDeclination Write INFO Tests moved after the SlewToCoordinates tests so that Conform can check they properly set target coordinates.
|
||||
19:19:09.588 TargetRightAscension Read OK .NET Not InvalidOperationException generated on read before write
|
||||
19:19:09.623 TargetRightAscension Write INFO Tests moved after the SlewToCoordinates tests so that Conform can check they properly set target coordinates.
|
||||
19:19:09.635 Tracking Read OK True
|
||||
19:19:10.697 Tracking Write OK False
|
||||
19:19:11.759 TrackingRates Found drive rate: driveSidereal
|
||||
19:19:11.772 TrackingRates Found drive rate: driveLunar
|
||||
19:19:11.784 TrackingRates OK Drive rates read OK
|
||||
19:19:11.797 TrackingRates OK Disposed tracking rates OK
|
||||
19:19:11.832 TrackingRates OK Successfully obtained a TrackingRates object after the previous TrackingRates object was disposed
|
||||
19:19:11.858 TrackingRate Read OK driveSidereal
|
||||
19:19:11.893 TrackingRate Write OK Successfully set drive rate: driveSidereal
|
||||
19:19:11.928 TrackingRate Write OK Successfully set drive rate: driveLunar
|
||||
19:19:12.073 UTCDate Read OK 19-May-2019 18:18:23.000
|
||||
19:19:13.628 UTCDate Write OK New UTCDate written successfully: 19/05/2019 19:18:23
|
||||
|
||||
Methods
|
||||
19:19:15.180 CanMoveAxis:Primary OK CanMoveAxis:Primary True
|
||||
19:19:15.218 CanMoveAxis:Secondary OK CanMoveAxis:Secondary True
|
||||
19:19:15.255 CanMoveAxis:Tertiary OK CanMoveAxis:Tertiary False
|
||||
19:19:15.292 Park/Unpark INFO Tests skipped
|
||||
19:19:15.311 AbortSlew OK AbortSlew OK when not slewing
|
||||
19:19:15.376 AxisRate:Primary OK Axis rate minimum: 1 Axis rate maximum: 1
|
||||
19:19:15.390 AxisRate:Primary OK Axis rate minimum: 2 Axis rate maximum: 2
|
||||
19:19:15.404 AxisRate:Primary OK Axis rate minimum: 3 Axis rate maximum: 3
|
||||
19:19:15.417 AxisRate:Primary OK Axis rate minimum: 4 Axis rate maximum: 4
|
||||
19:19:15.430 AxisRate:Primary OK No overlapping axis rates found
|
||||
19:19:15.442 AxisRate:Primary OK No duplicate axis rates found
|
||||
19:19:15.454 AxisRate:Primary OK Successfully disposed of rate 1 - 1
|
||||
19:19:15.468 AxisRate:Primary OK Successfully disposed of rate 2 - 2
|
||||
19:19:15.480 AxisRate:Primary OK Successfully disposed of rate 3 - 3
|
||||
19:19:15.492 AxisRate:Primary OK Successfully disposed of rate 4 - 4
|
||||
19:19:15.505 AxisRate:Primary OK Disposed axis rates OK
|
||||
19:19:15.518 AxisRate:Secondary OK Axis rate minimum: 1 Axis rate maximum: 1
|
||||
19:19:15.533 AxisRate:Secondary OK Axis rate minimum: 2 Axis rate maximum: 2
|
||||
19:19:15.546 AxisRate:Secondary OK Axis rate minimum: 3 Axis rate maximum: 3
|
||||
19:19:15.559 AxisRate:Secondary OK Axis rate minimum: 4 Axis rate maximum: 4
|
||||
19:19:15.571 AxisRate:Secondary OK No overlapping axis rates found
|
||||
19:19:15.585 AxisRate:Secondary OK No duplicate axis rates found
|
||||
19:19:15.599 AxisRate:Secondary OK Successfully disposed of rate 1 - 1
|
||||
19:19:15.612 AxisRate:Secondary OK Successfully disposed of rate 2 - 2
|
||||
19:19:15.625 AxisRate:Secondary OK Successfully disposed of rate 3 - 3
|
||||
19:19:15.638 AxisRate:Secondary OK Successfully disposed of rate 4 - 4
|
||||
19:19:15.652 AxisRate:Secondary OK Disposed axis rates OK
|
||||
19:19:15.667 AxisRate:Tertiary OK Empty axis rate returned
|
||||
19:19:15.680 AxisRate:Tertiary OK Disposed axis rates OK
|
||||
19:19:15.697 FindHome OK CanFindHome is False and a MethodNotImplementedException exception was generated as expected
|
||||
19:19:15.745 MoveAxis Primary OK Can successfully set a movement rate of zero
|
||||
19:19:15.761 MoveAxis Primary OK Exception correctly generated when move axis is set below lowest rate (0.5)
|
||||
19:19:15.800 MoveAxis Primary OK Exception correctly generated when move axis is set above highest rate (5)
|
||||
19:19:19.972 MoveAxis Primary OK Successfully moved axis at minimum rate: 1
|
||||
19:19:24.750 MoveAxis Primary OK Successfully moved axis at maximum rate: 4
|
||||
19:19:28.925 MoveAxis Primary OK Tracking state correctly retained for both tracking states
|
||||
19:19:28.941 MoveAxis Primary OK AxisRates object successfully disposed
|
||||
19:19:29.002 MoveAxis Secondary OK Can successfully set a movement rate of zero
|
||||
19:19:29.018 MoveAxis Secondary OK Exception correctly generated when move axis is set below lowest rate (0.5)
|
||||
19:19:29.055 MoveAxis Secondary OK Exception correctly generated when move axis is set above highest rate (5)
|
||||
19:19:33.266 MoveAxis Secondary OK Successfully moved axis at minimum rate: 1
|
||||
19:19:38.191 MoveAxis Secondary OK Successfully moved axis at maximum rate: 4
|
||||
19:19:42.366 MoveAxis Secondary OK Tracking state correctly retained for both tracking states
|
||||
19:19:42.384 MoveAxis Secondary OK AxisRates object successfully disposed
|
||||
19:19:42.447 MoveAxis Tertiary OK CanMoveAxis Tertiary is False and a MethodNotImplementedException exception was generated as expected
|
||||
19:19:44.487 PulseGuide OK Synchronous pulse guide found OK
|
||||
19:20:06.507 SlewToCoordinates INFO Slewed within 175.3 arc seconds of expected RA: 09:01:07.31, actual RA: 09:01:19.00
|
||||
19:20:06.522 SlewToCoordinates INFO Slewed within 82.0 arc seconds of expected DEC: 01:00:00.00, actual DEC: 01:01:22.00
|
||||
19:20:06.537 SlewToCoordinates OK The TargetRightAscension property 09:01:07.31 matches the expected RA OK.
|
||||
19:20:06.550 SlewToCoordinates OK The TargetDeclination property 01:00:00.00 matches the expected Declination OK.
|
||||
19:20:06.591 SlewToCoordinates (Bad L) OK Correctly rejected bad RA coordinate: -01:00:00.00
|
||||
19:20:06.856 SlewToCoordinates (Bad L) OK Correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
19:20:06.920 SlewToCoordinates (Bad H) OK Correctly rejected bad RA coordinate: 25:00:00.00
|
||||
19:20:07.224 SlewToCoordinates (Bad H) OK Correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
19:20:25.860 SlewToCoordinatesAsync INFO Slewed within 178.3 arc seconds of expected RA: 08:01:30.11, actual RA: 08:01:42.00
|
||||
19:20:25.876 SlewToCoordinatesAsync INFO Slewed within 64.0 arc seconds of expected DEC: 02:00:00.00, actual DEC: 01:58:56.00
|
||||
19:20:25.890 SlewToCoordinatesAsync OK The TargetRightAscension property 08:01:30.11 matches the expected RA OK.
|
||||
19:20:25.904 SlewToCoordinatesAsync OK The TargetDeclination property 02:00:00.00 matches the expected Declination OK.
|
||||
19:20:25.945 SlewToCoordinatesAsync (Bad L) OK Correctly rejected bad RA coordinate: -01:00:00.00
|
||||
19:20:26.201 SlewToCoordinatesAsync (Bad L) OK Correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
19:20:26.263 SlewToCoordinatesAsync (Bad H) OK Correctly rejected bad RA coordinate: 25:00:00.00
|
||||
19:20:26.567 SlewToCoordinatesAsync (Bad H) OK Correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
19:20:47.987 SyncToCoordinates INFO Slewed to start position within 25.3 arc seconds of expected RA: 07:01:49.69, actual RA: 07:01:48.00
|
||||
19:20:48.003 SyncToCoordinates OK Slewed to start position OK. DEC: 26:54:00.00
|
||||
19:20:49.265 SyncToCoordinates INFO Synced to sync position within 25.3 arc seconds of expected RA: 06:57:49.69, actual RA: 06:57:48.00
|
||||
19:20:49.282 SyncToCoordinates OK Synced to sync position OK. DEC: 25:54:00.00
|
||||
19:20:49.301 SyncToCoordinates OK The TargetRightAscension property 06:57:49.69 matches the expected RA OK.
|
||||
19:20:49.316 SyncToCoordinates OK The TargetDeclination property 25:54:00.00 matches the expected Declination OK.
|
||||
19:21:05.202 SyncToCoordinates INFO Slewed back to start position within 25.3 arc seconds of expected RA: 07:01:49.69, actual RA: 07:01:48.00
|
||||
19:21:05.217 SyncToCoordinates OK Slewed back to start position OK. DEC: 26:54:00.00
|
||||
19:21:06.337 SyncToCoordinates INFO Synced to reversed sync position within 40.3 arc seconds of expected RA: 07:05:49.69, actual RA: 07:05:47.00
|
||||
19:21:06.353 SyncToCoordinates OK Synced to reversed sync position OK. DEC: 27:54:00.00
|
||||
19:21:22.444 SyncToCoordinates INFO Slewed back to start position within 25.3 arc seconds of expected RA: 07:01:49.69, actual RA: 07:01:48.00
|
||||
19:21:22.459 SyncToCoordinates OK Slewed back to start position OK. DEC: 26:54:00.00
|
||||
19:21:22.502 SyncToCoordinates (Bad L) OK Correctly rejected bad RA coordinate: -01:00:00.00
|
||||
19:21:22.620 SyncToCoordinates (Bad L) OK Correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
19:21:22.682 SyncToCoordinates (Bad H) OK Correctly rejected bad RA coordinate: 25:00:00.00
|
||||
19:21:23.379 SyncToCoordinates (Bad H) OK Correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
19:21:23.439 TargetRightAscension Write OK Invalid Value exception generated as expected on set TargetRightAscension < 0 hours
|
||||
19:21:23.454 TargetRightAscension Write OK Invalid Value exception generated as expected on set TargetRightAscension > 24 hours
|
||||
19:21:23.670 TargetRightAscension Write OK Legal value 06:02:46.50 HH:MM:SS written successfully
|
||||
19:21:23.709 TargetDeclination Write OK Invalid Value exception generated as expected on set TargetDeclination < -90 degrees
|
||||
19:21:23.724 TargetDeclination Write OK Invalid Value exception generated as expected on set TargetDeclination < -90 degrees
|
||||
19:21:23.918 TargetDeclination Write OK Legal value 01:00:00.00 DD:MM:SS written successfully
|
||||
19:21:44.377 SlewToTarget INFO Slewed within 44.9 arc seconds of expected RA: 07:02:46.99, actual RA: 07:02:44.00
|
||||
19:21:44.392 SlewToTarget OK Slewed OK. DEC: 03:00:00.00
|
||||
19:21:44.421 SlewToTarget OK The TargetRightAscension property 07:02:46.99 matches the expected RA OK.
|
||||
19:21:44.435 SlewToTarget OK The TargetDeclination property 03:00:00.00 matches the expected Declination OK.
|
||||
19:21:44.476 SlewToTarget (Bad L) OK Telescope.TargetRA correctly rejected bad RA coordinate: -01:00:00.00
|
||||
19:21:44.565 SlewToTarget (Bad L) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
19:21:44.627 SlewToTarget (Bad H) OK Telescope.TargetRA correctly rejected bad RA coordinate: 25:00:00.00
|
||||
19:21:44.713 SlewToTarget (Bad H) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
19:22:05.987 SlewToTargetAsync INFO Slewed within 58.0 arc seconds of expected RA: 06:03:07.87, actual RA: 06:03:04.00
|
||||
19:22:06.002 SlewToTargetAsync OK Slewed OK. DEC: 04:00:00.00
|
||||
19:22:06.016 SlewToTargetAsync OK The TargetRightAscension property 06:03:07.87 matches the expected RA OK.
|
||||
19:22:06.030 SlewToTargetAsync OK The TargetDeclination property 04:00:00.00 matches the expected Declination OK.
|
||||
19:22:06.071 SlewToTargetAsync (Bad L) OK Telescope.TargetRA correctly rejected bad RA coordinate: -01:00:00.00
|
||||
19:22:06.134 SlewToTargetAsync (Bad L) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
19:22:06.200 SlewToTargetAsync (Bad H) OK Telescope.TargetRA correctly rejected bad RA coordinate: 25:00:00.00
|
||||
19:22:06.281 SlewToTargetAsync (Bad H) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
19:22:06.341 DestinationSideOfPier Test skipped as AligmentMode is not German Polar
|
||||
19:22:36.522 SlewToAltAz INFO Slewed to within 00:11:23.03 DD:MM:SS of expected Azimuth: 150:00:00.00
|
||||
19:22:36.539 SlewToAltAz INFO Slewed to within 00:02:05.06 DD:MM:SS of expected Altitude: 50:00:00.00
|
||||
19:22:36.581 SlewToAltAz (Bad L) OK Correctly rejected bad Altitude coordinate: -100:00:00.00
|
||||
19:22:36.599 SlewToAltAz (Bad L) OK Correctly rejected bad Azimuth coordinate: -10:00:00.00
|
||||
19:22:36.662 SlewToAltAz (Bad H) OK Correctly rejected bad Altitude coordinate: 100:00:00.00
|
||||
19:22:36.681 SlewToAltAz (Bad H) OK Correctly rejected bad Azimuth coordinate: 370:00:00.00
|
||||
19:22:57.713 SlewToAltAzAsync INFO Slewed to within 00:09:16.99 DD:MM:SS of expected Azimuth: 155:00:00.00
|
||||
19:22:57.728 SlewToAltAzAsync INFO Slewed to within 00:00:28.11 DD:MM:SS of expected Altitude: 55:00:00.00
|
||||
19:22:57.770 SlewToAltAzAsync (Bad L) OK Correctly rejected bad Altitude coordinate: -100:00:00.00
|
||||
19:22:57.789 SlewToAltAzAsync (Bad L) OK Correctly rejected bad Azimuth coordinate: -10:00:00.00
|
||||
19:22:57.851 SlewToAltAzAsync (Bad H) OK Correctly rejected bad Altitude coordinate: 100:00:00.00
|
||||
19:22:57.870 SlewToAltAzAsync (Bad H) OK Correctly rejected bad Azimuth coordinate: 370:00:00.00
|
||||
19:23:22.572 SyncToTarget OK Slewed to start position OK. RA: 07:04:21.38
|
||||
19:23:22.588 SyncToTarget OK Slewed to start position OK. DEC: 26:54:00.00
|
||||
19:23:24.332 SyncToTarget INFO Synced to sync position within 20.7 arc seconds of expected RA: 07:00:21.38, actual RA: 07:00:20.00
|
||||
19:23:24.347 SyncToTarget OK Synced to sync position OK. DEC: 25:54:00.00
|
||||
19:23:42.234 SyncToTarget INFO Slewed back to start position within 20.7 arc seconds of expected RA: 07:04:21.38, actual RA: 07:04:20.00
|
||||
19:23:42.250 SyncToTarget OK Slewed back to start position OK. DEC: 26:54:00.00
|
||||
19:23:43.530 SyncToTarget INFO Synced to reversed sync position within 35.7 arc seconds of expected RA: 07:08:21.38, actual RA: 07:08:19.00
|
||||
19:23:43.546 SyncToTarget OK Synced to reversed sync position OK. DEC: 27:54:00.00
|
||||
19:23:59.445 SyncToTarget INFO Slewed back to start position within 20.7 arc seconds of expected RA: 07:04:21.38, actual RA: 07:04:20.00
|
||||
19:23:59.460 SyncToTarget OK Slewed back to start position OK. DEC: 26:54:00.00
|
||||
19:23:59.500 SyncToTarget (Bad L) OK Telescope.TargetRA correctly rejected bad RA coordinate: -01:00:00.00
|
||||
19:23:59.656 SyncToTarget (Bad L) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
19:23:59.716 SyncToTarget (Bad H) OK Telescope.TargetRA correctly rejected bad RA coordinate: 25:00:00.00
|
||||
19:23:59.997 SyncToTarget (Bad H) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
19:24:02.242 SyncToAltAz OK CanSyncAltAz is False and a MethodNotImplementedException exception was generated as expected
|
||||
|
||||
SideOfPier Model Tests
|
||||
19:24:02.320 SideOfPier Model Tests INFO Tests skipped because this driver does Not support SideOfPier Read
|
||||
|
||||
Post-run Checks
|
||||
19:24:02.417 Mount Safety OK Tracking stopped to protect your mount.
|
||||
|
||||
Conformance test complete
|
||||
|
||||
No errors, warnings or issues found: your driver passes ASCOM validation!!
|
||||
|
||||
Driver Hash Value: D41F95CA4DB76F4C2F9742455087821EB82915774F9D97EDF4DAB66B4D74932295DC665B8B90C3FC94AB1B5FA5BAC8009D715FF21C0620CB5F40D8DACFAE67D6
|
||||
@@ -0,0 +1,68 @@
|
||||
Conform Report Hash (V1): B869A2DCAA7DACEB47895197B4418080943EDDCC3D1A49E9DDE97B9B22DF8F7B83DC95D595972C4345F53236103CE33045056F1A6BB068B32F72C080377A2FC1
|
||||
|
||||
|
||||
ConformanceCheck ASCOM Device Conformance Checker Version 6.4.63.0, Build time: 18/12/2018 08:58:32
|
||||
ConformanceCheck Running on: ASCOM Platform 6.4 SP1 6.4.1.2695
|
||||
|
||||
ConformanceCheck Driver ProgID: ASCOM.MeadeGeneric.focuser
|
||||
|
||||
Error handling
|
||||
Error number for "Not Implemented" is: 80040400
|
||||
Error number for "Invalid Value 1" is: 80040404
|
||||
Error number for "Invalid Value 3" is: 80040405
|
||||
Error number for "Value Not Set 1" is: 80040402
|
||||
Error number for "Value Not Set 2" is: 80040403
|
||||
Error messages will not be interpreted to infer state.
|
||||
|
||||
19:18:30.690 Driver Access Checks OK
|
||||
19:18:31.351 AccessChecks OK Successfully created driver using late binding
|
||||
19:18:31.676 AccessChecks OK Successfully connected using late binding
|
||||
19:18:31.682 AccessChecks INFO The driver is a .NET object
|
||||
19:18:31.687 AccessChecks INFO The AssemblyQualifiedName is: ASCOM.Meade.net.Focuser, ASCOM.Meade.net.Focuser, Version=0.4.0.0, Culture=n
|
||||
19:18:31.692 AccessChecks INFO The driver implements interface: ASCOM.DeviceInterface.IFocuserV3
|
||||
19:18:32.341 AccessChecks INFO Device does not expose IFocuser interface
|
||||
19:18:32.405 AccessChecks INFO Device does not expose IFocuserV2 interface
|
||||
19:18:32.675 AccessChecks INFO Device exposes IFocuserV3 interface
|
||||
19:18:32.793 AccessChecks OK Successfully created driver using driver access toolkit
|
||||
19:18:32.967 AccessChecks OK Successfully connected using driver access toolkit
|
||||
19:18:33.031 AccessChecks OK Successfully disconnected using driver access toolkit
|
||||
|
||||
Conform is using ASCOM.DriverAccess.Focuser to get a Focuser object
|
||||
19:18:33.103 ConformanceCheck OK Driver instance created successfully
|
||||
19:18:33.621 ConformanceCheck OK Connected OK
|
||||
|
||||
Common Driver Methods
|
||||
19:18:33.661 InterfaceVersion OK 3
|
||||
19:18:33.691 Connected OK True
|
||||
19:18:33.719 Description OK Meade Generic
|
||||
19:18:33.749 DriverInfo OK Information about the driver itself. Version: 0.4
|
||||
19:18:33.778 DriverVersion OK 0.4
|
||||
19:18:33.807 Name OK Meade Generic
|
||||
19:18:33.836 CommandXXX INFO Tests skipped
|
||||
19:18:33.842 Action INFO Conform cannot test the Action method
|
||||
19:18:33.850 SupportedActions OK Driver returned an empty action list
|
||||
|
||||
Properties
|
||||
19:18:33.962 Absolute OK False
|
||||
19:18:33.970 IsMoving OK False
|
||||
19:18:33.977 MaxStep OK 7000
|
||||
19:18:33.985 MaxIncrement OK 7000
|
||||
19:18:33.994 Position OK Position must not be implemented for a relative focuser and a PropertyNotImplementedException exception was generated as expected
|
||||
19:18:34.003 StepSize OK Optional member threw a PropertyNotImplementedException exception.
|
||||
19:18:34.011 TempCompAvailable OK False
|
||||
19:18:34.019 TempComp Read OK False
|
||||
19:18:34.027 TempComp Write OK Temperature compensation is not available and a PropertyNotImplementedException exception was generated as expected
|
||||
19:18:34.036 Temperature OK Optional member threw a PropertyNotImplementedException exception.
|
||||
|
||||
Methods
|
||||
19:18:34.085 Halt OK Focuser halted OK
|
||||
19:18:34.096 Move - TempComp False Moving by: 700
|
||||
19:18:34.808 Move - TempComp False Asynchronous move found
|
||||
19:18:34.818 Move - TempComp False OK Relative move OK
|
||||
19:18:34.830 Move - TempComp False INFO Returning to original position: 0
|
||||
|
||||
Conformance test complete
|
||||
|
||||
No errors, warnings or issues found: your driver passes ASCOM validation!!
|
||||
|
||||
Driver Hash Value: 1816E24C06CF16B84021B2B07D4629C3E46DCC5E738D9BACBD524BE5A969BCB07AB3704AB754BC5AA54F5A76F77721D6F7D756AC16DC0AC7DACDC9EA900FA3C8
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>AstroMath.UnitTests</RootNamespace>
|
||||
<AssemblyName>AstroMath.UnitTests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Moq, Version=4.12.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.12.0\lib\net45\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AstroMathsUnitTests.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Meade.net.Telescope\Meade.net.Telescope.csproj">
|
||||
<Project>{64308775-bd4a-469c-bcab-3ed830b811af}</Project>
|
||||
<Name>Meade.net.Telescope</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -0,0 +1,172 @@
|
||||
using System;
|
||||
using ASCOM.Meade.net.AstroMaths;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace AstroMath.UnitTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class AstroMathsUnitTests
|
||||
{
|
||||
private AstroMaths _astroMath;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_astroMath = new AstroMaths();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DegreesToRadians()
|
||||
{
|
||||
var radians = _astroMath.DegreesToRadians(90);
|
||||
Assert.That(radians, Is.EqualTo(1.5707963267948966));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RadiansToDegrees()
|
||||
{
|
||||
var degrees = _astroMath.RadiansToDegrees(1.5707963267948966);
|
||||
Assert.That(degrees, Is.EqualTo(90));
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void DateTimeToDecimalHours_book()
|
||||
{
|
||||
DateTime dateTime = new DateTime(2019, 05, 18, 18, 31, 27, DateTimeKind.Utc);
|
||||
var decimalHours = _astroMath.DateTimeToDecimalHours(dateTime);
|
||||
|
||||
Assert.That(decimalHours, Is.EqualTo(18.524166666666666));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DateTimeToDecimalHours()
|
||||
{
|
||||
DateTime dateTime = new DateTime(2019, 05, 18, 22, 26, 15, DateTimeKind.Utc);
|
||||
var decimalHours = _astroMath.DateTimeToDecimalHours(dateTime);
|
||||
|
||||
Assert.That(decimalHours, Is.EqualTo(22.4375));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UTtoGST_book()
|
||||
{
|
||||
DateTime dateTime = new DateTime(1980, 04, 22, 14, 36, 51, 670, DateTimeKind.Utc);
|
||||
double gst = _astroMath.UTtoGst(dateTime);
|
||||
|
||||
Assert.That(gst, Is.EqualTo(4.667932706211154));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UTtoGst()
|
||||
{
|
||||
DateTime dateTime = new DateTime(2019, 05, 18, 22, 26, 15, DateTimeKind.Utc);
|
||||
double gst = _astroMath.UTtoGst(dateTime);
|
||||
|
||||
Assert.That(gst, Is.EqualTo(14.191879687876451));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GSTtoLST_book()
|
||||
{
|
||||
double gst = 4.668119;
|
||||
var longitude = -64;
|
||||
var lst = _astroMath.GsTtoLst(gst, longitude);
|
||||
Assert.That(lst, Is.EqualTo(0.4014523333333333));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GsTtoLst()
|
||||
{
|
||||
double gst = 14.257589512545053;
|
||||
var longitude = -1.7833333333333332;
|
||||
var lst = _astroMath.GsTtoLst(gst, longitude);
|
||||
Assert.That(lst, Is.EqualTo(14.138700623656163));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RightAscensionToHourAngle_book()
|
||||
{
|
||||
DateTime dateTime = new DateTime(1980, 04, 22, 18, 36, 51,670, DateTimeKind.Utc);
|
||||
var longitude = -64;
|
||||
var rightAscension = 18.539166666666667;//18:32'21"
|
||||
|
||||
//var declination = 30.0019444444444
|
||||
var hourAngle = _astroMath.RightAscensionToHourAngle(dateTime, longitude, rightAscension);
|
||||
Assert.That(hourAngle, Is.EqualTo(9.8730510088778161));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RightAscensionToHourAngle()
|
||||
{
|
||||
DateTime dateTime = new DateTime(2019, 05, 18, 22, 26, 15, DateTimeKind.Utc);
|
||||
var longitude = -1.7833333333333332;
|
||||
var rightAscension = 4.15361111111111;
|
||||
|
||||
var hourAngle = _astroMath.RightAscensionToHourAngle(dateTime, longitude, rightAscension);
|
||||
Assert.That(hourAngle, Is.EqualTo(9.9193796878764502));
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void ConvertEqToHoz_book()
|
||||
{
|
||||
var latitude = 52.0;
|
||||
|
||||
EquatorialCoordinates equatorialCoordinates = new EquatorialCoordinates();
|
||||
equatorialCoordinates.RightAscension = 5.862222222222222;//5 51' 44"
|
||||
equatorialCoordinates.Declination = 23.21944444444444;//23 13' 10"
|
||||
|
||||
var hourAngle = 5.682222;
|
||||
|
||||
var altAz = _astroMath.ConvertEqToHoz(hourAngle, latitude, equatorialCoordinates);
|
||||
|
||||
Assert.That(altAz.Altitude, Is.EqualTo(20.958562421092779));
|
||||
Assert.That(altAz.Azimuth, Is.EqualTo(281.2728706962269));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ConvertEqToHoz()
|
||||
{
|
||||
DateTime dateTime = new DateTime(2019, 05, 18, 22, 26, 15, DateTimeKind.Utc);
|
||||
var longitude = -1.7833333333333332;
|
||||
var latitude = 52.0;
|
||||
EquatorialCoordinates equatorialCoordinates = new EquatorialCoordinates();
|
||||
equatorialCoordinates.RightAscension = 4.15361111111111;
|
||||
equatorialCoordinates.Declination = 30.0019444444444;
|
||||
|
||||
var hourAngle = _astroMath.RightAscensionToHourAngle(dateTime, longitude, equatorialCoordinates.RightAscension);
|
||||
var altaz = _astroMath.ConvertEqToHoz(hourAngle, latitude, equatorialCoordinates);
|
||||
|
||||
Assert.That(altaz.Altitude, Is.EqualTo(-3.5534402923925872));
|
||||
Assert.That(altaz.Azimuth, Is.EqualTo(333.2819484462679));
|
||||
}
|
||||
|
||||
//[Test]
|
||||
//public void ConvertHozToEq_book()
|
||||
//{
|
||||
// HorizonCoordinates hc = new HorizonCoordinates();
|
||||
// hc.Altitude = 19.33434444;
|
||||
// hc.Azimuth = 283.271028;
|
||||
// var lat = 52;
|
||||
// var raDec = _astroMath.ConvertHozToEq(lat, hc);
|
||||
|
||||
// Assert.That(raDec.RightAscension, Is.EqualTo(5.8622222973512992));
|
||||
// Assert.That(raDec.Declination, Is.EqualTo(23.219444300552407));
|
||||
//}
|
||||
|
||||
|
||||
//[Test]
|
||||
//public void ConvertHozToEq()
|
||||
//{
|
||||
// HorizonCoordinates hc = new HorizonCoordinates();
|
||||
// hc.Altitude = 50;
|
||||
// hc.Azimuth = 150;
|
||||
// var lat = 53.5;
|
||||
// var raDec = _astroMath.ConvertHozToEq(lat, hc);
|
||||
|
||||
// Assert.That(raDec.RightAscension, Is.EqualTo(22.69408899548845));
|
||||
// Assert.That(raDec.Declination, Is.EqualTo(16.539114529888948));
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("AstroMath.UnitTests")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("AstroMath.UnitTests")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("ad4959dd-33d7-4c3f-8db0-7361d8e74a95")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.0.0.0")]
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Castle.Core" version="4.4.0" targetFramework="net472" />
|
||||
<package id="Moq" version="4.12.0" targetFramework="net472" />
|
||||
<package id="NUnit" version="3.12.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -1,272 +0,0 @@
|
||||
Start-up ASCOM Device Conformance Checker - 64bit mode
|
||||
Start-up ASCOM Platform 6.4 SP1 6.4.1.2695
|
||||
|
||||
|
||||
ConformanceCheck ASCOM Device Conformance Checker Version 6.4.63.0, Build time: 18/12/2018 08:58:34
|
||||
ConformanceCheck Running on: ASCOM Platform 6.4 SP1 6.4.1.2695
|
||||
|
||||
ConformanceCheck Driver ProgID: ASCOM.MeadeAutostar497.Telescope
|
||||
|
||||
Error handling
|
||||
Error number for "Not Implemented" is: 80040400
|
||||
Error number for "Invalid Value 1" is: 80040401
|
||||
Error number for "Invalid Value 2" is: 80040405
|
||||
Error number for "Value Not Set 1" is: 80040402
|
||||
Error number for "Value Not Set 2" is: 80040403
|
||||
Error messages will not be interpreted to infer state.
|
||||
|
||||
18:07:45.625 Driver Access Checks OK
|
||||
18:07:46.272 AccessChecks OK Successfully created driver using late binding
|
||||
18:07:46.685 AccessChecks OK Successfully connected using late binding
|
||||
18:07:46.689 AccessChecks INFO The driver is a .NET object
|
||||
18:07:46.693 AccessChecks INFO The AssemblyQualifiedName is: ASCOM.MeadeAutostar497.Telescope, ASCOM.MeadeAutostar497.Telescope, Version=
|
||||
18:07:46.697 AccessChecks INFO The driver implements interface: ASCOM.DeviceInterface.ITelescopeV3
|
||||
18:07:46.701 AccessChecks INFO The driver implements interface: ASCOM.DeviceInterface.IFocuserV3
|
||||
18:07:47.416 AccessChecks INFO Device does not expose interface ITelescopeV2
|
||||
18:07:48.387 AccessChecks INFO Device exposes interface ITelescopeV3
|
||||
18:07:49.708 AccessChecks OK Successfully created driver using driver access toolkit
|
||||
18:07:50.029 AccessChecks OK Successfully connected using driver access toolkit
|
||||
|
||||
Conform is using ASCOM.DriverAccess.Telescope to get a Telescope object
|
||||
18:07:51.351 ConformanceCheck OK Driver instance created successfully
|
||||
18:07:51.775 ConformanceCheck OK Connected OK
|
||||
|
||||
Common Driver Methods
|
||||
18:07:51.817 InterfaceVersion OK 3
|
||||
18:07:51.845 Connected OK True
|
||||
18:07:51.874 Description OK Meade Autostar 497 .net
|
||||
18:07:51.903 DriverInfo OK Information about the driver itself. Version: 0.0
|
||||
18:07:51.932 DriverVersion OK 0.0
|
||||
18:07:51.961 Name OK Meade Autostar 497 .net
|
||||
18:07:51.990 CommandString INFO Conform cannot test the CommandString method
|
||||
18:07:51.996 CommandBlind INFO Conform cannot test the CommandBlind method
|
||||
18:07:52.002 CommandBool INFO Conform cannot test the CommandBool method
|
||||
18:07:52.008 Action INFO Conform cannot test the Action method
|
||||
18:07:52.015 SupportedActions OK Driver returned an empty action list
|
||||
|
||||
Can Properties
|
||||
18:07:52.082 CanFindHome OK False
|
||||
18:07:52.089 CanPark OK True
|
||||
18:07:52.096 CanPulseGuide OK True
|
||||
18:07:52.102 CanSetDeclinationRate OK False
|
||||
18:07:52.109 CanSetGuideRates OK False
|
||||
18:07:52.117 CanSetPark OK False
|
||||
18:07:52.125 CanSetPierSide OK False
|
||||
18:07:52.177 CanSetRightAscensionRate OK False
|
||||
18:07:52.185 CanSetTracking OK False
|
||||
18:07:52.193 CanSlew OK True
|
||||
18:07:52.200 CanSlewltAz OK True
|
||||
18:07:52.208 CanSlewAltAzAsync OK True
|
||||
18:07:52.216 CanSlewAsync OK True
|
||||
18:07:52.224 CanSync OK True
|
||||
18:07:52.231 CanSyncAltAz OK False
|
||||
18:07:52.239 CanUnPark OK False
|
||||
|
||||
Pre-run Checks
|
||||
18:07:52.286 Mount Safety INFO Scope is not parked, continuing testing
|
||||
18:07:52.339 TimeCheck INFO PC Time Zone: GMT Summer Time, offset -1 hours.
|
||||
18:07:52.348 TimeCheck INFO PC UTCDate: 08-May-2019 17:07:52.347
|
||||
18:07:53.254 TimeCheck INFO Mount UTCDate: 02-May-2019 19:33:55.000
|
||||
|
||||
Properties
|
||||
18:07:53.358 AlignmentMode OK algPolar
|
||||
18:07:53.515 Altitude OK 1.00
|
||||
18:07:53.555 ApertureArea OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:53.591 ApertureDiameter OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:53.622 AtHome OK False
|
||||
18:07:53.654 AtPark OK False
|
||||
18:07:53.847 Azimuth OK 45.67
|
||||
18:07:54.028 Declination OK -01:00:01.00
|
||||
18:07:54.060 DeclinationRate Read OK 0.00
|
||||
18:07:54.093 DeclinationRate Write OK CanSetDeclinationRate is False and a PropertyNotImplementedException exception was generated as expected
|
||||
18:07:54.126 DoesRefraction Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.159 DoesRefraction Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.193 EquatorialSystem OK equLocalTopocentric
|
||||
18:07:54.227 FocalLength OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.260 GuideRateDeclination Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.270 GuideRateDeclination Write OK CanSetGuideRates is False and a PropertyNotImplementedException exception was generated as expected
|
||||
18:07:54.303 GuideRateRightAscension Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.314 GuideRateRightAscension Write OK CanSetGuideRates is False and a PropertyNotImplementedException exception was generated as expected
|
||||
18:07:54.347 IsPulseGuiding OK False
|
||||
18:07:54.541 RightAscension OK 03:59:09.00
|
||||
18:07:54.575 RightAscensionRate Read OK 0.00
|
||||
18:07:54.609 RightAscensionRate Write OK CanSetRightAscensionRate is False and a PropertyNotImplementedException exception was generated as expected
|
||||
18:07:54.644 SiteElevation Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.678 SiteElevation Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.691 SiteElevation Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.703 SiteElevation Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:54.861 SiteLatitude Read OK 00:00:00.00
|
||||
18:07:54.900 SiteLatitude Write OK Invalid Value exception generated as expected on set site latitude < -90 degrees
|
||||
18:07:54.912 SiteLatitude Write OK Invalid Value exception generated as expected on set site latitude > 90 degrees
|
||||
18:07:55.315 SiteLatitude Write OK Legal value 00:00:00.00 degrees written successfully
|
||||
18:07:55.455 SiteLongitude Read OK -42:12:00.00
|
||||
18:07:55.490 SiteLongitude Write OK Invalid Value exception generated as expected on set site longitude < -180 degrees
|
||||
18:07:55.502 SiteLongitude Write OK Invalid Value exception generated as expected on set site longitude > 180 degrees
|
||||
18:07:56.090 SiteLongitude Write OK Legal value -42:12:00.00 degrees written successfully
|
||||
18:07:56.246 Slewing OK False
|
||||
18:07:56.280 SlewSettleTime Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:56.315 SlewSettleTime Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:56.328 SlewSettleTime Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:56.363 SideOfPier Read OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:56.578 SiderealTime OK 05:17:41.24
|
||||
18:07:56.590 SiderealTime INFO Scope and ASCOM sidereal times are up to 0.5 hour different, Scope: 05:17:41.24, ASCOM: 05:24:06.50
|
||||
18:07:56.626 TargetDeclination Read OK .NET Not InvalidOperationException generated on read before write
|
||||
18:07:56.661 TargetDeclination Write INFO Tests moved after the SlewToCoordinates tests so that Conform can check they properly set target coordinates.
|
||||
18:07:56.673 TargetRightAscension Read OK .NET Not InvalidOperationException generated on read before write
|
||||
18:07:56.708 TargetRightAscension Write INFO Tests moved after the SlewToCoordinates tests so that Conform can check they properly set target coordinates.
|
||||
18:07:56.720 Tracking Read OK True
|
||||
18:07:56.756 Tracking Write OK CanSetTracking is False and a PropertyNotImplementedException exception was generated as expected
|
||||
18:07:56.797 TrackingRates Found drive rate: driveSidereal
|
||||
18:07:56.809 TrackingRates OK Drive rates read OK
|
||||
18:07:56.822 TrackingRates OK Disposed tracking rates OK
|
||||
18:07:56.858 TrackingRates OK Successfully obtained a TrackingRates object after the previous TrackingRates object was disposed
|
||||
18:07:57.039 TrackingRate Read OK driveLunar
|
||||
18:07:57.075 TrackingRate Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:57.088 TrackingRate Write OK Optional member threw a PropertyNotImplementedException exception.
|
||||
18:07:57.624 UTCDate Read OK 02-May-2019 19:33:59.000
|
||||
18:07:58.626 UTCDate Write OK New UTCDate written successfully: 02/05/2019 20:33:59
|
||||
|
||||
Methods
|
||||
18:07:59.997 CanMoveAxis:Primary OK CanMoveAxis:Primary True
|
||||
18:08:00.035 CanMoveAxis:Secondary OK CanMoveAxis:Secondary True
|
||||
18:08:00.072 CanMoveAxis:Tertiary OK CanMoveAxis:Tertiary False
|
||||
18:08:00.108 Park/Unpark INFO Tests skipped
|
||||
18:08:00.131 AbortSlew OK AbortSlew OK when not slewing
|
||||
18:08:00.199 AxisRate:Primary OK Axis rate minimum: 1 Axis rate maximum: 1
|
||||
18:08:00.211 AxisRate:Primary OK Axis rate minimum: 2 Axis rate maximum: 2
|
||||
18:08:00.225 AxisRate:Primary OK Axis rate minimum: 3 Axis rate maximum: 3
|
||||
18:08:00.239 AxisRate:Primary OK Axis rate minimum: 4 Axis rate maximum: 4
|
||||
18:08:00.253 AxisRate:Primary OK No overlapping axis rates found
|
||||
18:08:00.266 AxisRate:Primary OK No duplicate axis rates found
|
||||
18:08:00.279 AxisRate:Primary OK Successfully disposed of rate 1 - 1
|
||||
18:08:00.295 AxisRate:Primary OK Successfully disposed of rate 2 - 2
|
||||
18:08:00.310 AxisRate:Primary OK Successfully disposed of rate 3 - 3
|
||||
18:08:00.322 AxisRate:Primary OK Successfully disposed of rate 4 - 4
|
||||
18:08:00.336 AxisRate:Primary OK Disposed axis rates OK
|
||||
18:08:00.350 AxisRate:Secondary OK Axis rate minimum: 1 Axis rate maximum: 1
|
||||
18:08:00.362 AxisRate:Secondary OK Axis rate minimum: 2 Axis rate maximum: 2
|
||||
18:08:00.375 AxisRate:Secondary OK Axis rate minimum: 3 Axis rate maximum: 3
|
||||
18:08:00.387 AxisRate:Secondary OK Axis rate minimum: 4 Axis rate maximum: 4
|
||||
18:08:00.400 AxisRate:Secondary OK No overlapping axis rates found
|
||||
18:08:00.414 AxisRate:Secondary OK No duplicate axis rates found
|
||||
18:08:00.445 AxisRate:Secondary OK Successfully disposed of rate 1 - 1
|
||||
18:08:00.458 AxisRate:Secondary OK Successfully disposed of rate 2 - 2
|
||||
18:08:00.472 AxisRate:Secondary OK Successfully disposed of rate 3 - 3
|
||||
18:08:00.487 AxisRate:Secondary OK Successfully disposed of rate 4 - 4
|
||||
18:08:00.501 AxisRate:Secondary OK Disposed axis rates OK
|
||||
18:08:00.517 AxisRate:Tertiary OK Empty axis rate returned
|
||||
18:08:00.531 AxisRate:Tertiary OK Disposed axis rates OK
|
||||
18:08:00.550 FindHome OK CanFindHome is False and a MethodNotImplementedException exception was generated as expected
|
||||
18:08:00.606 MoveAxis Primary OK Can successfully set a movement rate of zero
|
||||
18:08:00.622 MoveAxis Primary OK Exception correctly generated when move axis is set below lowest rate (0.5)
|
||||
18:08:00.659 MoveAxis Primary OK Exception correctly generated when move axis is set above highest rate (5)
|
||||
18:08:04.867 MoveAxis Primary OK Successfully moved axis at minimum rate: 1
|
||||
18:08:09.770 MoveAxis Primary OK Successfully moved axis at maximum rate: 4
|
||||
18:08:13.981 MoveAxis Primary OK Tracking state correctly restored after MoveAxis when CanSetTracking is false
|
||||
18:08:13.998 MoveAxis Primary OK AxisRates object successfully disposed
|
||||
18:08:14.057 MoveAxis Secondary OK Can successfully set a movement rate of zero
|
||||
18:08:14.072 MoveAxis Secondary OK Exception correctly generated when move axis is set below lowest rate (0.5)
|
||||
18:08:14.107 MoveAxis Secondary OK Exception correctly generated when move axis is set above highest rate (5)
|
||||
18:08:18.317 MoveAxis Secondary OK Successfully moved axis at minimum rate: 1
|
||||
18:08:23.262 MoveAxis Secondary OK Successfully moved axis at maximum rate: 4
|
||||
18:08:27.473 MoveAxis Secondary OK Tracking state correctly restored after MoveAxis when CanSetTracking is false
|
||||
18:08:27.492 MoveAxis Secondary OK AxisRates object successfully disposed
|
||||
18:08:27.551 MoveAxis Tertiary OK CanMoveAxis Tertiary is False and a MethodNotImplementedException exception was generated as expected
|
||||
18:08:29.592 PulseGuide OK Synchronous pulse guide found OK
|
||||
18:08:54.449 SlewToCoordinates INFO Slewed within 39.2 arc seconds of expected RA: 04:18:14.61, actual RA: 04:18:12.00
|
||||
18:08:54.463 SlewToCoordinates INFO Slewed within 7199.0 arc seconds of expected DEC: 01:00:00.00, actual DEC: -00:59:59.00
|
||||
18:08:54.478 SlewToCoordinates OK The TargetRightAscension property 04:18:14.61 matches the expected RA OK.
|
||||
18:08:54.492 SlewToCoordinates OK The TargetDeclination property 01:00:00.00 matches the expected Declination OK.
|
||||
18:08:54.548 SlewToCoordinates (Bad L) OK Correctly rejected bad RA coordinate: -01:00:00.00
|
||||
18:08:55.301 SlewToCoordinates (Bad L) OK Correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
18:08:55.360 SlewToCoordinates (Bad H) OK Correctly rejected bad RA coordinate: 25:00:00.00
|
||||
18:08:56.199 SlewToCoordinates (Bad H) OK Correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
18:09:20.477 SlewToCoordinatesAsync INFO Slewed within 19.3 arc seconds of expected RA: 03:18:41.28, actual RA: 03:18:40.00
|
||||
18:09:20.490 SlewToCoordinatesAsync INFO Slewed within 14398.0 arc seconds of expected DEC: 02:00:00.00, actual DEC: -01:59:58.00
|
||||
18:09:20.503 SlewToCoordinatesAsync OK The TargetRightAscension property 03:18:41.28 matches the expected RA OK.
|
||||
18:09:20.516 SlewToCoordinatesAsync OK The TargetDeclination property 02:00:00.00 matches the expected Declination OK.
|
||||
18:09:20.558 SlewToCoordinatesAsync (Bad L) OK Correctly rejected bad RA coordinate: -01:00:00.00
|
||||
18:09:21.381 SlewToCoordinatesAsync (Bad L) OK Correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
18:09:21.442 SlewToCoordinatesAsync (Bad H) OK Correctly rejected bad RA coordinate: 25:00:00.00
|
||||
18:09:22.292 SlewToCoordinatesAsync (Bad H) OK Correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
18:09:44.520 SyncToCoordinates INFO Slewed to start position within 56.8 arc seconds of expected RA: 02:19:07.79, actual RA: 02:19:04.00
|
||||
18:09:44.534 SyncToCoordinates OK Slewed to start position OK. DEC: 00:00:00.00
|
||||
18:09:47.045 SyncToCoordinates INFO Synced to sync position within 71.8 arc seconds of expected RA: 02:15:07.79, actual RA: 02:15:03.00
|
||||
18:09:47.058 SyncToCoordinates INFO Synced to sync position within 3660.0 arc seconds of expected DEC: -01:00:00.00, actual DEC: 00:01:00.00
|
||||
18:09:47.071 SyncToCoordinates OK The TargetRightAscension property 02:15:07.79 matches the expected RA OK.
|
||||
18:09:47.085 SyncToCoordinates OK The TargetDeclination property -01:00:00.00 matches the expected Declination OK.
|
||||
18:10:08.444 SyncToCoordinates INFO Slewed back to start position within 56.8 arc seconds of expected RA: 02:19:07.79, actual RA: 02:19:04.00
|
||||
18:10:08.458 SyncToCoordinates OK Slewed back to start position OK. DEC: 00:00:00.00
|
||||
18:10:10.791 SyncToCoordinates INFO Synced to reversed sync position within 71.8 arc seconds of expected RA: 02:23:07.79, actual RA: 02:23:03.00
|
||||
18:10:10.806 SyncToCoordinates INFO Synced to reversed sync position within 7200.0 arc seconds of expected DEC: 01:00:00.00, actual DEC: -01:00:00.00
|
||||
18:10:32.484 SyncToCoordinates INFO Slewed back to start position within 56.8 arc seconds of expected RA: 02:19:07.79, actual RA: 02:19:04.00
|
||||
18:10:32.498 SyncToCoordinates OK Slewed back to start position OK. DEC: 00:00:00.00
|
||||
18:10:32.537 SyncToCoordinates (Bad L) OK Correctly rejected bad RA coordinate: -01:00:00.00
|
||||
18:10:33.329 SyncToCoordinates (Bad L) OK Correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
18:10:33.389 SyncToCoordinates (Bad H) OK Correctly rejected bad RA coordinate: 25:00:00.00
|
||||
18:10:34.242 SyncToCoordinates (Bad H) OK Correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
18:10:34.301 TargetRightAscension Write OK Invalid Value exception generated as expected on set TargetRightAscension < 0 hours
|
||||
18:10:34.315 TargetRightAscension Write OK Invalid Value exception generated as expected on set TargetRightAscension > 24 hours
|
||||
18:10:34.979 TargetRightAscension Write OK Legal value 01:20:19.62 HH:MM:SS written successfully
|
||||
18:10:35.016 TargetDeclination Write OK Invalid Value exception generated as expected on set TargetDeclination < -90 degrees
|
||||
18:10:35.032 TargetDeclination Write OK Invalid Value exception generated as expected on set TargetDeclination < -90 degrees
|
||||
18:10:35.652 TargetDeclination Write OK Legal value 01:00:00.00 DD:MM:SS written successfully
|
||||
18:10:56.417 SlewToTarget INFO Slewed within 14.8 arc seconds of expected RA: 02:20:20.99, actual RA: 02:20:20.00
|
||||
18:10:56.434 SlewToTarget INFO Slewed within 21596.0 arc seconds of expected DEC: 03:00:00.00, actual DEC: -02:59:56.00
|
||||
18:10:56.449 SlewToTarget OK The TargetRightAscension property 02:20:20.99 matches the expected RA OK.
|
||||
18:10:56.463 SlewToTarget OK The TargetDeclination property 03:00:00.00 matches the expected Declination OK.
|
||||
18:10:56.504 SlewToTarget (Bad L) OK Telescope.TargetRA correctly rejected bad RA coordinate: -01:00:00.00
|
||||
18:10:56.676 SlewToTarget (Bad L) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
18:10:56.736 SlewToTarget (Bad H) OK Telescope.TargetRA correctly rejected bad RA coordinate: 25:00:00.00
|
||||
18:10:56.915 SlewToTarget (Bad H) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
18:11:20.512 SlewToTargetAsync INFO Slewed within 35.1 arc seconds of expected RA: 01:20:42.34, actual RA: 01:20:40.00
|
||||
18:11:20.526 SlewToTargetAsync INFO Slewed within 28797.0 arc seconds of expected DEC: 04:00:00.00, actual DEC: -03:59:57.00
|
||||
18:11:20.539 SlewToTargetAsync OK The TargetRightAscension property 01:20:42.34 matches the expected RA OK.
|
||||
18:11:20.553 SlewToTargetAsync OK The TargetDeclination property 04:00:00.00 matches the expected Declination OK.
|
||||
18:11:20.593 SlewToTargetAsync (Bad L) OK Telescope.TargetRA correctly rejected bad RA coordinate: -01:00:00.00
|
||||
18:11:20.774 SlewToTargetAsync (Bad L) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
18:11:20.833 SlewToTargetAsync (Bad H) OK Telescope.TargetRA correctly rejected bad RA coordinate: 25:00:00.00
|
||||
18:11:21.032 SlewToTargetAsync (Bad H) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
18:11:21.091 DestinationSideOfPier Test skipped as AligmentMode is not German Polar
|
||||
18:11:22.864 SlewToAltAz INFO Slewed to within 144:49:47.00 DD:MM:SS of expected Azimuth: 150:00:00.00
|
||||
18:11:22.880 SlewToAltAz INFO Slewed to within 46:00:01.00 DD:MM:SS of expected Altitude: 50:00:00.00
|
||||
18:11:22.920 SlewToAltAz (Bad L) OK Correctly rejected bad Altitude coordinate: -100:00:00.00
|
||||
18:11:23.710 SlewToAltAz (Bad L) OK Correctly rejected bad Azimuth coordinate: -10:00:00.00
|
||||
18:11:23.771 SlewToAltAz (Bad H) OK Correctly rejected bad Altitude coordinate: 100:00:00.00
|
||||
18:11:24.447 SlewToAltAz (Bad H) OK Correctly rejected bad Azimuth coordinate: 370:00:00.00
|
||||
18:11:31.196 SlewToAltAzAsync INFO Slewed to within 149:51:53.00 DD:MM:SS of expected Azimuth: 155:00:00.00
|
||||
18:11:31.210 SlewToAltAzAsync INFO Slewed to within 51:00:01.00 DD:MM:SS of expected Altitude: 55:00:00.00
|
||||
18:11:31.251 SlewToAltAzAsync (Bad L) OK Correctly rejected bad Altitude coordinate: -100:00:00.00
|
||||
18:11:32.060 SlewToAltAzAsync (Bad L) OK Correctly rejected bad Azimuth coordinate: -10:00:00.00
|
||||
18:11:32.121 SlewToAltAzAsync (Bad H) OK Correctly rejected bad Altitude coordinate: 100:00:00.00
|
||||
18:11:32.814 SlewToAltAzAsync (Bad H) OK Correctly rejected bad Azimuth coordinate: 370:00:00.00
|
||||
18:11:56.494 SyncToTarget INFO Slewed to start position within 40.1 arc seconds of expected RA: 02:21:18.67, actual RA: 02:21:16.00
|
||||
18:11:56.509 SyncToTarget OK Slewed to start position OK. DEC: 00:00:00.00
|
||||
18:11:59.005 SyncToTarget INFO Synced to sync position within 55.1 arc seconds of expected RA: 02:17:18.67, actual RA: 02:17:15.00
|
||||
18:11:59.019 SyncToTarget INFO Synced to sync position within 3660.0 arc seconds of expected DEC: -01:00:00.00, actual DEC: 00:01:00.00
|
||||
18:12:22.398 SyncToTarget INFO Slewed back to start position within 40.1 arc seconds of expected RA: 02:21:18.67, actual RA: 02:21:16.00
|
||||
18:12:22.416 SyncToTarget OK Slewed back to start position OK. DEC: 00:00:00.00
|
||||
18:12:24.739 SyncToTarget INFO Synced to reversed sync position within 55.1 arc seconds of expected RA: 02:25:18.67, actual RA: 02:25:15.00
|
||||
18:12:24.754 SyncToTarget INFO Synced to reversed sync position within 7200.0 arc seconds of expected DEC: 01:00:00.00, actual DEC: -01:00:00.00
|
||||
18:12:46.438 SyncToTarget INFO Slewed back to start position within 40.1 arc seconds of expected RA: 02:21:18.67, actual RA: 02:21:16.00
|
||||
18:12:46.452 SyncToTarget OK Slewed back to start position OK. DEC: 00:00:00.00
|
||||
18:12:46.491 SyncToTarget (Bad L) OK Telescope.TargetRA correctly rejected bad RA coordinate: -01:00:00.00
|
||||
18:12:46.643 SyncToTarget (Bad L) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: -100:00:00.00
|
||||
18:12:46.702 SyncToTarget (Bad H) OK Telescope.TargetRA correctly rejected bad RA coordinate: 25:00:00.00
|
||||
18:12:46.884 SyncToTarget (Bad H) OK Telescope.TargetDeclination correctly rejected bad Dec coordinate: 100:00:00.00
|
||||
18:12:47.702 SyncToAltAz OK CanSyncAltAz is False and a MethodNotImplementedException exception was generated as expected
|
||||
|
||||
SideOfPier Model Tests
|
||||
18:12:47.769 SideOfPier Model Tests INFO Tests skipped because this driver does Not support SideOfPier Read
|
||||
|
||||
Post-run Checks
|
||||
18:12:47.862 Mount Safety INFO Tracking can't be turned off for this mount, please switch off manually.
|
||||
|
||||
Conformance test complete
|
||||
|
||||
No errors, warnings or issues found: your driver passes ASCOM validation!!
|
||||
|
||||
Driver Hash Value: 0C55C8535B9B3A4048581454F9D6A263EFD16E20AEC783762006739F671F586B64F1D8DD3E1E613C27A5B24838AEB8656C2A19BD1EE69177ECF2619599C0DA3C
|
||||
Report Hash Value: 671D83C15427DD14D9FA7F5A6C62D6B21372362C5173A2B95171D14D7442358DCF3950481797D63EB94E642D2563C3094C387C23D65466833FEA5E64CD045B46
|
||||
|
||||
The validation file is: C:\Users\colin\Documents\ASCOM\Logs 2019-05-08\ASCOM.MeadeAutostar497.Telescope.Validation.txt
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ASCOM.MeadeGeneric</RootNamespace>
|
||||
<AssemblyName>ASCOM.MeadeGeneric.Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,52 @@
|
||||
// This implements a console application that can be used to test an ASCOM driver
|
||||
//
|
||||
|
||||
// This is used to define code in the template that is specific to one class implementation
|
||||
// unused code can be deleted and this definition removed.
|
||||
|
||||
#define Telescope
|
||||
// remove this to bypass the code that uses the chooser to select the driver
|
||||
#define UseChooser
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using ASCOM.DriverAccess;
|
||||
|
||||
namespace ASCOM.MeadeGeneric
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// Uncomment the code that's required
|
||||
#if UseChooser
|
||||
// choose the device
|
||||
string id = Focuser.Choose("ASCOM.MeadeGeneric.Focuser");
|
||||
if (string.IsNullOrEmpty(id))
|
||||
return;
|
||||
// create this device
|
||||
Focuser device = new Focuser(id);
|
||||
#else
|
||||
// this can be replaced by this code, it avoids the chooser and creates the driver class directly.
|
||||
ASCOM.DriverAccess.Telescope device = new ASCOM.DriverAccess.Telescope("ASCOM.MeadeGeneric.Telescope");
|
||||
#endif
|
||||
// now run some tests, adding code to your driver so that the tests will pass.
|
||||
// these first tests are common to all drivers.
|
||||
Console.WriteLine("name " + device.Name);
|
||||
Console.WriteLine("description " + device.Description);
|
||||
Console.WriteLine("DriverInfo " + device.DriverInfo);
|
||||
Console.WriteLine("driverVersion " + device.DriverVersion);
|
||||
|
||||
// TODO add more code to test the driver.
|
||||
device.Connected = true;
|
||||
|
||||
device.Move(2000);
|
||||
Thread.Sleep(2000);
|
||||
device.Move(-2000);
|
||||
|
||||
device.Connected = false;
|
||||
Console.WriteLine("Press Enter to finish");
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,14 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("q Test Application")]
|
||||
[assembly: AssemblyTitle("MeadeGeneric Test Application")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("ASCOM Initiative")]
|
||||
[assembly: AssemblyProduct("q")]
|
||||
[assembly: AssemblyProduct("MeadeGeneric")]
|
||||
[assembly: AssemblyCopyright("Copyright © ASCOM Initiative 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
@@ -32,5 +31,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("6.4.0.0")]
|
||||
[assembly: AssemblyFileVersion("6.4.0.0")]
|
||||
[assembly: AssemblyVersion("0.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.0.0.0")]
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{7A63F045-FC76-47B9-9DC6-59FA4B758FBB}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Meade.net.Common</RootNamespace>
|
||||
<AssemblyName>Meade.net.Common</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("MeadeAutostar497.UnitTests")]
|
||||
[assembly: AssemblyTitle("Meade.net.Common")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("MeadeAutostar497.UnitTests")]
|
||||
[assembly: AssemblyProduct("Meade.net.Common")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
@@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("9638da27-77c7-4b30-a730-6e7159a4a09f")]
|
||||
[assembly: Guid("7a63f045-fc76-47b9-9dc6-59fa4b758fbb")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<?include $(sys.CURRENTDIR)\Config.wxi?>
|
||||
<!--
|
||||
ASCOM Focuser Driver with COM registry entries suitable for a LocalServer Served Class
|
||||
-->
|
||||
<Fragment>
|
||||
<DirectoryRef Id="INSTALLFOLDER" />
|
||||
<ComponentGroup Id="cgAscomFocuserDriver">
|
||||
<Component Id="cmpAscomFocuserDriver"
|
||||
Directory="INSTALLFOLDER"
|
||||
Guid="*"
|
||||
Win64="no">
|
||||
<File Id="filFocuserDriverAssembly"
|
||||
Source="$(var.Meade.net.focuser.TargetPath)"
|
||||
KeyPath="yes"
|
||||
Vital="yes"
|
||||
Assembly=".net"
|
||||
AssemblyApplication="filFocuserDriverAssembly" />
|
||||
<!-- Registry entries suitable for a LocalServer served class -->
|
||||
<!-- HKCR\CLSID\{driver-guid} -->
|
||||
<RegistryKey Root="HKCR" Key="CLSID">
|
||||
<RegistryKey Key="$(var.FocuserDriverClassId)">
|
||||
<RegistryValue Value="$(var.FocuserDriverProgId)" Type="string"/>
|
||||
<RegistryValue Name="AppId" Value="$(var.LocalServerAppId)" Type="string"/>
|
||||
<RegistryKey Key="Implemented Categories">
|
||||
<RegistryKey Key="{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}"
|
||||
ForceCreateOnInstall="yes"
|
||||
ForceDeleteOnUninstall="yes"/>
|
||||
</RegistryKey>
|
||||
<RegistryKey Key="ProgId">
|
||||
<RegistryValue Value="$(var.FocuserDriverProgId)" Type="string"/>
|
||||
</RegistryKey>
|
||||
<RegistryKey Key="Programmable"
|
||||
ForceCreateOnInstall="yes"
|
||||
ForceDeleteOnUninstall="yes" />
|
||||
<RegistryKey Key="LocalServer32">
|
||||
<RegistryValue Value="[#filLocalServerAssembly]" Type="string"/>
|
||||
</RegistryKey>
|
||||
</RegistryKey>
|
||||
</RegistryKey>
|
||||
|
||||
<!-- HKCR\{driver-prog-id} -->
|
||||
<RegistryKey Root="HKCR" Key="$(var.FocuserDriverProgId)">
|
||||
<RegistryValue Value="$(var.FocuserDriverDescription)" Type="string"/>
|
||||
<RegistryKey Key="CLSID">
|
||||
<RegistryValue Value="$(var.FocuserDriverClassId)" Type="string" />
|
||||
</RegistryKey>
|
||||
</RegistryKey>
|
||||
|
||||
<!--Register the driver with the ASCOM Profile-->
|
||||
<RegistryKey Root="HKLM" Key="SOFTWARE\ASCOM\Focuser Drivers\$(var.FocuserDriverProgId)">
|
||||
<RegistryValue Value="$(var.FocuserDriverDescription)" Type="string"/>
|
||||
</RegistryKey>
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<?include $(sys.CURRENTDIR)\Config.wxi?>
|
||||
<Fragment>
|
||||
<DirectoryRef Id="INSTALLFOLDER"/>
|
||||
<ComponentGroup Id="cgAscomLocalServer" Directory="INSTALLFOLDER">
|
||||
<Component Id="cmpAscomLocalServer" Guid="*" Win64="no">
|
||||
<File Id="filLocalServerAssembly"
|
||||
Source="$(var.Meade.net.TargetPath)"
|
||||
KeyPath="yes"
|
||||
Vital="yes"
|
||||
Assembly=".net"
|
||||
AssemblyApplication="filLocalServerAssembly" />
|
||||
</Component>
|
||||
<Component Id="cmpLocalServerRegistry" Win64="no">
|
||||
<!-- LocalServer32 COM Registration -->
|
||||
<RegistryKey Root="HKCR" Key="AppID" >
|
||||
<!-- HKCR\AppID\{my-app-id} -->
|
||||
<RegistryKey Key="$(var.LocalServerAppId)">
|
||||
<RegistryValue Value="$(var.InstallName)" Type="string"/>
|
||||
<RegistryValue Name="AppID" Value="$(var.LocalServerAppId)" Type="string"/>
|
||||
<RegistryValue Name="AuthenticationLevel" Value="1" Type="integer"/>
|
||||
</RegistryKey>
|
||||
<!-- HKCR\AppID\{exe-name} -->
|
||||
<RegistryKey Key="$(var.Meade.net.TargetFileName)">
|
||||
<RegistryValue Name="AppID" Value="$(var.LocalServerAppId)" Type="string"/>
|
||||
</RegistryKey>
|
||||
</RegistryKey>
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<?include $(sys.CURRENTDIR)\Config.wxi?>
|
||||
<!--
|
||||
ASCOM Telescope Driver with COM registry entries suitable for a LocalServer Served Class
|
||||
-->
|
||||
<Fragment>
|
||||
<DirectoryRef Id="INSTALLFOLDER" />
|
||||
<ComponentGroup Id="cgAscomTelescopeDriver">
|
||||
<Component Id="cmpAscomTelescopeDriver"
|
||||
Directory="INSTALLFOLDER"
|
||||
Guid="*"
|
||||
Win64="no">
|
||||
<File Id="filTelescopeDriverAssembly"
|
||||
Source="$(var.Meade.net.Telescope.TargetPath)"
|
||||
KeyPath="yes"
|
||||
Vital="yes"
|
||||
Assembly=".net"
|
||||
AssemblyApplication="filTelescopeDriverAssembly" />
|
||||
<!-- Registry entries suitable for a LocalServer served class -->
|
||||
<!-- HKCR\CLSID\{driver-guid} -->
|
||||
<RegistryKey Root="HKCR" Key="CLSID">
|
||||
<RegistryKey Key="$(var.TelescopeDriverClassId)">
|
||||
<RegistryValue Value="$(var.TelescopeDriverProgId)" Type="string"/>
|
||||
<RegistryValue Name="AppId" Value="$(var.LocalServerAppId)" Type="string"/>
|
||||
<RegistryKey Key="Implemented Categories">
|
||||
<RegistryKey Key="{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}"
|
||||
ForceCreateOnInstall="yes"
|
||||
ForceDeleteOnUninstall="yes"/>
|
||||
</RegistryKey>
|
||||
<RegistryKey Key="ProgId">
|
||||
<RegistryValue Value="$(var.TelescopeDriverProgId)" Type="string"/>
|
||||
</RegistryKey>
|
||||
<RegistryKey Key="Programmable"
|
||||
ForceCreateOnInstall="yes"
|
||||
ForceDeleteOnUninstall="yes" />
|
||||
<RegistryKey Key="LocalServer32">
|
||||
<RegistryValue Value="[#filLocalServerAssembly]" Type="string"/>
|
||||
</RegistryKey>
|
||||
</RegistryKey>
|
||||
</RegistryKey>
|
||||
|
||||
<!-- HKCR\{driver-prog-id} -->
|
||||
<RegistryKey Root="HKCR" Key="$(var.TelescopeDriverProgId)">
|
||||
<RegistryValue Value="$(var.TelescopeDriverDescription)" Type="string"/>
|
||||
<RegistryKey Key="CLSID">
|
||||
<RegistryValue Value="$(var.TelescopeDriverClassId)" Type="string" />
|
||||
</RegistryKey>
|
||||
</RegistryKey>
|
||||
|
||||
<!--Register the driver with the ASCOM Profile-->
|
||||
<RegistryKey Root="HKLM" Key="SOFTWARE\ASCOM\Telescope Drivers\$(var.TelescopeDriverProgId)">
|
||||
<RegistryValue Value="$(var.TelescopeDriverDescription)" Type="string"/>
|
||||
</RegistryKey>
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<Include>
|
||||
<!--
|
||||
User Configuration - you must ensure all these variables have correct values for your project.
|
||||
GUIDs specified here must match those used in the project files, and must be unique to this product.
|
||||
The LocalServerAppId is defined in the Server project, in LocalServer.cs
|
||||
Driver Class IDs are defined in each driver class, in the [Guid()] attribute.
|
||||
Driver ProgIDs must match those used in the source code, typically this will be defined in the LocalServer
|
||||
project as a constant in the SharedResources static class.
|
||||
UpgradeCode must be unique to this product and should not be changed for the product lifetime.
|
||||
-->
|
||||
|
||||
<?define InstallName = "ASCOM Meade Generic" ?>
|
||||
<?define Manufacturer = "cjdawson.com" ?>
|
||||
<?define UpgradeCode = "{57597bb6-f207-4998-97f4-8a041950d062}" ?>
|
||||
<?define INSTALLFOLDER = "$(var.InstallName)" ?>
|
||||
|
||||
<?define LocalServerAppId = "{4e68ec46-5ffc-49e7-b298-38a548df0bfd}" ?>
|
||||
<?define CopyrightNotice="Copyright © 2019 cjdawson.com, all rights reserved" ?>
|
||||
|
||||
<?define TelescopeDriverClassId="{d9fd4b3e-c4f1-48ac-a16f-d02eef30d86f}" ?>
|
||||
<?define TelescopeDriverProgId="ASCOM.MeadeGeneric.Telescope" ?>
|
||||
<?define TelescopeDriverDescription="Meade Generic"?>
|
||||
|
||||
<?define FocuserDriverClassId="{a32ac647-bf0f-42f9-8ab0-d166fa5884ad}" ?>
|
||||
<?define FocuserDriverProgId="ASCOM.MeadeGeneric.focuser" ?>
|
||||
<?define FocuserDriverDescription="Meade Generic" ?>
|
||||
|
||||
<!-- End of User Configuration - do not edit anything beyond this point -->
|
||||
|
||||
<!-- Define platform-specific names and locations -->
|
||||
<!-- <?if $(var.Platform) = x64 ?>
|
||||
<?define ProductName = "$(var.InstallName) (x64)" ?>
|
||||
<?define Win64 = "yes" ?>
|
||||
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
|
||||
<?define PlatformCommonFilesFolder = "CommonFiles64Folder" ?>
|
||||
<?else ?>-->
|
||||
<?define ProductName = "$(var.InstallName) (x86)" ?>
|
||||
<?define Win64 = "no" ?>
|
||||
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
|
||||
<?define PlatformCommonFilesFolder = "CommonFilesFolder" ?>
|
||||
<!-- <?endif ?> -->
|
||||
|
||||
<!-- Set installer version based on the file version of the main assembly. -->
|
||||
<?define ProductVersion="!(bind.FileVersion.filLocalServerAssembly)"?>
|
||||
<!--<?define ProductVersion="0.7.0.0"?>-->
|
||||
</Include>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<?include $(sys.CURRENTDIR)\Config.wxi?>
|
||||
<Fragment>
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="ProgramFilesFolder">
|
||||
<Directory Id="dirManufacturer" Name="$(var.Manufacturer)">
|
||||
<Directory Id="INSTALLFOLDER" Name="$(var.InstallName)"/>
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" >
|
||||
<?include $(sys.CURRENTDIR)\Config.wxi?>
|
||||
<Fragment>
|
||||
<FeatureGroup Id="fgRoot" >
|
||||
<Feature Id="featAscomDrivers" Title="ASCOM drivers" Level="1" Absent="disallow"
|
||||
Display="expand" >
|
||||
<ComponentGroupRef Id="cgAscomLocalServer" />
|
||||
<ComponentGroupRef Id="cgAscomTelescopeDriver"/>
|
||||
<ComponentGroupRef Id="cgAscomFocuserDriver"/>
|
||||
</Feature>
|
||||
</FeatureGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
First-time install dialog sequence:
|
||||
- WixUI_WelcomeDlg
|
||||
- WixUI_LicenseAgreementDlg
|
||||
- WixUI_InstallDirDlg
|
||||
- WixUI_VerifyReadyDlg
|
||||
- WixUI_DiskCostDlg
|
||||
|
||||
Maintenance dialog sequence:
|
||||
- WixUI_MaintenanceWelcomeDlg
|
||||
- WixUI_MaintenanceTypeDlg
|
||||
- WixUI_InstallDirDlg
|
||||
- WixUI_VerifyReadyDlg
|
||||
|
||||
Patch dialog sequence:
|
||||
- WixUI_WelcomeDlg
|
||||
- WixUI_VerifyReadyDlg
|
||||
|
||||
-->
|
||||
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
<UI Id="InstallationUI">
|
||||
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
|
||||
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
|
||||
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
|
||||
|
||||
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
|
||||
<Property Id="WixUI_Mode" Value="InstallDir" />
|
||||
|
||||
<DialogRef Id="BrowseDlg" />
|
||||
<DialogRef Id="DiskCostDlg" />
|
||||
<DialogRef Id="ErrorDlg" />
|
||||
<DialogRef Id="FatalError" />
|
||||
<DialogRef Id="FilesInUse" />
|
||||
<DialogRef Id="MsiRMFilesInUse" />
|
||||
<DialogRef Id="PrepareDlg" />
|
||||
<DialogRef Id="ProgressDlg" />
|
||||
<DialogRef Id="ResumeDlg" />
|
||||
<DialogRef Id="UserExit" />
|
||||
|
||||
<Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish>
|
||||
<Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
|
||||
|
||||
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
|
||||
|
||||
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">NOT Installed</Publish>
|
||||
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
|
||||
|
||||
<Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
|
||||
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAccepted = "1"</Publish>
|
||||
|
||||
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
|
||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
|
||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
|
||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
|
||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
|
||||
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
|
||||
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
|
||||
|
||||
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1">NOT Installed</Publish>
|
||||
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
|
||||
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">Installed AND PATCH</Publish>
|
||||
|
||||
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
|
||||
|
||||
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
|
||||
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
|
||||
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
|
||||
|
||||
<Property Id="ARPNOMODIFY" Value="1" />
|
||||
</UI>
|
||||
|
||||
<UIRef Id="WixUI_Common" />
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>3.10</ProductVersion>
|
||||
<ProjectGuid>8eeb5c25-8394-4257-8e57-cded47cb6f1b</ProjectGuid>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<OutputName>Meade.net.Setup</OutputName>
|
||||
<OutputType>Package</OutputType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
|
||||
<DefineConstants>Debug</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\$(Configuration)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
||||
<DefineConstants>Debug</DefineConstants>
|
||||
<OutputPath>bin\$(Configuration)\$(Platform)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
||||
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AscomLocalServer.wxs" />
|
||||
<Compile Include="AscomTelescopeDriver.wxs" />
|
||||
<Compile Include="AscomFocuserDriver.wxs" />
|
||||
<Compile Include="Directories.wxs" />
|
||||
<Compile Include="FeatureTree.wxs" />
|
||||
<Compile Include="InstallationUI.wxs" />
|
||||
<Compile Include="Product.wxs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WixExtension Include="WixUIExtension">
|
||||
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
|
||||
<Name>WixUIExtension</Name>
|
||||
</WixExtension>
|
||||
<WixExtension Include="WixNetFxExtension">
|
||||
<HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
|
||||
<Name>WixNetFxExtension</Name>
|
||||
</WixExtension>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Config.wxi" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Meade.net.focuser\Meade.net.focuser.csproj">
|
||||
<Name>Meade.net.focuser</Name>
|
||||
<Project>{a97e3aec-f11d-49da-b259-de99da813a86}</Project>
|
||||
<Private>True</Private>
|
||||
<DoNotHarvest>True</DoNotHarvest>
|
||||
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
|
||||
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Meade.net.Telescope\Meade.net.Telescope.csproj">
|
||||
<Name>Meade.net.Telescope</Name>
|
||||
<Project>{64308775-bd4a-469c-bcab-3ed830b811af}</Project>
|
||||
<Private>True</Private>
|
||||
<DoNotHarvest>True</DoNotHarvest>
|
||||
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
|
||||
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Meade.net\Meade.net.csproj">
|
||||
<Name>Meade.net</Name>
|
||||
<Project>{3689a2cb-94c5-4012-a5cf-7e7d1dd27143}</Project>
|
||||
<Private>True</Private>
|
||||
<DoNotHarvest>True</DoNotHarvest>
|
||||
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
|
||||
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
|
||||
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
|
||||
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
|
||||
</Target>
|
||||
<!--
|
||||
To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Wix.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<?include $(sys.CURRENTDIR)\Config.wxi?>
|
||||
<Product Id="*"
|
||||
Name="$(var.InstallName)"
|
||||
Language="1033"
|
||||
Version="$(var.ProductVersion)"
|
||||
Manufacturer="$(var.Manufacturer)"
|
||||
UpgradeCode="$(var.UpgradeCode)">
|
||||
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
|
||||
|
||||
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
|
||||
|
||||
<MediaTemplate EmbedCab="yes" />
|
||||
|
||||
<Property Id="ASCOMPLATFORMVERSION">
|
||||
<RegistrySearch Id="AscomPlatformVersion"
|
||||
Root="HKLM"
|
||||
Key="SOFTWARE\ASCOM\Platform"
|
||||
Name="Platform Version"
|
||||
Type="raw" />
|
||||
</Property>
|
||||
|
||||
<Condition Message="This application requires Ascom Platform 6.4 SP1 or higher. Please install this before installing the driver.">
|
||||
<![CDATA[Installed OR ASCOMPLATFORMVERSION >= "6.4.1"]]>
|
||||
</Condition>
|
||||
|
||||
<PropertyRef Id="NETFRAMEWORK40FULL"/>
|
||||
<Condition Message="This application requires .NET Framework 4.0 or higher. Please install the .NET Framework then run this installer again.">
|
||||
<![CDATA[Installed OR NETFRAMEWORK40FULL]]>
|
||||
</Condition>
|
||||
|
||||
<!--todo create a method to check if ASCOM is installed.-->
|
||||
<!--<Condition Message="This application requires ASCOM Platform 6.4 or later. Please install this and try again.">
|
||||
<![CDATA[Installed or WIX_IS_NETFRAMEWORK_471_OR_LATER_INSTALLED]]>
|
||||
</Condition>-->
|
||||
|
||||
<!-- <Condition Message="Please use the correct installer for your operating system - x86 for 32-bit, x64 for 64-bit.">
|
||||
<?if $(var.Win64) = "yes" ?>
|
||||
VersionNT64
|
||||
<?else?>
|
||||
NOT VersionNT64
|
||||
<?endif?>
|
||||
</Condition> -->
|
||||
|
||||
|
||||
<UIRef Id="InstallationUI"/>
|
||||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
|
||||
|
||||
<FeatureGroupRef Id="fgRoot"/>
|
||||
</Product>
|
||||
</Wix>
|
||||
@@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
|
||||
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{9638DA27-77C7-4B30-A730-6E7159A4A09F}</ProjectGuid>
|
||||
<ProjectGuid>{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>MeadeAutostar497.UnitTests</RootNamespace>
|
||||
<AssemblyName>MeadeAutostar497.UnitTests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<RootNamespace>Meade.net.Telescope.UnitTests</RootNamespace>
|
||||
<AssemblyName>Meade.net.Telescope.UnitTests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
@@ -26,7 +26,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -37,6 +37,24 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ASCOM.Astrometry, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
@@ -72,47 +90,45 @@
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
<HintPath>..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Moq, Version=4.10.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.10.1\lib\net45\Moq.dll</HintPath>
|
||||
<Reference Include="Moq, Version=4.12.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.12.0\lib\net45\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.12.0\lib\net40\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.0\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Windows" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="TelescopeControllerUnitTests.cs" />
|
||||
<Compile Include="TelescopeUnitTests.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MeadeAutostar497\MeadeAutostar497.csproj">
|
||||
<ProjectReference Include="..\Meade.net.Telescope\Meade.net.Telescope.csproj">
|
||||
<Project>{64308775-bd4a-469c-bcab-3ed830b811af}</Project>
|
||||
<Name>MeadeAutostar497</Name>
|
||||
<Name>Meade.net.Telescope</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Meade.net\Meade.net.csproj">
|
||||
<Project>{3689a2cb-94c5-4012-a5cf-7e7d1dd27143}</Project>
|
||||
<Name>Meade.net</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="BootstrapAscomProfileStore.ps1" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
@@ -121,6 +137,6 @@
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Meade.net.Telescope.UnitTests")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Meade.net.Telescope.UnitTests")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("b7eeeefd-5bff-443d-981c-7b8ab5dfde33")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.0.0.0")]
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ASCOM.Platform" version="6.4.2" targetFramework="net472" />
|
||||
<package id="Castle.Core" version="4.4.0" targetFramework="net45" />
|
||||
<package id="Moq" version="4.12.0" targetFramework="net45" />
|
||||
<package id="NUnit" version="3.12.0" targetFramework="net40" requireReinstallation="true" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net45" requireReinstallation="true" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net45" requireReinstallation="true" />
|
||||
</packages>
|
||||
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace ASCOM.Meade.net.AstroMaths
|
||||
{
|
||||
public class AltitudeData
|
||||
{
|
||||
public DateTime UtcDateTime { get; set; }
|
||||
public double SiteLatitude { get; set; }
|
||||
public double SiteLongitude { get; set; }
|
||||
public EquatorialCoordinates EquatorialCoordinates { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
using System;
|
||||
using ASCOM.Utilities;
|
||||
|
||||
namespace ASCOM.Meade.net.AstroMaths
|
||||
{
|
||||
public class AstroMaths : IAstroMaths
|
||||
{
|
||||
|
||||
//returns the decimal hour angle for given right ascension on a given datetime for a given logitude.
|
||||
public double RightAscensionToHourAngle(DateTime utcDateTime, double longitude, double rightAscension)
|
||||
{
|
||||
var ut = DateTimeToDecimalHours( utcDateTime);
|
||||
var gst = UTtoGst( utcDateTime);
|
||||
var lst = GsTtoLst( gst, longitude);
|
||||
var raHours = rightAscension;
|
||||
var h1 = lst - raHours;
|
||||
var h = h1;
|
||||
|
||||
if (h < 0)
|
||||
h = h + 24;
|
||||
|
||||
return h;
|
||||
}
|
||||
|
||||
public double HourAngleToRightAscension(DateTime utcDateTime, double longitude, double hourAngle )
|
||||
{
|
||||
var gst = UTtoGst(utcDateTime);
|
||||
var lst = GsTtoLst( gst, longitude);
|
||||
var raHours = hourAngle;
|
||||
var h1 = lst - raHours;
|
||||
var h = h1;
|
||||
if (h1 < 0)
|
||||
{
|
||||
h += 24;
|
||||
}
|
||||
|
||||
return h;
|
||||
}
|
||||
|
||||
public EquatorialCoordinates ConvertHozToEq( DateTime utcDateTime, double latitude, double longitude, HorizonCoordinates altAz)
|
||||
{
|
||||
var az = DegreesToRadians(altAz.Azimuth);
|
||||
var alt = DegreesToRadians(altAz.Altitude);
|
||||
var lat = DegreesToRadians(latitude);
|
||||
|
||||
var sinDec = Math.Sin(alt) * Math.Sin(lat) + Math.Cos(alt) * Math.Cos(lat) * Math.Cos(az);
|
||||
var dec = RadiansToDegrees(Math.Asin(sinDec));
|
||||
|
||||
var y = -Math.Cos(alt) * Math.Cos(lat) * Math.Sin(az);
|
||||
var x = Math.Sin(alt) - Math.Sin(lat) * sinDec;
|
||||
var upperA = Math.Atan2(y,x);
|
||||
var upperB = RadiansToDegrees(upperA);
|
||||
|
||||
var ha = upperB;
|
||||
|
||||
if (upperB < 0)
|
||||
{
|
||||
ha += 360;
|
||||
}
|
||||
|
||||
ha = ha / 15;
|
||||
|
||||
EquatorialCoordinates equatorialCoordinates = new EquatorialCoordinates
|
||||
{
|
||||
RightAscension = HourAngleToRightAscension( utcDateTime, longitude, ha ),
|
||||
Declination = dec
|
||||
};
|
||||
|
||||
return equatorialCoordinates;
|
||||
}
|
||||
|
||||
public HorizonCoordinates ConvertEqToHoz(double hourAngle, double latitude, EquatorialCoordinates raDec)
|
||||
{
|
||||
var h = hourAngle * 15;
|
||||
var h1 = DegreesToRadians(h);
|
||||
var d = DegreesToRadians(raDec.Declination);
|
||||
var lat = DegreesToRadians(latitude);
|
||||
var sinA = Math.Sin(d) * Math.Sin(lat) + Math.Cos(d) * Math.Cos(lat) * Math.Cos(h1);
|
||||
|
||||
var y = -Math.Cos(d) * Math.Cos(lat) * Math.Sin(h1);
|
||||
var x = Math.Sin(d) - Math.Sin(lat) * sinA;
|
||||
var upperA = Math.Atan2(y, x);
|
||||
var upperB = RadiansToDegrees(upperA);
|
||||
|
||||
var horizonCoordinates = new HorizonCoordinates();
|
||||
horizonCoordinates.Altitude = RadiansToDegrees(Math.Asin(sinA));
|
||||
|
||||
horizonCoordinates.Azimuth = upperB;
|
||||
|
||||
if (upperB < 0)
|
||||
{
|
||||
horizonCoordinates.Azimuth = 360 + horizonCoordinates.Azimuth;
|
||||
}
|
||||
|
||||
return horizonCoordinates;
|
||||
}
|
||||
|
||||
|
||||
//todo convert to extension method
|
||||
public double DegreesToRadians(double degrees)
|
||||
{
|
||||
return (Math.PI / 180) * degrees;
|
||||
}
|
||||
|
||||
//todo convert to extension method
|
||||
public double RadiansToDegrees(double radians)
|
||||
{
|
||||
double degrees = (180 / Math.PI) * radians;
|
||||
return (degrees);
|
||||
}
|
||||
|
||||
//todo convert to extension method
|
||||
public double DateTimeToDecimalHours( DateTime utcDateTime)
|
||||
{
|
||||
double sec = utcDateTime.Second;
|
||||
double min = utcDateTime.Minute;
|
||||
double hour = utcDateTime.Hour;
|
||||
|
||||
var a = Math.Abs(sec) / 60;
|
||||
var b = (Math.Abs(min) + a) / 60;
|
||||
var c = Math.Abs(hour) + b;
|
||||
|
||||
var d = c;
|
||||
|
||||
if ((hour < 0) || (min < 0) || (sec < 0))
|
||||
d = -c;
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
//todo convert to extension method
|
||||
public double UTtoGst(DateTime utcDateTime)
|
||||
{
|
||||
Util util = new Util();
|
||||
|
||||
var jd = util.DateUTCToJulian(utcDateTime) - 0.5;
|
||||
if ((jd % 1) <= 0.5 )
|
||||
jd = Math.Floor( jd );
|
||||
else
|
||||
jd = Math.Floor( jd ) + 0.5;
|
||||
|
||||
var s = jd - 2451545.0;
|
||||
var t = s / 36525.0;
|
||||
var t0 = 6.697374558 + (2400.051336 * t ) +(0.000025862 * (t * t) );
|
||||
|
||||
while (t0 < 0)
|
||||
{
|
||||
t0 += 24;
|
||||
}
|
||||
|
||||
while (t0 >= 24)
|
||||
{
|
||||
t0 -= 24;
|
||||
}
|
||||
|
||||
var ut = DateTimeToDecimalHours(utcDateTime);
|
||||
var a = ut * 1.002737909;
|
||||
|
||||
var t1 = t0 + a;
|
||||
|
||||
while (t1 < 0)
|
||||
{
|
||||
t1 += 24;
|
||||
}
|
||||
|
||||
while (t1 >= 24)
|
||||
{
|
||||
t1 -= 24;
|
||||
}
|
||||
|
||||
return t1;
|
||||
}
|
||||
|
||||
public double GsTtoLst(double gst, double longitude)
|
||||
{
|
||||
var l = longitude/ 15;
|
||||
|
||||
var lst = gst + l;
|
||||
while (lst < 0 )
|
||||
{
|
||||
lst += 24;
|
||||
}
|
||||
while (lst >= 24)
|
||||
{
|
||||
lst -= 24;
|
||||
}
|
||||
|
||||
return lst;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace ASCOM.Meade.net.AstroMaths
|
||||
{
|
||||
public class EquatorialCoordinates
|
||||
{
|
||||
public double RightAscension { get; set; }
|
||||
public double Declination { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace ASCOM.Meade.net.AstroMaths
|
||||
{
|
||||
public class HorizonCoordinates
|
||||
{
|
||||
public double Altitude { get; set; }
|
||||
public double Azimuth { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace ASCOM.Meade.net.AstroMaths
|
||||
{
|
||||
public interface IAstroMaths
|
||||
{
|
||||
double RightAscensionToHourAngle(DateTime utcDateTime, double longitude, double rightAscension);
|
||||
double HourAngleToRightAscension(DateTime utcDateTime, double longitude, double hourAngle );
|
||||
EquatorialCoordinates ConvertHozToEq( DateTime utcDateTime, double latitude, double longitude, HorizonCoordinates altAz);
|
||||
HorizonCoordinates ConvertEqToHoz(double hourAngle, double latitude, EquatorialCoordinates raDec);
|
||||
double DegreesToRadians(double degrees);
|
||||
double RadiansToDegrees(double radians);
|
||||
double DateTimeToDecimalHours( DateTime utcDateTime);
|
||||
double UTtoGst(DateTime utcDateTime);
|
||||
double GsTtoLst(double gst, double longitude);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<#
|
||||
This script initializes a bare minimum set of registry entries required for ASCOM.Utilities.Profile to work
|
||||
without throwing any exceptions. When building on a build server, or on a computer without the ASCOM Platform installed,
|
||||
it may be useful to execute this script as a build step prior to running any unit tests, or calling any code that relies on
|
||||
ASCOM.Utilities.Profile. The alternative is to install the ASCOM Platform on the build agent.
|
||||
|
||||
NOTE: This script equires elevated permissions because it creates registry keys in the LocalMachine hive.
|
||||
#>
|
||||
|
||||
$wow = Test-Path HKLM:\SOFTWARE\Wow6432Node
|
||||
if ($wow)
|
||||
{
|
||||
$root = "HKLM:\SOFTWARE\Wow6432Node"
|
||||
}
|
||||
else
|
||||
{
|
||||
$root = "HKLM:\SOFTWARE"
|
||||
}
|
||||
$ascomRoot = $root + "\ASCOM"
|
||||
|
||||
if (Test-Path $ascomRoot)
|
||||
{
|
||||
<# Don't upset an already-existing ASCOM registry #>
|
||||
exit
|
||||
}
|
||||
|
||||
<# Create the ASCOM root key and set it's ACL to allow all users read/write access #>
|
||||
New-Item -Path $root -Name ASCOM –Force
|
||||
$ascomAcl = Get-Acl $ascomRoot
|
||||
$aclRule = New-Object System.Security.AccessControl.RegistryAccessRule ("Users","FullControl","Allow")
|
||||
$ascomAcl.SetAccessRule($aclRule)
|
||||
$ascomAcl | Set-Acl -Path $ascomRoot
|
||||
|
||||
<# Now create the bare minimum keys required so that ASCOM.Utilities.Profile doesn't crash and burn #>
|
||||
New-ItemProperty -Path $ascomRoot -Name PlatformVersion -Value "6.1" -PropertyType String –Force
|
||||
New-ItemProperty -Path $ascomRoot -Name SerTraceFile -Value "C:\SerialTraceAuto.txt" -PropertyType String –Force
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
public static class DoubleExtensions
|
||||
{
|
||||
public static bool InRange(this double value, double low, double high)
|
||||
{
|
||||
if (value < low)
|
||||
return false;
|
||||
if (value > high)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,14 +8,14 @@
|
||||
<ProjectGuid>{64308775-BD4A-469C-BCAB-3ED830B811AF}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ASCOM.MeadeAutostar497</RootNamespace>
|
||||
<AssemblyName>ASCOM.MeadeAutostar497.Telescope</AssemblyName>
|
||||
<RootNamespace>ASCOM.Meade.net</RootNamespace>
|
||||
<AssemblyName>ASCOM.Meade.net.Telescope</AssemblyName>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<ApplicationIcon>ASCOM.ico</ApplicationIcon>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>ASCOMDriverTemplate.snk</AssemblyOriginatorKeyFile>
|
||||
@@ -41,18 +41,18 @@
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>..\bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<RegisterForComInterop>true</RegisterForComInterop>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<OutputPath>..\bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
@@ -60,16 +60,47 @@
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>..\bin\Release\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<OutputPath>..\bin\Debug\</OutputPath>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ASCOM.Astrometry, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||
<Reference Include="ASCOM.Attributes, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||
<Reference Include="ASCOM.Controls, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||
<Reference Include="ASCOM.Exceptions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||
<Reference Include="ASCOM.SettingsProvider, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||
<Reference Include="ASCOM.Utilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||
<Reference Include="ASCOM.Utilities.Video, Version=6.1.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="ASCOM.Astrometry, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Attributes, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Cache, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Controls, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Exceptions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Internal.Extensions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.SettingsProvider, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities.Video, Version=6.1.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
@@ -78,23 +109,18 @@
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Windows" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AscomClasses\Telescope.cs" />
|
||||
<Compile Include="Controller\FirmwareVersion.cs" />
|
||||
<Compile Include="Controller\ISerialProcessor.cs" />
|
||||
<Compile Include="Controller\ITelescopeController.cs" />
|
||||
<Compile Include="Controller\SerialProcessor.cs" />
|
||||
<Compile Include="Controller\TelescopeController.cs" />
|
||||
<Compile Include="AstroMaths\AltitudeData.cs" />
|
||||
<Compile Include="AstroMaths\AstroMaths.cs" />
|
||||
<Compile Include="AstroMaths\EquatorialCoordinates.cs" />
|
||||
<Compile Include="AstroMaths\HorizonCoordinates.cs" />
|
||||
<Compile Include="AstroMaths\IAstroMaths.cs" />
|
||||
<Compile Include="DoubleExtensions.cs" />
|
||||
<Compile Include="StringExtensions.cs" />
|
||||
<Compile Include="Telescope.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -106,13 +132,7 @@
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="AscomClasses\Rates.cs" />
|
||||
<Compile Include="AscomClasses\SetupDialogForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AscomClasses\SetupDialogForm.designer.cs">
|
||||
<DependentUpon>SetupDialogForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Rates.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
@@ -120,15 +140,13 @@
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="AscomClasses\SetupDialogForm.resx">
|
||||
<DependentUpon>SetupDialogForm.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="ASCOM.png" />
|
||||
<None Include="ASCOMDriverTemplate.snk" />
|
||||
<None Include="BootstrapAscomProfileStore.ps1" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
@@ -154,7 +172,12 @@
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Meade.net\Meade.net.csproj">
|
||||
<Project>{3689a2cb-94c5-4012-a5cf-7e7d1dd27143}</Project>
|
||||
<Name>Meade.net</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
@@ -0,0 +1,5 @@
|
||||
<ProjectConfiguration>
|
||||
<Settings>
|
||||
<UseCPUArchitecture>x86</UseCPUArchitecture>
|
||||
</Settings>
|
||||
</ProjectConfiguration>
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -7,11 +6,11 @@ using System.Runtime.InteropServices;
|
||||
// associated with an assembly.
|
||||
//
|
||||
// TODO - Add your authorship information here
|
||||
[assembly: AssemblyTitle("ASCOM.MeadeAutostar497.Telescope")]
|
||||
[assembly: AssemblyDescription("ASCOM MeadeAutostar497 .net")]
|
||||
[assembly: AssemblyTitle("ASCOM.Meade.net.Telescope")]
|
||||
[assembly: AssemblyDescription("ASCOM Telescope driver for Meade.net")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Cjdawson.com")]
|
||||
[assembly: AssemblyProduct("ASCOM Telescope driver for MeadeAutostar497")]
|
||||
[assembly: AssemblyCompany("cjdawson.com")]
|
||||
[assembly: AssemblyProduct("ASCOM Telescope driver for Meade.net")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019 cjdawson.com")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
@@ -22,7 +21,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: ComVisible(true)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("55d0f255-cb49-4e6b-bc32-4f8fb874734d")]
|
||||
[assembly: Guid("8b9fccb9-87ae-42f7-90af-079e13de6efb")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
@@ -35,5 +34,5 @@ using System.Runtime.InteropServices;
|
||||
// by using the '*' as shown below:
|
||||
//
|
||||
// TODO - Set your driver's version here
|
||||
[assembly: AssemblyVersion("0.2.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.2.0.0")]
|
||||
[assembly: AssemblyVersion("0.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.0.0.0")]
|
||||
@@ -8,7 +8,7 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ASCOM.MeadeAutostar497.Properties {
|
||||
namespace ASCOM.Meade.net.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace ASCOM.MeadeAutostar497.Properties {
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
@@ -39,7 +39,7 @@ namespace ASCOM.MeadeAutostar497.Properties {
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ASCOM.MeadeAutostar497.Properties.Resources", typeof(Resources).Assembly);
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ASCOM.Meade.net.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
@@ -8,11 +8,11 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ASCOM.MeadeAutostar497.Properties {
|
||||
namespace ASCOM.Meade.net.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@@ -1,30 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ASCOM.DeviceInterface;
|
||||
using System.Collections;
|
||||
using System.Threading;
|
||||
|
||||
namespace ASCOM.MeadeAutostar497
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
#region Rate class
|
||||
//
|
||||
// The Rate class implements IRate, and is used to hold values
|
||||
// for AxisRates. You do not need to change this class.
|
||||
//
|
||||
// The Guid attribute sets the CLSID for ASCOM.MeadeAutostar497.Rate
|
||||
// The Guid attribute sets the CLSID for ASCOM.Meade.net.Rate
|
||||
// The ClassInterface/None addribute prevents an empty interface called
|
||||
// _Rate from being created and used as the [default] interface
|
||||
//
|
||||
[Guid("20c14d35-a61b-4c6a-a6ab-cb9f27997c45")]
|
||||
[Guid("288838d1-bbf9-4ce0-9ee1-86ecf38b45c9")]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[ComVisible(true)]
|
||||
public class Rate : ASCOM.DeviceInterface.IRate
|
||||
public class Rate : IRate
|
||||
{
|
||||
private double maximum = 0;
|
||||
private double minimum = 0;
|
||||
private double _maximum = 0;
|
||||
private double _minimum = 0;
|
||||
|
||||
//
|
||||
// Default constructor - Internal prevents public creation
|
||||
@@ -32,8 +28,8 @@ namespace ASCOM.MeadeAutostar497
|
||||
//
|
||||
internal Rate(double minimum, double maximum)
|
||||
{
|
||||
this.maximum = maximum;
|
||||
this.minimum = minimum;
|
||||
_maximum = maximum;
|
||||
_minimum = minimum;
|
||||
}
|
||||
|
||||
#region Implementation of IRate
|
||||
@@ -45,14 +41,14 @@ namespace ASCOM.MeadeAutostar497
|
||||
|
||||
public double Maximum
|
||||
{
|
||||
get { return this.maximum; }
|
||||
set { this.maximum = value; }
|
||||
get => _maximum;
|
||||
set => _maximum = value;
|
||||
}
|
||||
|
||||
public double Minimum
|
||||
{
|
||||
get { return this.minimum; }
|
||||
set { this.minimum = value; }
|
||||
get => _minimum;
|
||||
set => _minimum = value;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -65,17 +61,17 @@ namespace ASCOM.MeadeAutostar497
|
||||
// both COM and .NET. The IAxisRates and IEnumerable interfaces provide
|
||||
// this polymorphism.
|
||||
//
|
||||
// The Guid attribute sets the CLSID for ASCOM.MeadeAutostar497.AxisRates
|
||||
// The Guid attribute sets the CLSID for ASCOM.Meade.net.AxisRates
|
||||
// The ClassInterface/None addribute prevents an empty interface called
|
||||
// _AxisRates from being created and used as the [default] interface
|
||||
//
|
||||
[Guid("ac703603-bcfc-4d98-9de3-c2b9a165756f")]
|
||||
[Guid("436de2dd-a77a-41ad-8a9e-14c3695f18f2")]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[ComVisible(true)]
|
||||
public class AxisRates : IAxisRates, IEnumerable
|
||||
{
|
||||
private TelescopeAxes axis;
|
||||
private readonly Rate[] rates;
|
||||
private TelescopeAxes _axis;
|
||||
private readonly Rate[] _rates;
|
||||
|
||||
//
|
||||
// Constructor - Internal prevents public creation
|
||||
@@ -83,7 +79,7 @@ namespace ASCOM.MeadeAutostar497
|
||||
//
|
||||
internal AxisRates(TelescopeAxes axis)
|
||||
{
|
||||
this.axis = axis;
|
||||
_axis = axis;
|
||||
//
|
||||
// This collection must hold zero or more Rate objects describing the
|
||||
// rates of motion ranges for the Telescope.MoveAxis() method
|
||||
@@ -100,26 +96,23 @@ namespace ASCOM.MeadeAutostar497
|
||||
// TODO Initialize this array with any Primary axis rates that your driver may provide
|
||||
// Example: m_Rates = new Rate[] { new Rate(10.5, 30.2), new Rate(54.0, 43.6) }
|
||||
//this.rates = new Rate[0];
|
||||
this.rates = new Rate[] {new Rate(1, 1), new Rate(2, 2), new Rate(3, 3), new Rate(4, 4)};
|
||||
_rates = new Rate[] { new Rate(1, 1), new Rate(2, 2), new Rate(3, 3), new Rate(4, 4) };
|
||||
break;
|
||||
case TelescopeAxes.axisSecondary:
|
||||
// TODO Initialize this array with any Secondary axis rates that your driver may provide
|
||||
//this.rates = new Rate[0];
|
||||
this.rates = new Rate[] { new Rate(1, 1), new Rate(2, 2), new Rate(3, 3), new Rate(4, 4) };
|
||||
_rates = new Rate[] { new Rate(1, 1), new Rate(2, 2), new Rate(3, 3), new Rate(4, 4) };
|
||||
break;
|
||||
case TelescopeAxes.axisTertiary:
|
||||
// TODO Initialize this array with any Tertiary axis rates that your driver may provide
|
||||
this.rates = new Rate[0];
|
||||
_rates = new Rate[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#region IAxisRates Members
|
||||
|
||||
public int Count
|
||||
{
|
||||
get { return this.rates.Length; }
|
||||
}
|
||||
public int Count => _rates.Length;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
@@ -128,13 +121,10 @@ namespace ASCOM.MeadeAutostar497
|
||||
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return rates.GetEnumerator();
|
||||
return _rates.GetEnumerator();
|
||||
}
|
||||
|
||||
public IRate this[int index]
|
||||
{
|
||||
get { return this.rates[index - 1]; } // 1-based
|
||||
}
|
||||
public IRate this[int index] => _rates[index - 1];
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -146,7 +136,7 @@ namespace ASCOM.MeadeAutostar497
|
||||
// both COM and .NET. The ITrackingRates and IEnumerable interfaces provide
|
||||
// this polymorphism.
|
||||
//
|
||||
// The Guid attribute sets the CLSID for ASCOM.MeadeAutostar497.TrackingRates
|
||||
// The Guid attribute sets the CLSID for ASCOM.Meade.net.TrackingRates
|
||||
// The ClassInterface/None addribute prevents an empty interface called
|
||||
// _TrackingRates from being created and used as the [default] interface
|
||||
//
|
||||
@@ -154,16 +144,16 @@ namespace ASCOM.MeadeAutostar497
|
||||
// will work with this .NET 4.0 object. Changes to this have proved to be challenging
|
||||
// and it is strongly suggested that it isn't changed.
|
||||
//
|
||||
[Guid("cb732953-8e5a-4bf0-b3b7-451edb74b5d5")]
|
||||
[Guid("8e9aa30e-ab24-4a20-8af3-4a057defb1ff")]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[ComVisible(true)]
|
||||
public class TrackingRates : ITrackingRates, IEnumerable, IEnumerator
|
||||
{
|
||||
private readonly DriveRates[] trackingRates;
|
||||
private readonly DriveRates[] _trackingRates;
|
||||
|
||||
// this is used to make the index thread safe
|
||||
private readonly ThreadLocal<int> pos = new ThreadLocal<int>(() => { return -1; });
|
||||
private static readonly object lockObj = new object();
|
||||
private readonly ThreadLocal<int> _pos = new ThreadLocal<int>(() => { return -1; });
|
||||
private static readonly object LockObj = new object();
|
||||
|
||||
//
|
||||
// Default constructor - Internal prevents public creation
|
||||
@@ -176,20 +166,17 @@ namespace ASCOM.MeadeAutostar497
|
||||
// the tracking rates supported by your telescope. The one value
|
||||
// (tracking rate) that MUST be supported is driveSidereal!
|
||||
//
|
||||
this.trackingRates = new[] { DriveRates.driveSidereal };
|
||||
_trackingRates = new[] { DriveRates.driveSidereal, DriveRates.driveLunar };
|
||||
// TODO Initialize this array with any additional tracking rates that your driver may provide
|
||||
}
|
||||
|
||||
#region ITrackingRates Members
|
||||
|
||||
public int Count
|
||||
{
|
||||
get { return this.trackingRates.Length; }
|
||||
}
|
||||
public int Count => _trackingRates.Length;
|
||||
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
pos.Value = -1;
|
||||
_pos.Value = -1;
|
||||
return this as IEnumerator;
|
||||
}
|
||||
|
||||
@@ -198,10 +185,7 @@ namespace ASCOM.MeadeAutostar497
|
||||
// TODO Add any required object cleanup here
|
||||
}
|
||||
|
||||
public DriveRates this[int index]
|
||||
{
|
||||
get { return this.trackingRates[index - 1]; } // 1-based
|
||||
}
|
||||
public DriveRates this[int index] => _trackingRates[index - 1];
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -211,22 +195,22 @@ namespace ASCOM.MeadeAutostar497
|
||||
{
|
||||
get
|
||||
{
|
||||
lock (lockObj)
|
||||
lock (LockObj)
|
||||
{
|
||||
if (pos.Value < 0 || pos.Value >= trackingRates.Length)
|
||||
if (_pos.Value < 0 || _pos.Value >= _trackingRates.Length)
|
||||
{
|
||||
throw new System.InvalidOperationException();
|
||||
}
|
||||
return trackingRates[pos.Value];
|
||||
return _trackingRates[_pos.Value];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool MoveNext()
|
||||
{
|
||||
lock (lockObj)
|
||||
lock (LockObj)
|
||||
{
|
||||
if (++pos.Value >= trackingRates.Length)
|
||||
if (++_pos.Value >= _trackingRates.Length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -236,7 +220,7 @@ namespace ASCOM.MeadeAutostar497
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
pos.Value = -1;
|
||||
_pos.Value = -1;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -0,0 +1,33 @@
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
public static class StringExtensions
|
||||
{
|
||||
public static int ToInteger(this string str)
|
||||
{
|
||||
return int.Parse(str);
|
||||
}
|
||||
|
||||
public static double ToDouble(this string str)
|
||||
{
|
||||
return double.Parse(str);
|
||||
}
|
||||
|
||||
public static int Position(this string str, char find, int instance)
|
||||
{
|
||||
var currentInstance = 0;
|
||||
for (var i = 0; i < str.Length; i++)
|
||||
{
|
||||
if (str[i] == find)
|
||||
{
|
||||
currentInstance++;
|
||||
if (currentInstance == instance)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,4 +5,4 @@
|
||||
<section name="ASCOM.DeviceName.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ASCOM.Platform" version="6.4.2" targetFramework="net40" />
|
||||
</packages>
|
||||
|
After Width: | Height: | Size: 123 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,36 @@
|
||||
<#
|
||||
This script initializes a bare minimum set of registry entries required for ASCOM.Utilities.Profile to work
|
||||
without throwing any exceptions. When building on a build server, or on a computer without the ASCOM Platform installed,
|
||||
it may be useful to execute this script as a build step prior to running any unit tests, or calling any code that relies on
|
||||
ASCOM.Utilities.Profile. The alternative is to install the ASCOM Platform on the build agent.
|
||||
|
||||
NOTE: This script equires elevated permissions because it creates registry keys in the LocalMachine hive.
|
||||
#>
|
||||
|
||||
$wow = Test-Path HKLM:\SOFTWARE\Wow6432Node
|
||||
if ($wow)
|
||||
{
|
||||
$root = "HKLM:\SOFTWARE\Wow6432Node"
|
||||
}
|
||||
else
|
||||
{
|
||||
$root = "HKLM:\SOFTWARE"
|
||||
}
|
||||
$ascomRoot = $root + "\ASCOM"
|
||||
|
||||
if (Test-Path $ascomRoot)
|
||||
{
|
||||
<# Don't upset an already-existing ASCOM registry #>
|
||||
exit
|
||||
}
|
||||
|
||||
<# Create the ASCOM root key and set it's ACL to allow all users read/write access #>
|
||||
New-Item -Path $root -Name ASCOM –Force
|
||||
$ascomAcl = Get-Acl $ascomRoot
|
||||
$aclRule = New-Object System.Security.AccessControl.RegistryAccessRule ("Users","FullControl","Allow")
|
||||
$ascomAcl.SetAccessRule($aclRule)
|
||||
$ascomAcl | Set-Acl -Path $ascomRoot
|
||||
|
||||
<# Now create the bare minimum keys required so that ASCOM.Utilities.Profile doesn't crash and burn #>
|
||||
New-ItemProperty -Path $ascomRoot -Name PlatformVersion -Value "6.1" -PropertyType String –Force
|
||||
New-ItemProperty -Path $ascomRoot -Name SerTraceFile -Value "C:\SerialTraceAuto.txt" -PropertyType String –Force
|
||||
@@ -0,0 +1,601 @@
|
||||
#define Focuser
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using ASCOM.Utilities;
|
||||
using ASCOM.DeviceInterface;
|
||||
using System.Globalization;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
using ASCOM.Meade.net.Wrapper;
|
||||
using ASCOM.Utilities.Interfaces;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
//
|
||||
// Your driver's DeviceID is ASCOM.Meade.net.Focuser
|
||||
//
|
||||
// The Guid attribute sets the CLSID for ASCOM.Meade.net.Focuser
|
||||
// The ClassInterface/None addribute prevents an empty interface called
|
||||
// _Meade.net from being created and used as the [default] interface
|
||||
//
|
||||
// TODO Replace the not implemented exceptions with code to implement the function or
|
||||
// throw the appropriate ASCOM exception.
|
||||
//
|
||||
|
||||
/// <summary>
|
||||
/// ASCOM Focuser Driver for Meade.net.
|
||||
/// </summary>
|
||||
[Guid("a32ac647-bf0f-42f9-8ab0-d166fa5884ad")]
|
||||
[ProgId("ASCOM.MeadeGeneric.focuser")]
|
||||
[ServedClassName("Meade.net Focuser")]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
public class Focuser : ReferenceCountedObjectBase, IFocuserV3
|
||||
{
|
||||
/// <summary>
|
||||
/// ASCOM DeviceID (COM ProgID) for this driver.
|
||||
/// The DeviceID is used by ASCOM applications to load the driver at runtime.
|
||||
/// </summary>
|
||||
//internal static string driverID = "ASCOM.Meade.net.Focuser";
|
||||
private static readonly string DriverId = Marshal.GenerateProgIdForType(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// TODO Change the descriptive string for your driver then remove this line
|
||||
/// <summary>
|
||||
/// Driver description that displays in the ASCOM Chooser.
|
||||
/// </summary>
|
||||
private static readonly string DriverDescription = "Meade Generic";
|
||||
|
||||
private static string _comPort; // Variables to hold the currrent device configuration
|
||||
|
||||
/// <summary>
|
||||
/// Private variable to hold an ASCOM Utilities object
|
||||
/// </summary>
|
||||
private readonly IUtil _utilities;
|
||||
|
||||
/// <summary>
|
||||
/// Variable to hold the trace logger object (creates a diagnostic log file with information that you specify)
|
||||
/// </summary>
|
||||
internal static TraceLogger Tl;
|
||||
|
||||
private readonly ISharedResourcesWrapper _sharedResourcesWrapper;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Meade.net"/> class.
|
||||
/// Must be public for COM registration.
|
||||
/// </summary>
|
||||
public Focuser()
|
||||
{
|
||||
//todo move this out to IOC
|
||||
_utilities = new Util(); //Initialise util object
|
||||
_sharedResourcesWrapper = new SharedResourcesWrapper();
|
||||
|
||||
Initialise();
|
||||
}
|
||||
|
||||
private void Initialise()
|
||||
{
|
||||
//todo move the TraceLogger out to a factory class.
|
||||
Tl = new TraceLogger("", "Meade.Generic.focusser");
|
||||
|
||||
ReadProfile(); // Read device configuration from the ASCOM Profile store
|
||||
|
||||
IsConnected = false; // Initialise connected to false
|
||||
|
||||
LogMessage("Focuser", "Completed initialisation");
|
||||
LogMessage("Focuser", $"Driver version: {DriverVersion}");
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// PUBLIC COM INTERFACE IFocuserV3 IMPLEMENTATION
|
||||
//
|
||||
|
||||
#region Common properties and methods.
|
||||
|
||||
/// <summary>
|
||||
/// Displays the Setup Dialog form.
|
||||
/// If the user clicks the OK button to dismiss the form, then
|
||||
/// the new settings are saved, otherwise the old values are reloaded.
|
||||
/// THIS IS THE ONLY PLACE WHERE SHOWING USER INTERFACE IS ALLOWED!
|
||||
/// </summary>
|
||||
public void SetupDialog()
|
||||
{
|
||||
Tl.LogMessage("SetupDialog", "Opening setup dialog");
|
||||
_sharedResourcesWrapper.SetupDialog();
|
||||
ReadProfile();
|
||||
Tl.LogMessage("SetupDialog", "complete");
|
||||
}
|
||||
|
||||
public ArrayList SupportedActions
|
||||
{
|
||||
get
|
||||
{
|
||||
Tl.LogMessage("SupportedActions Get", "Returning empty arraylist");
|
||||
return new ArrayList();
|
||||
}
|
||||
}
|
||||
|
||||
public string Action(string actionName, string actionParameters)
|
||||
{
|
||||
LogMessage("", "Action {0}, parameters {1} not implemented", actionName, actionParameters);
|
||||
throw new ActionNotImplementedException("Action " + actionName + " is not implemented by this driver");
|
||||
}
|
||||
|
||||
public void CommandBlind(string command, bool raw)
|
||||
{
|
||||
CheckConnected("CommandBlind");
|
||||
// Call CommandString and return as soon as it finishes
|
||||
//this.CommandString(command, raw);
|
||||
_sharedResourcesWrapper.SendBlind(command);
|
||||
// or
|
||||
//throw new ASCOM.MethodNotImplementedException("CommandBlind");
|
||||
// DO NOT have both these sections! One or the other
|
||||
}
|
||||
|
||||
public bool CommandBool(string command, bool raw)
|
||||
{
|
||||
CheckConnected("CommandBool");
|
||||
//string ret = CommandString(command, raw);
|
||||
// TODO decode the return string and return true or false
|
||||
// or
|
||||
throw new MethodNotImplementedException("CommandBool");
|
||||
// DO NOT have both these sections! One or the other
|
||||
}
|
||||
|
||||
public string CommandString(string command, bool raw)
|
||||
{
|
||||
CheckConnected("CommandString");
|
||||
// it's a good idea to put all the low level communication with the device here,
|
||||
// then all communication calls this function
|
||||
// you need something to ensure that only one command is in progress at a time
|
||||
return _sharedResourcesWrapper.SendString(command);
|
||||
|
||||
throw new MethodNotImplementedException("CommandString");
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Clean up the tracelogger and util objects
|
||||
Tl.Enabled = false;
|
||||
Tl.Dispose();
|
||||
Tl = null;
|
||||
}
|
||||
|
||||
public bool Connected
|
||||
{
|
||||
get
|
||||
{
|
||||
LogMessage("Connected", "Get {0}", IsConnected);
|
||||
return IsConnected;
|
||||
}
|
||||
set
|
||||
{
|
||||
Tl.LogMessage("Connected", "Set {0}", value);
|
||||
if (value == IsConnected)
|
||||
return;
|
||||
|
||||
if (value)
|
||||
{
|
||||
try
|
||||
{
|
||||
ReadProfile();
|
||||
_sharedResourcesWrapper.Connect("Serial");
|
||||
try
|
||||
{
|
||||
SelectSite(1);
|
||||
SetLongFormat(true);
|
||||
|
||||
IsConnected = true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_sharedResourcesWrapper.Disconnect("Serial");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogMessage("Connected Set", "Error connecting to port {0} - {1}", _comPort, ex.Message);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogMessage("Connected Set", "Disconnecting from port {0}", _comPort);
|
||||
_sharedResourcesWrapper.Disconnect("Serial");
|
||||
IsConnected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetLongFormat(bool setLongFormat)
|
||||
{
|
||||
_sharedResourcesWrapper.Lock(() =>
|
||||
{
|
||||
var result = _sharedResourcesWrapper.SendString(":GZ#");
|
||||
//:GZ# Get telescope azimuth
|
||||
//Returns: DDD*MM#T or DDD*MM’SS#
|
||||
//The current telescope Azimuth depending on the selected precision.
|
||||
|
||||
bool isLongFormat = result.Length > 6;
|
||||
|
||||
if (isLongFormat != setLongFormat)
|
||||
{
|
||||
_utilities.WaitForMilliseconds(500);
|
||||
_sharedResourcesWrapper.SendBlind(":U#");
|
||||
//:U# Toggle between low/hi precision positions
|
||||
//Low - RA displays and messages HH:MM.T sDD*MM
|
||||
//High - Dec / Az / El displays and messages HH:MM: SS sDD*MM:SS
|
||||
// Returns Nothing
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void SelectSite(int site)
|
||||
{
|
||||
_sharedResourcesWrapper.SendBlind($":W{site}#");
|
||||
//:W<n>#
|
||||
//Set current site to<n>, an ASCII digit in the range 1..4
|
||||
//Returns: Nothing
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
// TODO customise this device description
|
||||
get
|
||||
{
|
||||
Tl.LogMessage("Description Get", DriverDescription);
|
||||
return DriverDescription;
|
||||
}
|
||||
}
|
||||
|
||||
public string DriverInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
Version version = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
// TODO customise this driver description
|
||||
string driverInfo = "Information about the driver itself. Version: " + String.Format(CultureInfo.InvariantCulture, "{0}.{1}", version.Major, version.Minor);
|
||||
Tl.LogMessage("DriverInfo Get", driverInfo);
|
||||
return driverInfo;
|
||||
}
|
||||
}
|
||||
|
||||
public string DriverVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
Version version = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
string driverVersion = String.Format(CultureInfo.InvariantCulture, "{0}.{1}", version.Major, version.Minor);
|
||||
Tl.LogMessage("DriverVersion Get", driverVersion);
|
||||
return driverVersion;
|
||||
}
|
||||
}
|
||||
|
||||
public short InterfaceVersion
|
||||
{
|
||||
// set by the driver wizard
|
||||
get
|
||||
{
|
||||
LogMessage("InterfaceVersion Get", "3");
|
||||
return Convert.ToInt16("3");
|
||||
}
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
//string name = "Short driver name - please customise";
|
||||
string name = DriverDescription;
|
||||
Tl.LogMessage("Name Get", name);
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IFocuser Implementation
|
||||
|
||||
public bool Absolute
|
||||
{
|
||||
get
|
||||
{
|
||||
Tl.LogMessage("Absolute Get", false.ToString());
|
||||
return false; // This is a relative focuser
|
||||
}
|
||||
}
|
||||
|
||||
public void Halt()
|
||||
{
|
||||
Tl.LogMessage("Halt", "Halting");
|
||||
|
||||
CheckConnected("Halt");
|
||||
|
||||
//A single halt command is sometimes missed by the #909 apm, so let's do it a few times to be safe.
|
||||
Stopwatch stopwatch = Stopwatch.StartNew();
|
||||
while (stopwatch.ElapsedMilliseconds < 1000)
|
||||
{
|
||||
_sharedResourcesWrapper.SendBlind(":FQ#");
|
||||
//:FQ# Halt Focuser Motion
|
||||
//Returns: Nothing
|
||||
|
||||
_utilities.WaitForMilliseconds(250);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsMoving
|
||||
{
|
||||
get
|
||||
{
|
||||
Tl.LogMessage("IsMoving Get", false.ToString());
|
||||
return false; // This focuser always moves instantaneously so no need for IsMoving ever to be True
|
||||
}
|
||||
}
|
||||
|
||||
public bool Link
|
||||
{
|
||||
get
|
||||
{
|
||||
Tl.LogMessage("Link Get", Connected.ToString());
|
||||
return Connected; // Direct function to the connected method, the Link method is just here for backwards compatibility
|
||||
}
|
||||
set
|
||||
{
|
||||
Tl.LogMessage("Link Set", value.ToString());
|
||||
Connected = value; // Direct function to the connected method, the Link method is just here for backwards compatibility
|
||||
}
|
||||
}
|
||||
|
||||
private readonly int _maxIncrement = 7000;
|
||||
public int MaxIncrement
|
||||
{
|
||||
get
|
||||
{
|
||||
Tl.LogMessage("MaxIncrement Get", _maxIncrement.ToString());
|
||||
return _maxIncrement; // Maximum change in one move
|
||||
}
|
||||
}
|
||||
|
||||
private readonly int _maxStep = 7000;
|
||||
public int MaxStep
|
||||
{
|
||||
get
|
||||
{
|
||||
Tl.LogMessage("MaxStep Get", _maxStep.ToString());
|
||||
return _maxStep;
|
||||
}
|
||||
}
|
||||
|
||||
public void Move(int position)
|
||||
{
|
||||
Tl.LogMessage("Move", position.ToString());
|
||||
CheckConnected("Move");
|
||||
|
||||
//todo implement backlash compensation
|
||||
//todo implement direction reverse
|
||||
//todo implement dynamic braking
|
||||
|
||||
if (position < -MaxIncrement || position > MaxIncrement)
|
||||
{
|
||||
throw new InvalidValueException($"position out of range {-MaxIncrement} < {position} < {MaxIncrement}");
|
||||
}
|
||||
|
||||
if (position == 0)
|
||||
return;
|
||||
|
||||
if (position > 0)
|
||||
{
|
||||
//desired move direction is out
|
||||
MoveFocuser(true, Math.Abs(position));
|
||||
}
|
||||
else
|
||||
{
|
||||
//desired move direction is in
|
||||
MoveFocuser(false, Math.Abs(position));
|
||||
}
|
||||
}
|
||||
|
||||
private void MoveFocuser(bool directionOut, int steps)
|
||||
{
|
||||
_sharedResourcesWrapper.Lock(() =>
|
||||
{
|
||||
//_sharedResourcesWrapper.SendBlind(":FF#");
|
||||
//:FF# Set Focus speed to fastest setting
|
||||
//Returns: Nothing
|
||||
|
||||
//:FS# Set Focus speed to slowest setting
|
||||
//Returns: Nothing
|
||||
|
||||
//:F<n># Autostar, Autostar II – set focuser speed to <n> where <n> is an ASCII digit 1..4
|
||||
//Returns: Nothing
|
||||
//All others – Not Supported
|
||||
_utilities.WaitForMilliseconds(100);
|
||||
|
||||
//A Single focus command sometimes gets lost on the #909, so sending lots of them solves the issue.
|
||||
Stopwatch stopwatch = Stopwatch.StartNew();
|
||||
while (stopwatch.ElapsedMilliseconds < steps)
|
||||
{
|
||||
_sharedResourcesWrapper.SendBlind(directionOut ? ":F+#" : ":F-#");
|
||||
//:F+# Start Focuser moving inward (toward objective)
|
||||
//Returns: None
|
||||
|
||||
//:F-# Start Focuser moving outward (away from objective)
|
||||
//Returns: None
|
||||
|
||||
_utilities.WaitForMilliseconds(250);
|
||||
}
|
||||
|
||||
Halt();
|
||||
|
||||
//This gives the focuser time to physically stop.
|
||||
_utilities.WaitForMilliseconds(1000);
|
||||
});
|
||||
}
|
||||
|
||||
public int Position => throw new PropertyNotImplementedException("Position", false);
|
||||
|
||||
public double StepSize
|
||||
{
|
||||
get
|
||||
{
|
||||
Tl.LogMessage("StepSize Get", "Not implemented");
|
||||
throw new PropertyNotImplementedException("StepSize", false);
|
||||
}
|
||||
}
|
||||
|
||||
public bool TempComp
|
||||
{
|
||||
get
|
||||
{
|
||||
Tl.LogMessage("TempComp Get", false.ToString());
|
||||
return false;
|
||||
}
|
||||
set
|
||||
{
|
||||
Tl.LogMessage("TempComp Set", "Not implemented");
|
||||
throw new PropertyNotImplementedException("TempComp", false);
|
||||
}
|
||||
}
|
||||
|
||||
public bool TempCompAvailable
|
||||
{
|
||||
get
|
||||
{
|
||||
Tl.LogMessage("TempCompAvailable Get", false.ToString());
|
||||
return false; // Temperature compensation is not available in this driver
|
||||
}
|
||||
}
|
||||
|
||||
public double Temperature
|
||||
{
|
||||
get
|
||||
{
|
||||
Tl.LogMessage("Temperature Get", "Not implemented");
|
||||
throw new PropertyNotImplementedException("Temperature", false);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private properties and methods
|
||||
// here are some useful properties and methods that can be used as required
|
||||
// to help with driver development
|
||||
|
||||
#region ASCOM Registration
|
||||
|
||||
// Register or unregister driver for ASCOM. This is harmless if already
|
||||
// registered or unregistered.
|
||||
//
|
||||
/// <summary>
|
||||
/// Register or unregister the driver with the ASCOM Platform.
|
||||
/// This is harmless if the driver is already registered/unregistered.
|
||||
/// </summary>
|
||||
/// <param name="bRegister">If <c>true</c>, registers the driver, otherwise unregisters it.</param>
|
||||
private static void RegUnregAscom(bool bRegister)
|
||||
{
|
||||
using (var p = new Profile())
|
||||
{
|
||||
p.DeviceType = "Focuser";
|
||||
if (bRegister)
|
||||
{
|
||||
p.Register(DriverId, DriverDescription);
|
||||
}
|
||||
else
|
||||
{
|
||||
p.Unregister(DriverId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function registers the driver with the ASCOM Chooser and
|
||||
/// is called automatically whenever this class is registered for COM Interop.
|
||||
/// </summary>
|
||||
/// <param name="t">Type of the class being registered, not used.</param>
|
||||
/// <remarks>
|
||||
/// This method typically runs in two distinct situations:
|
||||
/// <list type="numbered">
|
||||
/// <item>
|
||||
/// In Visual Studio, when the project is successfully built.
|
||||
/// For this to work correctly, the option <c>Register for COM Interop</c>
|
||||
/// must be enabled in the project settings.
|
||||
/// </item>
|
||||
/// <item>During setup, when the installer registers the assembly for COM Interop.</item>
|
||||
/// </list>
|
||||
/// This technique should mean that it is never necessary to manually register a driver with ASCOM.
|
||||
/// </remarks>
|
||||
[ComRegisterFunction]
|
||||
public static void RegisterAscom(Type t)
|
||||
{
|
||||
RegUnregAscom(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function unregisters the driver from the ASCOM Chooser and
|
||||
/// is called automatically whenever this class is unregistered from COM Interop.
|
||||
/// </summary>
|
||||
/// <param name="t">Type of the class being registered, not used.</param>
|
||||
/// <remarks>
|
||||
/// This method typically runs in two distinct situations:
|
||||
/// <list type="numbered">
|
||||
/// <item>
|
||||
/// In Visual Studio, when the project is cleaned or prior to rebuilding.
|
||||
/// For this to work correctly, the option <c>Register for COM Interop</c>
|
||||
/// must be enabled in the project settings.
|
||||
/// </item>
|
||||
/// <item>During uninstall, when the installer unregisters the assembly from COM Interop.</item>
|
||||
/// </list>
|
||||
/// This technique should mean that it is never necessary to manually unregister a driver from ASCOM.
|
||||
/// </remarks>
|
||||
[ComUnregisterFunction]
|
||||
public static void UnregisterAscom(Type t)
|
||||
{
|
||||
RegUnregAscom(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if there is a valid connection to the driver hardware
|
||||
/// </summary>
|
||||
private bool IsConnected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Use this function to throw an exception if we aren't connected to the hardware
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
private void CheckConnected(string message)
|
||||
{
|
||||
if (!IsConnected)
|
||||
{
|
||||
throw new NotConnectedException(message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read the device configuration from the ASCOM Profile store
|
||||
/// </summary>
|
||||
internal void ReadProfile()
|
||||
{
|
||||
var profileProperties = _sharedResourcesWrapper.ReadProfile();
|
||||
Tl.Enabled = profileProperties.TraceLogger;
|
||||
_comPort = profileProperties.ComPort;
|
||||
|
||||
LogMessage("ReadProfile", $"Trace logger enabled: {Tl.Enabled}");
|
||||
LogMessage("ReadProfile", $"Com Port: {_comPort}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Log helper function that takes formatted strings and arguments
|
||||
/// </summary>
|
||||
/// <param name="identifier"></param>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="args"></param>
|
||||
internal static void LogMessage(string identifier, string message, params object[] args)
|
||||
{
|
||||
var msg = string.Format(message, args);
|
||||
Tl.LogMessage(identifier, msg);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{A97E3AEC-F11D-49DA-B259-DE99DA813A86}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ASCOM.Meade.net</RootNamespace>
|
||||
<AssemblyName>ASCOM.Meade.net.Focuser</AssemblyName>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<ApplicationIcon>ASCOM.ico</ApplicationIcon>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>ASCOMDriverTemplate.snk</AssemblyOriginatorKeyFile>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<RegisterForComInterop>true</RegisterForComInterop>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<RegisterForComInterop>true</RegisterForComInterop>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>..\bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ASCOM.Astrometry, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Attributes, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Cache, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Controls, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Exceptions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Internal.Extensions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.SettingsProvider, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities.Video, Version=6.1.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Focuser.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="ASCOM.png" />
|
||||
<None Include="ASCOMDriverTemplate.snk" />
|
||||
<None Include="BootstrapAscomProfileStore.ps1" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Content Include="ASCOM.ico" />
|
||||
<Content Include="ReadMe.htm" />
|
||||
<None Include="Resources\ASCOM.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Meade.net\Meade.net.csproj">
|
||||
<Project>{3689a2cb-94c5-4012-a5cf-7e7d1dd27143}</Project>
|
||||
<Name>Meade.net</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,5 @@
|
||||
<ProjectConfiguration>
|
||||
<Settings>
|
||||
<UseCPUArchitecture>x86</UseCPUArchitecture>
|
||||
</Settings>
|
||||
</ProjectConfiguration>
|
||||
@@ -0,0 +1,38 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
// TODO - Add your authorship information here
|
||||
[assembly: AssemblyTitle("ASCOM.Meade.net.Focuser")]
|
||||
[assembly: AssemblyDescription("ASCOM Focuser driver for Meade.net")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("cjdawson.com")]
|
||||
[assembly: AssemblyProduct("ASCOM Focuser driver for Meade.net")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019 cjdawson.com")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(true)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("4ad7a6d4-6d54-4a9a-bbf3-895353e318f8")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
//
|
||||
// TODO - Set your driver's version here
|
||||
[assembly: AssemblyVersion("0.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.0.0.0")]
|
||||
@@ -0,0 +1,83 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ASCOM.Meade.net.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ASCOM.Meade.net.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ASCOM {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ASCOM", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
||||
/// </summary>
|
||||
internal static System.Drawing.Icon DefaultIcon {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("DefaultIcon", resourceCulture);
|
||||
return ((System.Drawing.Icon)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="ASCOM" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\ASCOM.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="DefaultIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\ASCOM.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ASCOM.Meade.net.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles />
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,147 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
|
||||
<TITLE>Untitled Document</TITLE>
|
||||
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
|
||||
<META NAME="CREATED" CONTENT="0;0">
|
||||
<META NAME="CHANGEDBY" CONTENT="Chris Rowland">
|
||||
<META NAME="CHANGED" CONTENT="20110918;14150500">
|
||||
<STYLE TYPE="text/css">
|
||||
<!--
|
||||
@page { margin: 2cm }
|
||||
P { font-family: "Verdana", "Arial", "Helvetica", sans-serif; font-weight: normal }
|
||||
TD P { font-family: "Verdana", "Arial", "Helvetica", sans-serif; font-weight: normal }
|
||||
H3 { font-family: "Arial", "Helvetica", sans-serif }
|
||||
H2 { font-family: "Arial", "Helvetica", sans-serif }
|
||||
H4 { font-family: "Arial", "Helvetica", sans-serif }
|
||||
TD P.note { background: #33ffff; font-family: "Verdana", "Arial", "Helvetica", sans-serif; font-weight: normal }
|
||||
TD P.underline { font-family: "Verdana", "Arial", "Helvetica", sans-serif; font-weight: normal; text-decoration: underline }
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY LANG="en-GB" DIR="LTR">
|
||||
<TABLE WIDTH=100% BORDER=0 CELLPADDING=4 CELLSPACING=0>
|
||||
<TR>
|
||||
<TD>
|
||||
<H2>ASCOM Focuser Driver (C#)</H2>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P><BR><BR>
|
||||
</P>
|
||||
<H4>You have just created the skeleton of an ASCOM
|
||||
Focuser driver in C#. It produces an in-process
|
||||
(assembly) based driver.</H4>
|
||||
<HR>
|
||||
<P CLASS="note">Prior to developing your first driver, please
|
||||
familiarize yourself with the <A HREF="http://ascom-standards.org/developer.html">developer
|
||||
information we've provided</A> at the ASCOM Initiative web site
|
||||
(internet required).
|
||||
</P>
|
||||
<P CLASS="underline">You must do the following in order to complete
|
||||
your implementation:</P>
|
||||
<OL>
|
||||
<LI><P STYLE="margin-bottom: 0cm">Switch to the Debug configuration
|
||||
and build the template now. It should build without errors.
|
||||
</P>
|
||||
<LI><P STYLE="margin-bottom: 0cm">Add a test project to the
|
||||
solution. There are templates that can be used to add either a
|
||||
console or a Windows Forms application:</P>
|
||||
</OL>
|
||||
<UL>
|
||||
<LI><P STYLE="margin-bottom: 0cm">Select the <FONT FACE="Consolas, monospace">ASCOM
|
||||
Test Forms App (CS)</FONT> or <FONT FACE="Consolas, monospace">ASCOM
|
||||
Test Console App (CS)</FONT> template.</P>
|
||||
<LI><P STYLE="margin-bottom: 0cm">Set a name for the test
|
||||
application and click on OK.</P>
|
||||
<LI><P STYLE="margin-bottom: 0cm">In the Wizard: set the same device
|
||||
type and model name as for the driver and select Create to build the
|
||||
test project.</P>
|
||||
<LI><P STYLE="margin-bottom: 0cm">Set the Test Application to Run at
|
||||
Startup.</P>
|
||||
<LI><P STYLE="margin-bottom: 0cm">Click on Debug and the test
|
||||
application should run. You should be able to select your
|
||||
application in the chooser. Selecting Properties should show the
|
||||
default setup dialog for your driver.</P>
|
||||
<LI><P STYLE="margin-bottom: 0cm">Trying to continue will generate
|
||||
errors because the additional properties have not been implemented.</P>
|
||||
</UL>
|
||||
<OL START=4>
|
||||
<LI><P STYLE="margin-bottom: 0cm">Go through the Driver.cs file and
|
||||
replace the System.NotImplemented exceptions with code to implement
|
||||
your driver's functionality. See the ASCOM IFocuserV3
|
||||
spec. If a property or method is not implemented in your driver the
|
||||
System.NotImplemented exception must be replaced by an
|
||||
ASCOM.PropertyNotImplemented or ASCOM.MethodNotImplemented
|
||||
exception.</P>
|
||||
<LI><P>Customize the Setup Dialog (SetupDialogForm) to provide the
|
||||
settings and other controls for your driver. You can bind settings
|
||||
directly to controls on your dialog form, there's no need to manage
|
||||
settings manually. A custom Settings class takes care of managing
|
||||
your settings behind the scenes.
|
||||
</P>
|
||||
</OL>
|
||||
<H3>Notes:</H3>
|
||||
<UL>
|
||||
<LI><P STYLE="margin-bottom: 0cm">Successfully building the driver,
|
||||
as well as using <FONT FACE="Lucida Console, Courier New, Courier, monospace">regasm</FONT>
|
||||
on the assembly, registers it for both COM and ASCOM (the Chooser).
|
||||
See the code in the ASCOM Registration region of Driver.vb.
|
||||
</P>
|
||||
<LI><P STYLE="margin-bottom: 0cm">Doing a Clean for the project, as
|
||||
well doing a <FONT FACE="Lucida Console, Courier New, Courier, monospace">regasm
|
||||
-u</FONT> on the assembly, unregisters it for both COM and ASCOM
|
||||
(the Chooser).
|
||||
</P>
|
||||
<LI><P>Place a breakpoint in your driver class constructor, then
|
||||
start debugging (go, F5). Your breakpoint will be hit when the test
|
||||
application creates an instance of your driver (after selecting it
|
||||
in the Chooser). You can now single step, examine variables, etc.
|
||||
Please review the test application and make changes and additions to
|
||||
activate various parts of your driver during debugging.</P>
|
||||
<LI><P>The project's Debug configuration is already configured (The
|
||||
test application creates an instance of your driver (after selecting
|
||||
it in the Chooser). You can now single step, examine variables, etc.
|
||||
Please review the test application and feel free to make changes and
|
||||
additions to activate various parts of your driver during debugging.
|
||||
</P>
|
||||
</UL>
|
||||
<DIV ALIGN=RIGHT>
|
||||
<TABLE WIDTH=100% BORDER=0 CELLPADDING=4 CELLSPACING=0>
|
||||
<TR>
|
||||
<TD>
|
||||
<TABLE WIDTH=100% BORDER=0 CELLPADDING=4 CELLSPACING=0>
|
||||
<TR>
|
||||
<TD>
|
||||
<H3>ASCOM Initiative</H3>
|
||||
</TD>
|
||||
<TD>
|
||||
<IMG SRC="ASCOM.png" NAME="graphics1" ALIGN=RIGHT WIDTH=48 HEIGHT=56 BORDER=0></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P><BR><BR>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>The ASCOM Initiative consists of a group of astronomy software
|
||||
developers and instrument vendors whose goals are to promote the
|
||||
driver/client model and scripting automation.
|
||||
</P>
|
||||
<P>See the <A HREF="http://ascom-standards.org/" TARGET="browser">ASCOM
|
||||
web site</A> for more information. Please participate in the
|
||||
<A HREF="http://tech.groups.yahoo.com/group/ASCOM-Talk" TARGET="browser">ASCOM-Talk
|
||||
Yahoo Group</A>.
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</DIV>
|
||||
<P><BR><BR>
|
||||
</P><P>
|
||||
<BR><BR>
|
||||
</P>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="ASCOM.DeviceName.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ASCOM.Platform" version="6.4.2" targetFramework="net40" />
|
||||
</packages>
|
||||
@@ -0,0 +1,136 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.28803.452
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Meade.net", "Meade.net\Meade.net.csproj", "{3689A2CB-94C5-4012-A5CF-7E7D1DD27143}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Meade.net.Telescope", "Meade.net.Telescope\Meade.net.Telescope.csproj", "{64308775-BD4A-469C-BCAB-3ED830B811AF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Meade.net.focuser", "Meade.net.focuser\Meade.net.focuser.csproj", "{A97E3AEC-F11D-49DA-B259-DE99DA813A86}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TelescopeTestConsole", "TelescopeTestConsole\TelescopeTestConsole.csproj", "{D5207217-61C7-4E94-8097-91DBACE57D2A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FocuserTestConsole", "FocuserTestConsole\FocuserTestConsole.csproj", "{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestConsoles", "TestConsoles", "{BF650D97-AF98-4638-9C55-21311C6D88DA}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnitTests", "UnitTests", "{0958D817-269C-44BE-BEFB-F3E6A409DE91}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AstroMath.UnitTests", "AstroMath.UnitTests\AstroMath.UnitTests.csproj", "{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}"
|
||||
EndProject
|
||||
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Meade.net.Setup", "Meade.net.Setup\Meade.net.Setup.wixproj", "{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Meade.net.Telescope.UnitTests", "Meade.net.Telescope.UnitTests\Meade.net.Telescope.UnitTests.csproj", "{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{3689A2CB-94C5-4012-A5CF-7E7D1DD27143}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3689A2CB-94C5-4012-A5CF-7E7D1DD27143}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3689A2CB-94C5-4012-A5CF-7E7D1DD27143}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{3689A2CB-94C5-4012-A5CF-7E7D1DD27143}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{3689A2CB-94C5-4012-A5CF-7E7D1DD27143}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{3689A2CB-94C5-4012-A5CF-7E7D1DD27143}.Debug|x86.Build.0 = Debug|x86
|
||||
{3689A2CB-94C5-4012-A5CF-7E7D1DD27143}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3689A2CB-94C5-4012-A5CF-7E7D1DD27143}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3689A2CB-94C5-4012-A5CF-7E7D1DD27143}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{3689A2CB-94C5-4012-A5CF-7E7D1DD27143}.Release|x64.Build.0 = Release|Any CPU
|
||||
{3689A2CB-94C5-4012-A5CF-7E7D1DD27143}.Release|x86.ActiveCfg = Release|x86
|
||||
{3689A2CB-94C5-4012-A5CF-7E7D1DD27143}.Release|x86.Build.0 = Release|x86
|
||||
{64308775-BD4A-469C-BCAB-3ED830B811AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{64308775-BD4A-469C-BCAB-3ED830B811AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{64308775-BD4A-469C-BCAB-3ED830B811AF}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{64308775-BD4A-469C-BCAB-3ED830B811AF}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{64308775-BD4A-469C-BCAB-3ED830B811AF}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{64308775-BD4A-469C-BCAB-3ED830B811AF}.Debug|x86.Build.0 = Debug|x86
|
||||
{64308775-BD4A-469C-BCAB-3ED830B811AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{64308775-BD4A-469C-BCAB-3ED830B811AF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{64308775-BD4A-469C-BCAB-3ED830B811AF}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{64308775-BD4A-469C-BCAB-3ED830B811AF}.Release|x64.Build.0 = Release|Any CPU
|
||||
{64308775-BD4A-469C-BCAB-3ED830B811AF}.Release|x86.ActiveCfg = Release|x86
|
||||
{64308775-BD4A-469C-BCAB-3ED830B811AF}.Release|x86.Build.0 = Release|x86
|
||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Debug|x86.Build.0 = Debug|x86
|
||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Release|x86.ActiveCfg = Release|x86
|
||||
{A97E3AEC-F11D-49DA-B259-DE99DA813A86}.Release|x86.Build.0 = Release|x86
|
||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|x64.ActiveCfg = Debug|x86
|
||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|x64.Build.0 = Debug|x86
|
||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Debug|x86.Build.0 = Debug|x86
|
||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Release|x64.ActiveCfg = Release|x86
|
||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Release|x86.ActiveCfg = Release|x86
|
||||
{D5207217-61C7-4E94-8097-91DBACE57D2A}.Release|x86.Build.0 = Release|x86
|
||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|x64.ActiveCfg = Debug|x86
|
||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|x64.Build.0 = Debug|x86
|
||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Debug|x86.Build.0 = Debug|x86
|
||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Release|x64.ActiveCfg = Release|x86
|
||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Release|x86.ActiveCfg = Release|x86
|
||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49}.Release|x86.Build.0 = Release|x86
|
||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Debug|x86.Build.0 = Debug|x86
|
||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Release|x64.Build.0 = Release|Any CPU
|
||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Release|x86.ActiveCfg = Release|x86
|
||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95}.Release|x86.Build.0 = Release|x86
|
||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|Any CPU.Build.0 = Debug|x64
|
||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Debug|x86.Build.0 = Debug|x86
|
||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Release|x64.ActiveCfg = Release|x86
|
||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Release|x86.ActiveCfg = Release|x86
|
||||
{8EEB5C25-8394-4257-8E57-CDED47CB6F1B}.Release|x86.Build.0 = Release|x86
|
||||
{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33}.Release|x64.Build.0 = Release|Any CPU
|
||||
{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33}.Release|x86.ActiveCfg = Release|x86
|
||||
{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{D5207217-61C7-4E94-8097-91DBACE57D2A} = {BF650D97-AF98-4638-9C55-21311C6D88DA}
|
||||
{AABC96B8-C462-4B3A-9B5F-2929E3CB7A49} = {BF650D97-AF98-4638-9C55-21311C6D88DA}
|
||||
{AD4959DD-33D7-4C3F-8DB0-7361D8E74A95} = {0958D817-269C-44BE-BEFB-F3E6A409DE91}
|
||||
{B7EEEEFD-5BFF-443D-981C-7B8AB5DFDE33} = {0958D817-269C-44BE-BEFB-F3E6A409DE91}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {3C0509DC-C7F5-48DC-920D-DCFD9C879BD2}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,7 @@
|
||||
<SolutionConfiguration>
|
||||
<Settings>
|
||||
<AllowParallelTestExecution>True</AllowParallelTestExecution>
|
||||
<CopyReferencedAssembliesToWorkspace>True</CopyReferencedAssembliesToWorkspace>
|
||||
<SolutionConfigured>True</SolutionConfigured>
|
||||
</Settings>
|
||||
</SolutionConfiguration>
|
||||
@@ -0,0 +1,16 @@
|
||||
<SolutionConfiguration>
|
||||
<Settings>
|
||||
<AutoEnable>True</AutoEnable>
|
||||
<CurrentEngineMode>Run all tests automatically [Global]</CurrentEngineMode>
|
||||
<MetricsTreeShowTestProjects>False</MetricsTreeShowTestProjects>
|
||||
<StatusIndicatorSplitterDistance>25</StatusIndicatorSplitterDistance>
|
||||
<TestsWindowMenuOptions>
|
||||
<VerticalSplitMenuOption>false</VerticalSplitMenuOption>
|
||||
<ShowPassingTestsMenuOption>false</ShowPassingTestsMenuOption>
|
||||
<ShowFailingTestsMenuOption>true</ShowFailingTestsMenuOption>
|
||||
<ShowUnexecutedTestsMenuOption>true</ShowUnexecutedTestsMenuOption>
|
||||
<ShowIgnoredTestsMenuOption>false</ShowIgnoredTestsMenuOption>
|
||||
</TestsWindowMenuOptions>
|
||||
<TestsWindowSplitterDistance>451</TestsWindowSplitterDistance>
|
||||
</Settings>
|
||||
</SolutionConfiguration>
|
||||
|
After Width: | Height: | Size: 123 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,36 @@
|
||||
<#
|
||||
This script initializes a bare minimum set of registry entries required for ASCOM.Utilities.Profile to work
|
||||
without throwing any exceptions. When building on a build server, or on a computer without the ASCOM Platform installed,
|
||||
it may be useful to execute this script as a build step prior to running any unit tests, or calling any code that relies on
|
||||
ASCOM.Utilities.Profile. The alternative is to install the ASCOM Platform on the build agent.
|
||||
|
||||
NOTE: This script equires elevated permissions because it creates registry keys in the LocalMachine hive.
|
||||
#>
|
||||
|
||||
$wow = Test-Path HKLM:\SOFTWARE\Wow6432Node
|
||||
if ($wow)
|
||||
{
|
||||
$root = "HKLM:\SOFTWARE\Wow6432Node"
|
||||
}
|
||||
else
|
||||
{
|
||||
$root = "HKLM:\SOFTWARE"
|
||||
}
|
||||
$ascomRoot = $root + "\ASCOM"
|
||||
|
||||
if (Test-Path $ascomRoot)
|
||||
{
|
||||
<# Don't upset an already-existing ASCOM registry #>
|
||||
exit
|
||||
}
|
||||
|
||||
<# Create the ASCOM root key and set it's ACL to allow all users read/write access #>
|
||||
New-Item -Path $root -Name ASCOM –Force
|
||||
$ascomAcl = Get-Acl $ascomRoot
|
||||
$aclRule = New-Object System.Security.AccessControl.RegistryAccessRule ("Users","FullControl","Allow")
|
||||
$ascomAcl.SetAccessRule($aclRule)
|
||||
$ascomAcl | Set-Acl -Path $ascomRoot
|
||||
|
||||
<# Now create the bare minimum keys required so that ASCOM.Utilities.Profile doesn't crash and burn #>
|
||||
New-ItemProperty -Path $ascomRoot -Name PlatformVersion -Value "6.1" -PropertyType String –Force
|
||||
New-ItemProperty -Path $ascomRoot -Name SerTraceFile -Value "C:\SerialTraceAuto.txt" -PropertyType String –Force
|
||||
@@ -0,0 +1,233 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
|
||||
#region C# Definition of IClassFactory
|
||||
//
|
||||
// Provide a definition of theCOM IClassFactory interface.
|
||||
//
|
||||
[
|
||||
ComImport, // This interface originated from COM.
|
||||
ComVisible(false), // Must not be exposed to COM!!!
|
||||
InterfaceType(ComInterfaceType.InterfaceIsIUnknown), // Indicate that this interface is not IDispatch-based.
|
||||
Guid("00000001-0000-0000-C000-000000000046") // This GUID is the actual GUID of IClassFactory.
|
||||
]
|
||||
public interface IClassFactory
|
||||
{
|
||||
void CreateInstance(IntPtr pUnkOuter, ref Guid riid, out IntPtr ppvObject);
|
||||
void LockServer(bool fLock);
|
||||
}
|
||||
#endregion
|
||||
|
||||
//
|
||||
// Universal ClassFactory. Given a type as a parameter of the
|
||||
// constructor, it implements IClassFactory for any interface
|
||||
// that the class implements. Magic!!!
|
||||
//
|
||||
public class ClassFactory : IClassFactory
|
||||
{
|
||||
|
||||
#region Access to ole32.dll functions for class factories
|
||||
|
||||
// Define two common GUID objects for public usage.
|
||||
private static readonly Guid _iidIUnknown = new Guid("{00000000-0000-0000-C000-000000000046}");
|
||||
private static readonly Guid _iidIDispatch = new Guid("{00020400-0000-0000-C000-000000000046}");
|
||||
|
||||
[Flags]
|
||||
enum Clsctx : uint
|
||||
{
|
||||
ClsctxInprocServer = 0x1,
|
||||
ClsctxInprocHandler = 0x2,
|
||||
ClsctxLocalServer = 0x4,
|
||||
ClsctxInprocServer16 = 0x8,
|
||||
ClsctxRemoteServer = 0x10,
|
||||
ClsctxInprocHandler16 = 0x20,
|
||||
ClsctxReserved1 = 0x40,
|
||||
ClsctxReserved2 = 0x80,
|
||||
ClsctxReserved3 = 0x100,
|
||||
ClsctxReserved4 = 0x200,
|
||||
ClsctxNoCodeDownload = 0x400,
|
||||
ClsctxReserved5 = 0x800,
|
||||
ClsctxNoCustomMarshal = 0x1000,
|
||||
ClsctxEnableCodeDownload = 0x2000,
|
||||
ClsctxNoFailureLog = 0x4000,
|
||||
ClsctxDisableAaa = 0x8000,
|
||||
ClsctxEnableAaa = 0x10000,
|
||||
ClsctxFromDefaultContext = 0x20000,
|
||||
ClsctxInproc = ClsctxInprocServer | ClsctxInprocHandler,
|
||||
ClsctxServer = ClsctxInprocServer | ClsctxLocalServer | ClsctxRemoteServer,
|
||||
ClsctxAll = ClsctxServer | ClsctxInprocHandler
|
||||
}
|
||||
|
||||
[Flags]
|
||||
enum Regcls : uint
|
||||
{
|
||||
RegclsSingleuse = 0,
|
||||
RegclsMultipleuse = 1,
|
||||
RegclsMultiSeparate = 2,
|
||||
RegclsSuspended = 4,
|
||||
RegclsSurrogate = 8
|
||||
}
|
||||
//
|
||||
// CoRegisterClassObject() is used to register a Class Factory
|
||||
// into COM's internal table of Class Factories.
|
||||
//
|
||||
[DllImport("ole32.dll")]
|
||||
static extern int CoRegisterClassObject(
|
||||
[In] ref Guid rclsid,
|
||||
[MarshalAs(UnmanagedType.IUnknown)] object pUnk,
|
||||
uint dwClsContext,
|
||||
uint flags,
|
||||
out uint lpdwRegister);
|
||||
//
|
||||
// Called by a COM EXE Server that can register multiple class objects
|
||||
// to inform COM about all registered classes, and permits activation
|
||||
// requests for those class objects.
|
||||
// This function causes OLE to inform the SCM about all the registered
|
||||
// classes, and begins letting activation requests into the server process.
|
||||
//
|
||||
[DllImport("ole32.dll")]
|
||||
static extern int CoResumeClassObjects();
|
||||
//
|
||||
// Prevents any new activation requests from the SCM on all class objects
|
||||
// registered within the process. Even though a process may call this API,
|
||||
// the process still must call CoRevokeClassObject for each CLSID it has
|
||||
// registered, in the apartment it registered in.
|
||||
//
|
||||
[DllImport("ole32.dll")]
|
||||
static extern int CoSuspendClassObjects();
|
||||
//
|
||||
// CoRevokeClassObject() is used to unregister a Class Factory
|
||||
// from COM's internal table of Class Factories.
|
||||
//
|
||||
[DllImport("ole32.dll")]
|
||||
static extern int CoRevokeClassObject(uint dwRegister);
|
||||
#endregion
|
||||
|
||||
#region Constructor and Private ClassFactory Data
|
||||
|
||||
private readonly Type _mClassType;
|
||||
private Guid _mClassId;
|
||||
private readonly ArrayList _mInterfaceTypes;
|
||||
private uint _mCookie;
|
||||
private readonly string _mProgid;
|
||||
|
||||
public ClassFactory(Type type)
|
||||
{
|
||||
if (type == null)
|
||||
throw new ArgumentNullException("type");
|
||||
_mClassType = type;
|
||||
|
||||
//PWGS Get the ProgID from the MetaData
|
||||
_mProgid = Marshal.GenerateProgIdForType(type);
|
||||
_mClassId = Marshal.GenerateGuidForType(type); // Should be nailed down by [Guid(...)]
|
||||
ClassContext = (uint)Clsctx.ClsctxLocalServer; // Default
|
||||
Flags = (uint)Regcls.RegclsMultipleuse | // Default
|
||||
(uint)Regcls.RegclsSuspended;
|
||||
_mInterfaceTypes = new ArrayList();
|
||||
foreach (Type T in type.GetInterfaces()) // Save all of the implemented interfaces
|
||||
_mInterfaceTypes.Add(T);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Common ClassFactory Methods
|
||||
public uint ClassContext { get; }
|
||||
|
||||
public Guid ClassId
|
||||
{
|
||||
get => _mClassId;
|
||||
set => _mClassId = value;
|
||||
}
|
||||
|
||||
public uint Flags { get; }
|
||||
|
||||
public bool RegisterClassObject()
|
||||
{
|
||||
// Register the class factory
|
||||
int i = CoRegisterClassObject
|
||||
(
|
||||
ref _mClassId,
|
||||
this,
|
||||
ClassContext,
|
||||
Flags,
|
||||
out _mCookie
|
||||
);
|
||||
return (i == 0);
|
||||
}
|
||||
|
||||
public bool RevokeClassObject()
|
||||
{
|
||||
int i = CoRevokeClassObject(_mCookie);
|
||||
return (i == 0);
|
||||
}
|
||||
|
||||
public static bool ResumeClassObjects()
|
||||
{
|
||||
int i = CoResumeClassObjects();
|
||||
return (i == 0);
|
||||
}
|
||||
|
||||
public static bool SuspendClassObjects()
|
||||
{
|
||||
int i = CoSuspendClassObjects();
|
||||
return (i == 0);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region IClassFactory Implementations
|
||||
//
|
||||
// Implement creation of the type and interface.
|
||||
//
|
||||
void IClassFactory.CreateInstance(IntPtr pUnkOuter, ref Guid riid, out IntPtr ppvObject)
|
||||
{
|
||||
IntPtr nullPtr = new IntPtr(0);
|
||||
ppvObject = nullPtr;
|
||||
|
||||
//
|
||||
// Handle specific requests for implemented interfaces
|
||||
//
|
||||
foreach (Type iType in _mInterfaceTypes)
|
||||
{
|
||||
if (riid == Marshal.GenerateGuidForType(iType))
|
||||
{
|
||||
ppvObject = Marshal.GetComInterfaceForObject(Activator.CreateInstance(_mClassType), iType);
|
||||
return;
|
||||
}
|
||||
}
|
||||
//
|
||||
// Handle requests for IDispatch or IUnknown on the class
|
||||
//
|
||||
if (riid == _iidIDispatch)
|
||||
{
|
||||
ppvObject = Marshal.GetIDispatchForObject(Activator.CreateInstance(_mClassType));
|
||||
return;
|
||||
}
|
||||
else if (riid == _iidIUnknown)
|
||||
{
|
||||
ppvObject = Marshal.GetIUnknownForObject(Activator.CreateInstance(_mClassType));
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Oops, some interface that the class doesn't implement
|
||||
//
|
||||
throw new COMException("No interface", unchecked((int)0x80004002));
|
||||
}
|
||||
}
|
||||
|
||||
void IClassFactory.LockServer(bool bLock)
|
||||
{
|
||||
if (bLock)
|
||||
Server.CountLock();
|
||||
else
|
||||
Server.UncountLock();
|
||||
// Always attempt to see if we need to shutdown this server application.
|
||||
Server.ExitIf();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for GarbageCollection.
|
||||
/// </summary>
|
||||
class GarbageCollection
|
||||
{
|
||||
private bool _mbContinueThread;
|
||||
private readonly int _miInterval;
|
||||
private readonly ManualResetEvent _mEventThreadEnded;
|
||||
|
||||
public GarbageCollection(int iInterval)
|
||||
{
|
||||
_mbContinueThread = true;
|
||||
_miInterval = iInterval;
|
||||
_mEventThreadEnded = new ManualResetEvent(false);
|
||||
}
|
||||
|
||||
public void GcWatch()
|
||||
{
|
||||
// Pause for a moment to provide a delay to make threads more apparent.
|
||||
while (ContinueThread())
|
||||
{
|
||||
GC.Collect();
|
||||
Thread.Sleep(_miInterval);
|
||||
}
|
||||
_mEventThreadEnded.Set();
|
||||
}
|
||||
|
||||
protected bool ContinueThread()
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
return _mbContinueThread;
|
||||
}
|
||||
}
|
||||
|
||||
public void StopThread()
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
_mbContinueThread = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void WaitForThreadToStop()
|
||||
{
|
||||
_mEventThreadEnded.WaitOne();
|
||||
_mEventThreadEnded.Reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,639 @@
|
||||
//
|
||||
// ASCOM.Meade.net Local COM Server
|
||||
//
|
||||
// This is the core of a managed COM Local Server, capable of serving
|
||||
// multiple instances of multiple interfaces, within a single
|
||||
// executable. This implementes the equivalent functionality of VB6
|
||||
// which has been extensively used in ASCOM for drivers that provide
|
||||
// multiple interfaces to multiple clients (e.g. Meade Telescope
|
||||
// and Focuser) as well as hubs (e.g., POTH).
|
||||
//
|
||||
// Written by: Robert B. Denny (Version 1.0.1, 29-May-2007)
|
||||
// Modified by Chris Rowland and Peter Simpson to allow use with multiple devices of the same type March 2011
|
||||
//
|
||||
//
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Reflection;
|
||||
using ASCOM.Utilities;
|
||||
using Microsoft.Win32;
|
||||
using System.Threading;
|
||||
using System.Security.Principal;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
public static class Server
|
||||
{
|
||||
|
||||
#region Access to kernel32.dll, user32.dll, and ole32.dll functions
|
||||
[Flags]
|
||||
enum Clsctx : uint
|
||||
{
|
||||
ClsctxInprocServer = 0x1,
|
||||
ClsctxInprocHandler = 0x2,
|
||||
ClsctxLocalServer = 0x4,
|
||||
ClsctxInprocServer16 = 0x8,
|
||||
ClsctxRemoteServer = 0x10,
|
||||
ClsctxInprocHandler16 = 0x20,
|
||||
ClsctxReserved1 = 0x40,
|
||||
ClsctxReserved2 = 0x80,
|
||||
ClsctxReserved3 = 0x100,
|
||||
ClsctxReserved4 = 0x200,
|
||||
ClsctxNoCodeDownload = 0x400,
|
||||
ClsctxReserved5 = 0x800,
|
||||
ClsctxNoCustomMarshal = 0x1000,
|
||||
ClsctxEnableCodeDownload = 0x2000,
|
||||
ClsctxNoFailureLog = 0x4000,
|
||||
ClsctxDisableAaa = 0x8000,
|
||||
ClsctxEnableAaa = 0x10000,
|
||||
ClsctxFromDefaultContext = 0x20000,
|
||||
ClsctxInproc = ClsctxInprocServer | ClsctxInprocHandler,
|
||||
ClsctxServer = ClsctxInprocServer | ClsctxLocalServer | ClsctxRemoteServer,
|
||||
ClsctxAll = ClsctxServer | ClsctxInprocHandler
|
||||
}
|
||||
|
||||
[Flags]
|
||||
enum Coinit : uint
|
||||
{
|
||||
/// Initializes the thread for multi-threaded object concurrency.
|
||||
CoinitMultithreaded = 0x0,
|
||||
/// Initializes the thread for apartment-threaded object concurrency.
|
||||
CoinitApartmentthreaded = 0x2,
|
||||
/// Disables DDE for Ole1 support.
|
||||
CoinitDisableOle1Dde = 0x4,
|
||||
/// Trades memory for speed.
|
||||
CoinitSpeedOverMemory = 0x8
|
||||
}
|
||||
|
||||
[Flags]
|
||||
enum Regcls : uint
|
||||
{
|
||||
RegclsSingleuse = 0,
|
||||
RegclsMultipleuse = 1,
|
||||
RegclsMultiSeparate = 2,
|
||||
RegclsSuspended = 4,
|
||||
RegclsSurrogate = 8
|
||||
}
|
||||
|
||||
|
||||
// CoInitializeEx() can be used to set the apartment model
|
||||
// of individual threads.
|
||||
[DllImport("ole32.dll")]
|
||||
static extern int CoInitializeEx(IntPtr pvReserved, uint dwCoInit);
|
||||
|
||||
// CoUninitialize() is used to uninitialize a COM thread.
|
||||
[DllImport("ole32.dll")]
|
||||
static extern void CoUninitialize();
|
||||
|
||||
// PostThreadMessage() allows us to post a Windows Message to
|
||||
// a specific thread (identified by its thread id).
|
||||
// We will need this API to post a WM_QUIT message to the main
|
||||
// thread in order to terminate this application.
|
||||
[DllImport("user32.dll")]
|
||||
static extern bool PostThreadMessage(uint idThread, uint msg, UIntPtr wParam,
|
||||
IntPtr lParam);
|
||||
|
||||
// GetCurrentThreadId() allows us to obtain the thread id of the
|
||||
// calling thread. This allows us to post the WM_QUIT message to
|
||||
// the main thread.
|
||||
[DllImport("kernel32.dll")]
|
||||
static extern uint GetCurrentThreadId();
|
||||
#endregion
|
||||
|
||||
#region Private Data
|
||||
private static int _objsInUse; // Keeps a count on the total number of objects alive.
|
||||
private static int _serverLocks; // Keeps a lock count on this application.
|
||||
private static FrmMain _sMainForm = null; // Reference to our main form
|
||||
private static ArrayList _sComObjectAssys; // Dynamically loaded assemblies containing served COM objects
|
||||
private static ArrayList _sComObjectTypes; // Served COM object types
|
||||
private static ArrayList _sClassFactories; // Served COM object class factories
|
||||
private static string _sAppId = "{4e68ec46-5ffc-49e7-b298-38a548df0bfd}"; // Our AppId
|
||||
private static readonly Object LockObject = new object();
|
||||
#endregion
|
||||
|
||||
// This property returns the main thread's id.
|
||||
public static uint MainThreadId { get; private set; } // Stores the main thread's thread id.
|
||||
|
||||
// Used to tell if started by COM or manually
|
||||
public static bool StartedByCom { get; private set; } // True if server started by COM (-embedding)
|
||||
|
||||
|
||||
#region Server Lock, Object Counting, and AutoQuit on COM startup
|
||||
// Returns the total number of objects alive currently.
|
||||
public static int ObjectsCount
|
||||
{
|
||||
get
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
return _objsInUse;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This method performs a thread-safe incrementation of the objects count.
|
||||
public static int CountObject()
|
||||
{
|
||||
// Increment the global count of objects.
|
||||
return Interlocked.Increment(ref _objsInUse);
|
||||
}
|
||||
|
||||
// This method performs a thread-safe decrementation the objects count.
|
||||
public static int UncountObject()
|
||||
{
|
||||
// Decrement the global count of objects.
|
||||
return Interlocked.Decrement(ref _objsInUse);
|
||||
}
|
||||
|
||||
// Returns the current server lock count.
|
||||
public static int ServerLockCount
|
||||
{
|
||||
get
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
return _serverLocks;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This method performs a thread-safe incrementation the
|
||||
// server lock count.
|
||||
public static int CountLock()
|
||||
{
|
||||
// Increment the global lock count of this server.
|
||||
return Interlocked.Increment(ref _serverLocks);
|
||||
}
|
||||
|
||||
// This method performs a thread-safe decrementation the
|
||||
// server lock count.
|
||||
public static int UncountLock()
|
||||
{
|
||||
// Decrement the global lock count of this server.
|
||||
return Interlocked.Decrement(ref _serverLocks);
|
||||
}
|
||||
|
||||
// AttemptToTerminateServer() will check to see if the objects count and the server
|
||||
// lock count have both dropped to zero.
|
||||
//
|
||||
// If so, and if we were started by COM, we post a WM_QUIT message to the main thread's
|
||||
// message loop. This will cause the message loop to exit and hence the termination
|
||||
// of this application. If hand-started, then just trace that it WOULD exit now.
|
||||
//
|
||||
public static void ExitIf()
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
if ((ObjectsCount <= 0) && (ServerLockCount <= 0))
|
||||
{
|
||||
if (StartedByCom)
|
||||
{
|
||||
UIntPtr wParam = new UIntPtr(0);
|
||||
IntPtr lParam = new IntPtr(0);
|
||||
PostThreadMessage(MainThreadId, 0x0012, wParam, lParam);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
// -----------------
|
||||
// PRIVATE FUNCTIONS
|
||||
// -----------------
|
||||
|
||||
#region Dynamic Driver Assembly Loader
|
||||
//
|
||||
// Load the assemblies that contain the classes that we will serve
|
||||
// via COM. These will be located in the same folder as
|
||||
// our executable.
|
||||
//
|
||||
private static bool LoadComObjectAssemblies()
|
||||
{
|
||||
_sComObjectAssys = new ArrayList();
|
||||
_sComObjectTypes = new ArrayList();
|
||||
|
||||
// put everything into one folder, the same as the server.
|
||||
string assyPath = Assembly.GetEntryAssembly().Location;
|
||||
assyPath = Path.GetDirectoryName(assyPath);
|
||||
|
||||
DirectoryInfo d = new DirectoryInfo(assyPath);
|
||||
foreach (FileInfo fi in d.GetFiles("*.dll"))
|
||||
{
|
||||
string aPath = fi.FullName;
|
||||
//
|
||||
// First try to load the assembly and get the types for
|
||||
// the class and the class factory. If this doesn't work ????
|
||||
//
|
||||
try
|
||||
{
|
||||
Assembly so = Assembly.LoadFrom(aPath);
|
||||
//PWGS Get the types in the assembly
|
||||
Type[] types = so.GetTypes();
|
||||
foreach (Type type in types)
|
||||
{
|
||||
// PWGS Now checks the type rather than the assembly
|
||||
// Check to see if the type has the ServedClassName attribute, only use it if it does.
|
||||
MemberInfo info = type;
|
||||
|
||||
object[] attrbutes = info.GetCustomAttributes(typeof(ServedClassNameAttribute), false);
|
||||
if (attrbutes.Length > 0)
|
||||
{
|
||||
//MessageBox.Show("Adding Type: " + type.Name + " " + type.FullName);
|
||||
_sComObjectTypes.Add(type); //PWGS - much simpler
|
||||
_sComObjectAssys.Add(so);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (BadImageFormatException)
|
||||
{
|
||||
// Probably an attempt to load a Win32 DLL (i.e. not a .net assembly)
|
||||
// Just swallow the exception and continue to the next item.
|
||||
continue;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("Failed to load served COM class assembly " + fi.Name + " - " + e.Message,
|
||||
"Meade.net", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region COM Registration and Unregistration
|
||||
//
|
||||
// Test if running elevated
|
||||
//
|
||||
private static bool IsAdministrator
|
||||
{
|
||||
get
|
||||
{
|
||||
WindowsIdentity i = WindowsIdentity.GetCurrent();
|
||||
WindowsPrincipal p = new WindowsPrincipal(i);
|
||||
return p.IsInRole(WindowsBuiltInRole.Administrator);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Elevate by re-running ourselves with elevation dialog
|
||||
//
|
||||
private static void ElevateSelf(string arg)
|
||||
{
|
||||
ProcessStartInfo si = new ProcessStartInfo();
|
||||
si.Arguments = arg;
|
||||
si.WorkingDirectory = Environment.CurrentDirectory;
|
||||
si.FileName = Application.ExecutablePath;
|
||||
si.Verb = "runas";
|
||||
try { Process.Start(si); }
|
||||
catch (System.ComponentModel.Win32Exception)
|
||||
{
|
||||
MessageBox.Show("The Meade.net was not " + (arg == "/register" ? "registered" : "unregistered") +
|
||||
" because you did not allow it.", "Meade.net", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.ToString(), "Meade.net", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Do everything to register this for COM. Never use REGASM on
|
||||
// this exe assembly! It would create InProcServer32 entries
|
||||
// which would prevent proper activation!
|
||||
//
|
||||
// Using the list of COM object types generated during dynamic
|
||||
// assembly loading, it registers each one for COM as served by our
|
||||
// exe/local server, as well as registering it for ASCOM. It also
|
||||
// adds DCOM info for the local server itself, so it can be activated
|
||||
// via an outboiud connection from TheSky.
|
||||
//
|
||||
private static void RegisterObjects()
|
||||
{
|
||||
if (!IsAdministrator)
|
||||
{
|
||||
ElevateSelf("/register");
|
||||
return;
|
||||
}
|
||||
//
|
||||
// If reached here, we're running elevated
|
||||
//
|
||||
|
||||
Assembly assy = Assembly.GetExecutingAssembly();
|
||||
Attribute attr = Attribute.GetCustomAttribute(assy, typeof(AssemblyTitleAttribute));
|
||||
string assyTitle = ((AssemblyTitleAttribute)attr).Title;
|
||||
attr = Attribute.GetCustomAttribute(assy, typeof(AssemblyDescriptionAttribute));
|
||||
string assyDescription = ((AssemblyDescriptionAttribute)attr).Description;
|
||||
|
||||
//
|
||||
// Local server's DCOM/AppID information
|
||||
//
|
||||
try
|
||||
{
|
||||
//
|
||||
// HKCR\APPID\appid
|
||||
//
|
||||
using (RegistryKey key = Registry.ClassesRoot.CreateSubKey("APPID\\" + _sAppId))
|
||||
{
|
||||
key.SetValue(null, assyDescription);
|
||||
key.SetValue("AppID", _sAppId);
|
||||
key.SetValue("AuthenticationLevel", 1, RegistryValueKind.DWord);
|
||||
}
|
||||
//
|
||||
// HKCR\APPID\exename.ext
|
||||
//
|
||||
using (RegistryKey key = Registry.ClassesRoot.CreateSubKey(string.Format("APPID\\{0}",
|
||||
Application.ExecutablePath.Substring(Application.ExecutablePath.LastIndexOf('\\') + 1))))
|
||||
{
|
||||
key.SetValue("AppID", _sAppId);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Error while registering the server:\n" + ex.ToString(),
|
||||
"Meade.net", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// For each of the driver assemblies
|
||||
//
|
||||
foreach (Type type in _sComObjectTypes)
|
||||
{
|
||||
bool bFail = false;
|
||||
try
|
||||
{
|
||||
//
|
||||
// HKCR\CLSID\clsid
|
||||
//
|
||||
string clsid = Marshal.GenerateGuidForType(type).ToString("B");
|
||||
string progid = Marshal.GenerateProgIdForType(type);
|
||||
//PWGS Generate device type from the Class name
|
||||
string deviceType = type.Name;
|
||||
|
||||
using (RegistryKey key = Registry.ClassesRoot.CreateSubKey(string.Format("CLSID\\{0}", clsid)))
|
||||
{
|
||||
key.SetValue(null, progid); // Could be assyTitle/Desc??, but .NET components show ProgId here
|
||||
key.SetValue("AppId", _sAppId);
|
||||
using (RegistryKey key2 = key.CreateSubKey("Implemented Categories"))
|
||||
{
|
||||
key2.CreateSubKey("{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}");
|
||||
}
|
||||
using (RegistryKey key2 = key.CreateSubKey("ProgId"))
|
||||
{
|
||||
key2.SetValue(null, progid);
|
||||
}
|
||||
key.CreateSubKey("Programmable");
|
||||
using (RegistryKey key2 = key.CreateSubKey("LocalServer32"))
|
||||
{
|
||||
key2.SetValue(null, Application.ExecutablePath);
|
||||
}
|
||||
}
|
||||
//
|
||||
// HKCR\CLSID\progid
|
||||
//
|
||||
using (RegistryKey key = Registry.ClassesRoot.CreateSubKey(progid))
|
||||
{
|
||||
key.SetValue(null, assyTitle);
|
||||
using (RegistryKey key2 = key.CreateSubKey("CLSID"))
|
||||
{
|
||||
key2.SetValue(null, clsid);
|
||||
}
|
||||
}
|
||||
//
|
||||
// ASCOM
|
||||
//
|
||||
assy = type.Assembly;
|
||||
|
||||
// Pull the display name from the ServedClassName attribute.
|
||||
attr = Attribute.GetCustomAttribute(type, typeof(ServedClassNameAttribute)); //PWGS Changed to search type for attribute rather than assembly
|
||||
string chooserName = ((ServedClassNameAttribute)attr).DisplayName ?? "MultiServer";
|
||||
using (var p = new Profile())
|
||||
{
|
||||
p.DeviceType = deviceType;
|
||||
p.Register(progid, chooserName);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Error while registering the server:\n" + ex.ToString(),
|
||||
"Meade.net", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||
bFail = true;
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
if (bFail) break;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Remove all traces of this from the registry.
|
||||
//
|
||||
// **TODO** If the above does AppID/DCOM stuff, this would have
|
||||
// to remove that stuff too.
|
||||
//
|
||||
private static void UnregisterObjects()
|
||||
{
|
||||
if (!IsAdministrator)
|
||||
{
|
||||
ElevateSelf("/unregister");
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Local server's DCOM/AppID information
|
||||
//
|
||||
Registry.ClassesRoot.DeleteSubKey(string.Format("APPID\\{0}", _sAppId), false);
|
||||
Registry.ClassesRoot.DeleteSubKey(string.Format("APPID\\{0}",
|
||||
Application.ExecutablePath.Substring(Application.ExecutablePath.LastIndexOf('\\') + 1)), false);
|
||||
|
||||
//
|
||||
// For each of the driver assemblies
|
||||
//
|
||||
foreach (Type type in _sComObjectTypes)
|
||||
{
|
||||
string clsid = Marshal.GenerateGuidForType(type).ToString("B");
|
||||
string progid = Marshal.GenerateProgIdForType(type);
|
||||
string deviceType = type.Name;
|
||||
//
|
||||
// Best efforts
|
||||
//
|
||||
//
|
||||
// HKCR\progid
|
||||
//
|
||||
Registry.ClassesRoot.DeleteSubKey(String.Format("{0}\\CLSID", progid), false);
|
||||
Registry.ClassesRoot.DeleteSubKey(progid, false);
|
||||
//
|
||||
// HKCR\CLSID\clsid
|
||||
//
|
||||
Registry.ClassesRoot.DeleteSubKey(String.Format("CLSID\\{0}\\Implemented Categories\\{{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}}", clsid), false);
|
||||
Registry.ClassesRoot.DeleteSubKey(String.Format("CLSID\\{0}\\Implemented Categories", clsid), false);
|
||||
Registry.ClassesRoot.DeleteSubKey(String.Format("CLSID\\{0}\\ProgId", clsid), false);
|
||||
Registry.ClassesRoot.DeleteSubKey(String.Format("CLSID\\{0}\\LocalServer32", clsid), false);
|
||||
Registry.ClassesRoot.DeleteSubKey(String.Format("CLSID\\{0}\\Programmable", clsid), false);
|
||||
Registry.ClassesRoot.DeleteSubKey(String.Format("CLSID\\{0}", clsid), false);
|
||||
try
|
||||
{
|
||||
//
|
||||
// ASCOM
|
||||
//
|
||||
using (var p = new Profile())
|
||||
{
|
||||
p.DeviceType = deviceType;
|
||||
p.Unregister(progid);
|
||||
}
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Class Factory Support
|
||||
//
|
||||
// On startup, we register the class factories of the COM objects
|
||||
// that we serve. This requires the class facgtory name to be
|
||||
// equal to the served class name + "ClassFactory".
|
||||
//
|
||||
private static bool RegisterClassFactories()
|
||||
{
|
||||
_sClassFactories = new ArrayList();
|
||||
foreach (Type type in _sComObjectTypes)
|
||||
{
|
||||
ClassFactory factory = new ClassFactory(type); // Use default context & flags
|
||||
_sClassFactories.Add(factory);
|
||||
if (!factory.RegisterClassObject())
|
||||
{
|
||||
MessageBox.Show("Failed to register class factory for " + type.Name,
|
||||
"Meade.net", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
ClassFactory.ResumeClassObjects(); // Served objects now go live
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void RevokeClassFactories()
|
||||
{
|
||||
ClassFactory.SuspendClassObjects(); // Prevent race conditions
|
||||
foreach (ClassFactory factory in _sClassFactories)
|
||||
factory.RevokeClassObject();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Command Line Arguments
|
||||
//
|
||||
// ProcessArguments() will process the command-line arguments
|
||||
// If the return value is true, we carry on and start this application.
|
||||
// If the return value is false, we terminate this application immediately.
|
||||
//
|
||||
private static bool ProcessArguments(string[] args)
|
||||
{
|
||||
bool bRet = true;
|
||||
|
||||
//
|
||||
//**TODO** -Embedding is "ActiveX start". Prohibit non_AX starting?
|
||||
//
|
||||
if (args.Length > 0)
|
||||
{
|
||||
|
||||
switch (args[0].ToLower())
|
||||
{
|
||||
case "-embedding":
|
||||
StartedByCom = true; // Indicate COM started us
|
||||
break;
|
||||
|
||||
case "-register":
|
||||
case @"/register":
|
||||
case "-regserver": // Emulate VB6
|
||||
case @"/regserver":
|
||||
RegisterObjects(); // Register each served object
|
||||
bRet = false;
|
||||
break;
|
||||
|
||||
case "-unregister":
|
||||
case @"/unregister":
|
||||
case "-unregserver": // Emulate VB6
|
||||
case @"/unregserver":
|
||||
UnregisterObjects(); //Unregister each served object
|
||||
bRet = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
MessageBox.Show("Unknown argument: " + args[0] + "\nValid are : -register, -unregister and -embedding",
|
||||
"Meade.net", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
StartedByCom = false;
|
||||
|
||||
return bRet;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region SERVER ENTRY POINT (main)
|
||||
//
|
||||
// ==================
|
||||
// SERVER ENTRY POINT
|
||||
// ==================
|
||||
//
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
if (!LoadComObjectAssemblies()) return; // Load served COM class assemblies, get types
|
||||
|
||||
if (!ProcessArguments(args)) return; // Register/Unregister
|
||||
|
||||
// Initialize critical member variables.
|
||||
_objsInUse = 0;
|
||||
_serverLocks = 0;
|
||||
MainThreadId = GetCurrentThreadId();
|
||||
Thread.CurrentThread.Name = "Main Thread";
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
_sMainForm = new FrmMain();
|
||||
if (StartedByCom) _sMainForm.WindowState = FormWindowState.Minimized;
|
||||
|
||||
// Register the class factories of the served objects
|
||||
RegisterClassFactories();
|
||||
|
||||
// Start up the garbage collection thread.
|
||||
GarbageCollection garbageCollector = new GarbageCollection(1000);
|
||||
Thread gcThread = new Thread(new ThreadStart(garbageCollector.GcWatch));
|
||||
gcThread.Name = "Garbage Collection Thread";
|
||||
gcThread.Start();
|
||||
|
||||
//
|
||||
// Start the message loop. This serializes incoming calls to our
|
||||
// served COM objects, making this act like the VB6 equivalent!
|
||||
//
|
||||
try
|
||||
{
|
||||
Application.Run(_sMainForm);
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Revoke the class factories immediately.
|
||||
// Don't wait until the thread has stopped before
|
||||
// we perform revocation!!!
|
||||
RevokeClassFactories();
|
||||
|
||||
// Now stop the Garbage Collector thread.
|
||||
garbageCollector.StopThread();
|
||||
garbageCollector.WaitForThreadToStop();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
using System.Resources;
|
||||
using System.Reflection;
|
||||
|
||||
namespace ASCOM.Meade.net.Localization
|
||||
{
|
||||
internal class LocalisationHelper
|
||||
{
|
||||
private const string LocalizationNamespace = "LocalisationTest.Localization.Resources.Localization";
|
||||
private readonly ResourceManager _resourceManager;
|
||||
|
||||
public LocalisationHelper()
|
||||
{
|
||||
_resourceManager = new ResourceManager(LocalizationNamespace, Assembly.GetExecutingAssembly());
|
||||
|
||||
SetLocalisation(CultureInfo.CurrentCulture.Name);
|
||||
}
|
||||
|
||||
internal void SetLocalisation(string name)
|
||||
{
|
||||
var cultureInfo = new CultureInfo(name);
|
||||
|
||||
//CultureInfo.DefaultThreadCurrentCulture = cultureInfo;
|
||||
//CultureInfo.DefaultThreadCurrentUICulture = cultureInfo;
|
||||
|
||||
Thread.CurrentThread.CurrentCulture = cultureInfo;
|
||||
Thread.CurrentThread.CurrentUICulture = cultureInfo;
|
||||
}
|
||||
|
||||
internal string GetString(string key)
|
||||
{
|
||||
return _resourceManager.GetString(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{3689A2CB-94C5-4012-A5CF-7E7D1DD27143}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ASCOM.Meade.net</RootNamespace>
|
||||
<AssemblyName>ASCOM.Meade.net.Server</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<TargetFrameworkProfile />
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>LocalServer.snk</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>ASCOM.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>..\bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ASCOM.Astrometry, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Attributes, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Cache, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Controls, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Exceptions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Internal.Extensions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.SettingsProvider, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities.Video, Version=6.1.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ClassFactory.cs" />
|
||||
<Compile Include="frmMain.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmMain.Designer.cs">
|
||||
<DependentUpon>frmMain.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GarbageCollection.cs" />
|
||||
<Compile Include="Localization\LocalisationHelper.cs" />
|
||||
<Compile Include="LocalServer.cs" />
|
||||
<Compile Include="ProfileProperties.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TelescopeList.cs" />
|
||||
<Compile Include="Wrapper\SharedResourcesWrapper.cs" />
|
||||
<EmbeddedResource Include="frmMain.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmMain.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ReferenceCountedObject.cs" />
|
||||
<Compile Include="SetupDialogForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SetupDialogForm.designer.cs">
|
||||
<DependentUpon>SetupDialogForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SharedResources.cs" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SetupDialogForm.resx">
|
||||
<DependentUpon>SetupDialogForm.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ASCOM.ico" />
|
||||
<Content Include="ASCOM.png" />
|
||||
<Content Include="ReadMe.htm" />
|
||||
<None Include="BootstrapAscomProfileStore.ps1" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Resources\ASCOM.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="LocalServer.snk" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
public class ProfileProperties
|
||||
{
|
||||
// properies that are part of the profile
|
||||
public string ComPort { get; set; }
|
||||
public bool TraceLogger { get; set; }
|
||||
public double GuideRateArcSecondsPerSecond { get; set; }
|
||||
public string Precision { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("ASCOM Meade.net server")]
|
||||
[assembly: AssemblyDescription("ASCOM multi-interface server for Meade.net")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("cjdawson.com")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019 cjdawson.com")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.0.0.0")]
|
||||
|
||||
[assembly: ComVisibleAttribute(false)]
|
||||
@@ -0,0 +1,73 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ASCOM.Meade.net.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ASCOM.Meade.net.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ASCOM {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ASCOM", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="ASCOM" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\ASCOM.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,666 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"/>
|
||||
<TITLE>Untitled Document</TITLE>
|
||||
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"/>
|
||||
<META NAME="CREATED" CONTENT="0;0"/>
|
||||
<META NAME="CHANGEDBY" CONTENT="Chris Rowland"/>
|
||||
<META NAME="CHANGED" CONTENT="20110422;10442800"/>
|
||||
<META NAME="CHANGEDBY" CONTENT="Chris Rowland"/>
|
||||
<STYLE TYPE="text/css">
|
||||
<!--
|
||||
@page { margin: 2cm }
|
||||
P { font-family: "Verdana", "Arial", "Helvetica", sans-serif; font-weight: normal }
|
||||
TD P { font-family: "Verdana", "Arial", "Helvetica", sans-serif; font-weight: normal }
|
||||
H3 { font-family: "Arial", "Helvetica", sans-serif }
|
||||
H2 { font-family: "Arial", "Helvetica", sans-serif }
|
||||
H4 { font-family: "Arial", "Helvetica", sans-serif }
|
||||
PRE { margin-left: 0.18cm; margin-right: 0.18cm; margin-top: 0.18cm; margin-bottom: 0.18cm; background: #ccffff }
|
||||
PRE.western { font-weight: normal }
|
||||
PRE.cjk { font-family: "NSimSun", monospace; font-weight: normal }
|
||||
PRE.ctl { font-weight: normal }
|
||||
EM.underline { text-decoration: underline }
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY LANG="en-GB" DIR="LTR">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLPADDING="4" CELLSPACING="0" STYLE="page-break-before: always">
|
||||
<TR>
|
||||
<TD>
|
||||
<H2>
|
||||
ASCOM LocalServer (singleton) Host
|
||||
</H2>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P>
|
||||
<BR/>
|
||||
<BR/>
|
||||
|
||||
</P>
|
||||
<H4>
|
||||
You have just created a local server (singleton) host for one or
|
||||
more ASCOM driver classes.
|
||||
</H4>
|
||||
<HR/>
|
||||
<P>
|
||||
This project implements an ASCOM host server for one or more
|
||||
driver classes in a single-instance executable. It can be used to
|
||||
serve multiple instances of a single driver class (hub), provide
|
||||
driver services for multiple devices (e.g., Telescope and Focuser) to
|
||||
multiple applications and allow multiple devices of the same type to
|
||||
be connected. In the latter scenario, the multiple driver classes
|
||||
will often share one or more resources such as the serial connection
|
||||
and a microcontroller in the combined device. From the client's
|
||||
perspective, using the drivers served by the local server is exactly
|
||||
the same as if the drivers are loaded into the client's process space
|
||||
(in-proc servers).
|
||||
</P>
|
||||
<P STYLE="margin-left: 0.42cm; margin-right: 0.42cm; border: 1px solid #000000; padding: 0.21cm">
|
||||
<STRONG>
|
||||
<SPAN STYLE="background: #ffee88">NOTE:</SPAN>
|
||||
</STRONG>
|
||||
<SPAN STYLE="background: #ffee88">
|
||||
Unless you are prepared to handle all of the timing issues that arise
|
||||
when multiple clients are accessing the properties and methods of
|
||||
your driver(s), stop now. Just because the local server serializes
|
||||
the calls to your driver(s)' properties and methods does not mean
|
||||
that there will be no timing or concurrency issues.<BR/>
|
||||
<BR/>For
|
||||
example, suppose the hub serves instances of a Telescope driver. One
|
||||
client sets the TargetRightAscension property, then another sets
|
||||
TargetRightAscension to a different value, then the first client sets
|
||||
TargetDeclination, then the first client calls SlewToTarget()
|
||||
followed by the second client calling SlewToTarget(). Besides the
|
||||
first client's slew command sending the scope to the wrong (and
|
||||
possibly dangerous) coordinates, there is the problem of the second
|
||||
client trying to slew a slewing scope. Local server drivers are
|
||||
tricky to get right. There is no such thing as "ignorance is
|
||||
bliss" here.
|
||||
|
||||
</SPAN>
|
||||
</P>
|
||||
<P STYLE="margin-left: 0.42cm; margin-right: 0.42cm; border: 1px solid #000000; padding: 0.21cm">
|
||||
<SPAN STYLE="background: #ffee88">
|
||||
This implementation has changed
|
||||
from what was defined for Platform 5.5 as follows:
|
||||
</SPAN>
|
||||
</P>
|
||||
<P STYLE="margin-left: 0.42cm; margin-right: 0.42cm; border: 1px solid #000000; padding: 0.21cm">
|
||||
<SPAN STYLE="background: #ffee88">
|
||||
The drivers are now installed in
|
||||
the same folder as the local server executable. This makes deployment
|
||||
cleaner because the whole driver can exist in a single folder
|
||||
independently of other drivers.
|
||||
</SPAN>
|
||||
</P>
|
||||
<P STYLE="margin-left: 0.42cm; margin-right: 0.42cm; border: 1px solid #000000; padding: 0.21cm">
|
||||
<SPAN STYLE="background: #ffee88">
|
||||
The ProgId and friendly name as
|
||||
displayed by the Chooser are defined using attributes. This allows
|
||||
driver dlls to be identified clearly and so avoids confusion with
|
||||
other dlls that may be required such as interop dlls.
|
||||
</SPAN>
|
||||
</P>
|
||||
<P STYLE="margin-left: 0.42cm; margin-right: 0.42cm; border: 1px solid #000000; padding: 0.21cm">
|
||||
<SPAN STYLE="background: #ffee88">
|
||||
Some changes have been made that
|
||||
will facilitate generating multiple drivers of the same type.
|
||||
</SPAN>
|
||||
</P>
|
||||
<P STYLE="margin-left: 0.42cm; margin-right: 0.42cm; border: 1px solid #000000; padding: 0.21cm">
|
||||
<SPAN STYLE="background: #ffee88">
|
||||
I've put some additional advice and
|
||||
comments in the notes below <I>in italics.</I>
|
||||
</SPAN>
|
||||
</P>
|
||||
<P>
|
||||
You're probably anxious to get going, but you really should read
|
||||
through the <A HREF="#theory">Theory of Operation</A> and <A HREF="#details">
|
||||
Detailed
|
||||
Use and Deployment
|
||||
</A> below.
|
||||
</P>
|
||||
<P>You must do the following in order to complete your local server:</P>
|
||||
<OL>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
In the local server's project
|
||||
properties, Application tab, change BOTH the AssemblyName and the
|
||||
default assembly name to ASCOM.xxx (e.g., ASCOM.SuperScope). <I>
|
||||
This
|
||||
may be done by default now.
|
||||
</I>
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
Add one or more driver skeleton
|
||||
projects using the in-proc templates. You may use either the C# or
|
||||
VB templates. Project name is not important (not used in ProgID)
|
||||
choose something like TelescopeDriver. You will be changing the
|
||||
substituted project name in these projects below. If you ensure that
|
||||
the LocalServer and all the driver projects have the same NameSpace
|
||||
e.g. ASCOM.SuperScope the renaming in section 6a will not be
|
||||
required.
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
Develop and debug these driver
|
||||
projects as normal in-process assemblies. This will be much simpler
|
||||
because the driver and test code can be debugged in the same
|
||||
process.
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
Build the LocalServer.
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
Set a reference to the local
|
||||
server <STRONG>project</STRONG> in each of the driver skeleton
|
||||
projects.
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">In each skeleton driver project:</P>
|
||||
<OL TYPE="a">
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
Do a Find In Files for the
|
||||
project name of the skeleton driver (e.g., TelescopeDriver) and
|
||||
change it to match the project name of your local server (e.g.
|
||||
SuperScope). You don't have to do this in the ReadMe.html file.
|
||||
Everywhere else, however, is IMPORTANT. This sets the correct
|
||||
namespace, progID, etc. If you're a bit more brave, you can use
|
||||
Replace in Files. <I>
|
||||
This may not be needed if the correct
|
||||
namespace and naming conventions have been followed when the
|
||||
drivers and local server were generated.
|
||||
</I>
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
In project properties,
|
||||
Application tab, change the assembly name to
|
||||
ASCOM.<EM CLASS="underline">localserverprojectname</EM>.<EM>drivertype</EM>,
|
||||
(e.g., ASCOM.SuperScope.Telescope).
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
In project properties,
|
||||
Application tab, click Assembly Information...
|
||||
</P>
|
||||
<UL>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
Assure that Make assembly COM
|
||||
visible is <STRONG>on</STRONG> (it should already be on).
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
Edit the Product Name to be the
|
||||
"friendly name" of your driver as will be shown in the
|
||||
Chooser. <I>
|
||||
Not used now, use the ServedClassName attribute
|
||||
instead.
|
||||
</I>
|
||||
</P>
|
||||
</LI>
|
||||
</UL>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
In project properties, Build tab,
|
||||
turn <STRONG>off</STRONG> Register for COM Interop.
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P>
|
||||
Modify the driver class declaration to inherit from
|
||||
ReferenceCountedObjectBase. Examples:<BR/>C#:
|
||||
</P>
|
||||
<PRE CLASS="western">
|
||||
public class Telescope :
|
||||
ReferenceCountedObjectBase,
|
||||
ITelescope
|
||||
</PRE>
|
||||
<P>
|
||||
VB:
|
||||
</P>
|
||||
<PRE CLASS="western">
|
||||
Public Class Telescope
|
||||
'==================================
|
||||
Inherits ReferenceCountedObjectBase
|
||||
Implements ITelescope
|
||||
'==================================
|
||||
</PRE>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
In driver.cs/driver.vb, remove
|
||||
the entire ASCOM Registration region
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
In driver.cs/driver.vb, remove
|
||||
the private strings for driver ID and driver description. <I>
|
||||
They
|
||||
may be needed internally, and if so should be set from the
|
||||
associated attributes, ServedClassName for the description and
|
||||
ProgId for the driver Id.
|
||||
</I>
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
Modify the class attributes by
|
||||
adding the ServedClassName and ProgID attributes. The
|
||||
ServedClassName attribute must be the friendly name shown as the
|
||||
device name in the Chooser and the ProgId the progid of the driver
|
||||
e.g. ASCOM.SuperScope.Telescope. The class header should look like
|
||||
this:
|
||||
</P>
|
||||
<P STYLE="margin-bottom: 0cm">C#:</P>
|
||||
<PRE CLASS="western" STYLE="margin-right: 0.16cm">
|
||||
<FONT FACE="Consolas" SIZE="2" STYLE="font-size: 9pt">
|
||||
[<FONT COLOR="#2b91af">Guid</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#a31515">"0AE8B38D-10A1-4A8D-A5B7-1B050F74B48B"</FONT><FONT COLOR="#000000">)] // set by the template</FONT>
|
||||
<FONT COLOR="#000000">[</FONT><FONT COLOR="#2b91af">ProgId</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#a31515">"ASCOM.SuperScope.Telescope"</FONT><FONT COLOR="#000000">)]</FONT>
|
||||
<FONT COLOR="#000000">[</FONT><FONT COLOR="#2b91af">ServedClassName</FONT><FONT COLOR="#000000"> (</FONT><FONT COLOR="#a31515">"Super Scope Telescope"</FONT><FONT COLOR="#000000">)]</FONT>
|
||||
<FONT COLOR="#000000">[</FONT><FONT COLOR="#2b91af">ClassInterface</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#2b91af">ClassInterfaceType</FONT><FONT COLOR="#000000">.None)]</FONT>
|
||||
<FONT COLOR="#0000ff">public </FONT><FONT COLOR="#0000ff">class </FONT><FONT COLOR="#2b91af">Telescope </FONT><FONT COLOR="#000000">: </FONT><FONT COLOR="#2b91af">ReferenceCountedObjectBase</FONT><FONT COLOR="#000000"> , </FONT><FONT COLOR="#2b91af">ITelescope</FONT>
|
||||
</FONT>
|
||||
</PRE>
|
||||
</LI>
|
||||
</OL>
|
||||
</LI>
|
||||
</OL>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
<BR/>
|
||||
</P>
|
||||
<OL>
|
||||
<OL TYPE="a">
|
||||
<P>VB:</P>
|
||||
<PRE CLASS="western">
|
||||
<FONT FACE="Consolas" SIZE="2" STYLE="font-size: 9pt">
|
||||
<Guid(“<FONT COLOR="#a31515">0AE8B38D-10A1-4A8D-A5B7-1B050F74B48B</FONT>”)>
|
||||
<ProgId(“ASCOM.SuperScope.Telescope”)>
|
||||
<ServedClassName(“Super Scope Telescope”)>
|
||||
Public Class Telescope
|
||||
'==================================
|
||||
Inherits ReferenceCountedObjectBase
|
||||
Implements ITelescope
|
||||
'==================================
|
||||
</FONT>
|
||||
</PRE>
|
||||
</OL>
|
||||
</OL>
|
||||
<P STYLE="margin-left: 2.5cm">
|
||||
Add the following line to the driver
|
||||
constructor, this sets the driver ID using the ProgId Attribute:
|
||||
</P>
|
||||
<OL>
|
||||
<OL TYPE="a">
|
||||
<P>C#</P>
|
||||
<PRE CLASS="western">
|
||||
<FONT FACE="Consolas" SIZE="2" STYLE="font-size: 9pt">
|
||||
s_csDriverID = <FONT COLOR="#2b91af">Marshal</FONT><FONT COLOR="#000000">.GenerateProgIdForType(</FONT><FONT COLOR="#0000ff">this</FONT><FONT COLOR="#000000">.GetType());</FONT>
|
||||
</FONT>
|
||||
</PRE>
|
||||
<P>VB:</P>
|
||||
<PRE CLASS="western">
|
||||
<FONT FACE="Consolas" SIZE="2" STYLE="font-size: 9pt">
|
||||
s_csDriverID = <FONT COLOR="#2b91af">Marshal</FONT><FONT COLOR="#000000">.GenerateProgIdForType(</FONT><FONT COLOR="#0000ff">Me</FONT><FONT COLOR="#000000">.GetType())</FONT>
|
||||
</FONT>
|
||||
</PRE>
|
||||
</OL>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
Unless you're writing a
|
||||
single-driver hub, you will have two or more driver types (e.g.
|
||||
Telescope and Focuser) and thus two or more driver assembly projects
|
||||
added. Presumably, these drivers need to share some resources (e.g.
|
||||
a single COM port via Helper.Serial). <U>
|
||||
Put shared resources into
|
||||
the SharedResources class provided
|
||||
</U>. There are some examples that
|
||||
should give a clue, modify and delete these as required.
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
A shared serial port is already
|
||||
provided (see SharedResources.cs) as <FONT FACE="Lucida Console, Courier New, Courier, monospace">SharedResources.SharedSerial</FONT>
|
||||
and it is an ASCOM Helper Serial object. You may wish to define
|
||||
additional shared resources in static member variables with public
|
||||
static accessor properties as is already done for SharedSerial.
|
||||
Unfortunately, if you are a Visual Basic programmer, you will have
|
||||
to make these additions in C#.
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
If you are writing a hub and don't
|
||||
need the serial port, in SharedResources.cs you can remove the
|
||||
public static SharedSerial property, the m_SharedSerial member in
|
||||
the private data region, and the line in main that initializes it.
|
||||
If you don't need any other shared resources for your hub, then you
|
||||
can remove the SharedResources.cs file completely.
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
If you modified the LocalServer,
|
||||
build it again now. This will refresh the stuff that's visible to
|
||||
the drivers.
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
Build the driver skeletons to
|
||||
verify that you got all of the namespace and other variable changes.
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P>
|
||||
The local server dynamically loads the driver assemblies from
|
||||
the same folder as the local server executable. <BR/>
|
||||
<BR/>During
|
||||
development, you'll need to add a post-build task to each of your
|
||||
driver assembly projects which puts a copy of the driver assembly
|
||||
into the local server executable folder. Here is an example:
|
||||
</P>
|
||||
<PRE CLASS="western"> copy "$(TargetPath)" "$(SolutionDir)\SuperScope\$(OutDir)\$(TargetFileName)"</PRE>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
This assumes that the server project is called “SuperScope”,
|
||||
and handles using the debug or release build.<BR/>
|
||||
Note the quotes for
|
||||
possible path elements with spaces in them. <I>
|
||||
An alternative is to
|
||||
set the build path to the required destination instead of the
|
||||
default path.
|
||||
</I>
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
<I>
|
||||
Make sure the drivers are
|
||||
registered through the local server by running it with the /register
|
||||
parameter, see below for details.
|
||||
</I>
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
<SPAN STYLE="background: #ffff00">IMPORTANT:</SPAN>
|
||||
With a local server based driver (or hub) it is possible for
|
||||
multiple clients to control the device(s). It is up to you to
|
||||
safeguard against abuse. <I>
|
||||
The sort of thing that's needed is to
|
||||
have a counter of the number of connections to a device, the
|
||||
connection is only fully broken when the number of connections is
|
||||
zero. You may also need code to prevent several drivers from talking
|
||||
to the hardware at the same time, the lock pattern is useful for
|
||||
that.
|
||||
</I>
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P>
|
||||
You may want to add controls and/or status information to the
|
||||
main form frmMain of the local server. Please resist the temptation
|
||||
to turn the local server's main form into a graphical device control
|
||||
panel. Instead, make a separate application that uses the served
|
||||
driver(s). <U>A driver is not a program!</U>
|
||||
</P>
|
||||
</LI>
|
||||
</OL>
|
||||
<H3>Notes</H3>
|
||||
<UL>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
The local server handles all of
|
||||
the registration and unregistration for each of its served driver
|
||||
classes, including the ASCOM Chooser info and the DCOM/AppID info
|
||||
needed for activation from TheSky. By running the server from a
|
||||
command line and giving /register or /unregister as the command line
|
||||
option, it will register or unregister all served classes
|
||||
(respectively). <SPAN STYLE="background: #ffff00">
|
||||
Never use REGASM
|
||||
on the local server executable!
|
||||
</SPAN> <I>
|
||||
This can be done in the
|
||||
Visual Studio IDE by setting the server project to run as startup
|
||||
and setting the command line argument to /register in Debug –
|
||||
Start Options.
|
||||
</I>
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
When you make the installer for
|
||||
your local server based driver/hub, do not let it register the
|
||||
executable for COM. Instead, have it activate the installed local
|
||||
server with the /register option.
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P>
|
||||
The ASCOM registration uses the ServedClassName attribute as
|
||||
the friendly name that will show in the chooser and the ProgId
|
||||
attribute as the driver Id.
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P>
|
||||
The best deployment way is to install all the files in a
|
||||
folder that's a sub folder of the main driver, so the SuperScope
|
||||
driver files will be in the folder ...\ASCOM\Telescope\SuperScope.
|
||||
This can be done in the Inno script by changing the DefaultDirName
|
||||
like this:<BR/>
|
||||
DefaultDirName="{cf}\ASCOM\Telescope\SuperScope"<BR/>then
|
||||
the files can all be installed with DestDir: {app};
|
||||
</P>
|
||||
</LI>
|
||||
</UL>
|
||||
<H3>
|
||||
<A NAME="theory"></A>Theory of Operation
|
||||
</H3>
|
||||
<P>
|
||||
The local server is an executable which can provide multiple
|
||||
instances of multiple drivers to multiple clients. This capability is
|
||||
needed for two applications:
|
||||
</P>
|
||||
<UL>
|
||||
<LI>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
A hub, which allows multiple
|
||||
clients to share a single device
|
||||
</P>
|
||||
</LI>
|
||||
<LI>
|
||||
<P>
|
||||
A device which provides multiple services, such as a
|
||||
telescope which has a focuser built-in where both the telescope and
|
||||
focuser are controlled by the same serial connection and different
|
||||
client programs need to control to the focuser and telescope.
|
||||
</P>
|
||||
</LI>
|
||||
</UL>
|
||||
<P>
|
||||
By simply dropping suitably developed driver assemblies into the
|
||||
same folder as the local server executable, the local server will
|
||||
find them and register them for COM and ASCOM and serve any number of
|
||||
instances of the drivers' interfaces to any number of client
|
||||
programs. It does this by locating and loading the driver assemblies,
|
||||
analysing them to detect their classes and interfaces, and
|
||||
implementing a class factory that can create instances of them for
|
||||
clients.
|
||||
</P>
|
||||
<P>
|
||||
A driver is an assembly which contains a class that <EM>implements</EM>
|
||||
one of the ASCOM standard driver interfaces and <EM>inherits</EM> the
|
||||
ReferenceCountedObjectBase class of the local server. Apart from
|
||||
that, driver assemblies are identical to those that are used
|
||||
in-process (DLL-type). The instructions above detail the steps needed
|
||||
to convert an in-process driver into one that can be served by the
|
||||
local server.
|
||||
</P>
|
||||
<P>
|
||||
The name of the local server is important, so we provide it as a
|
||||
<EM>template</EM> from which you can create a local server for your
|
||||
produce. To make this clear, let's assume that your company AlphaTech
|
||||
produces a telescope system which contains a microcontroller that is
|
||||
able to control not only the telescope mount, but also a focuser and
|
||||
a camera rotator. The mount, focuser, and rotator are all controlled
|
||||
via commands sent through a common serial line connecting the
|
||||
computer to the microcontroller, so you need a local server. In
|
||||
ASCOM, then, you probably want your system to appear as
|
||||
AlphaTech.Telescope, AlphaTech.Focuser, and AlphaTech.Rotator. Then
|
||||
you would name the local server AlphaTech. Be sure to give this due
|
||||
consideration before creating the template, the project name is the
|
||||
name of your local server. <I>
|
||||
Is this still correct? I get the
|
||||
impression that ASCOM.AlphaTech.Server would be OK.
|
||||
</I>
|
||||
</P>
|
||||
<P>
|
||||
The fact that driver classes inherit from the local server's
|
||||
ReferenceCountedObjectBase class allows the local server to maintain
|
||||
a reference count on the driver class. If a client creates an
|
||||
instance of a served driver, the local server automatically starts up
|
||||
and provides an instance of the class to the client. Once started the
|
||||
local server can provide additional instances of any of its served
|
||||
driver classes. If the reference count of all served classes drops to
|
||||
zero as a result of clients releasing their instances, the local
|
||||
server will automatically exit.
|
||||
</P>
|
||||
<P>
|
||||
Registration services provided include not only the basic COM
|
||||
class registration, but also DCOM/AppID info needed to use the served
|
||||
classes from outbound connections from Software Bisque's TheSky. It
|
||||
also registers the served classes for the ASCOM Chooser. The
|
||||
"friendly" name of each served driver that appears in the
|
||||
chooser comes from the driver's ServedClassName attribute. This also
|
||||
used to identify a driver so that non driver dlls, such as Interop
|
||||
dlls can be ignored. The COM ProgID for each served driver is
|
||||
specified in the ProgId attribute - ASCOM.<EM>localservername</EM>.<EM>drivertype</EM>,
|
||||
for example, ASCOM.AlphaTech.Telescope, where AlphaTech is the local
|
||||
server name and Telescope is the type of the driver. Unregistering
|
||||
removes all of this information from the system. Specifying the
|
||||
ProgId as an attribute allows multiple driver assemblies to be
|
||||
generated using the same source and namespace. This is used to
|
||||
provide multiple instances of the same driver, each with a different
|
||||
ProgId and so able to be registered separately.
|
||||
</P>
|
||||
<P>
|
||||
Driver DLLs are identified for registering/unregistering because
|
||||
they contain a type with the ServedClassName attribute. Only these
|
||||
will be registered for Com and ASCOM. This has changed; in Platform
|
||||
5 there was no attribute and the local server attempted to register
|
||||
all dlls. The new behaviour allows support dlls such as interop dlls
|
||||
to be included without them being registered incorrectly. There was
|
||||
also an interim version where the ServedClassName attribute was on
|
||||
the assembly, not the class. <I>
|
||||
All these previous versions, and the
|
||||
new drivers will operate together with Platform 6, the changes are
|
||||
local to the individual drivers.
|
||||
</I>
|
||||
</P>
|
||||
<H3>
|
||||
<A NAME="details"></A>Detailed Use and Deployment
|
||||
</H3>
|
||||
<P>
|
||||
Once you have built your local server and the served driver class
|
||||
assemblies, here's how to use it. To register the served classes,
|
||||
activate the local server from a shell command line with the option
|
||||
/register (or /regserver, for VB6 compatibility):
|
||||
</P>
|
||||
<PRE CLASS="western">
|
||||
C:\xxx> <EM>localserver</EM>.exe /register
|
||||
</PRE>
|
||||
<P>
|
||||
To unregister the local server and its drivers, activate the local
|
||||
server from a shell command line with the option /unregister (or
|
||||
/unregserver for VB6 compatibility):
|
||||
</P>
|
||||
<PRE CLASS="western">
|
||||
C:\xxx> <EM>localserver</EM>.exe /unregister
|
||||
</PRE>
|
||||
<P>
|
||||
When the operating system starts the local server in response to a
|
||||
client creating one of it's served driver classes, the command option
|
||||
/embedding is included. The local server's code detects this and sets
|
||||
a variable that you can use.
|
||||
</P>
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
When deploying a hub or set of drivers
|
||||
with the local server, you'll have to arrange for the local server
|
||||
and the driver assemblies to be placed together in a folder in the
|
||||
ASCOM driver folder. Any support files, such as Interop DLLs can be
|
||||
put in the same fiolder. That's all you need to do, the local server
|
||||
will find them in the same folder as it is located in.
|
||||
</P>
|
||||
<DIV ALIGN="RIGHT">
|
||||
<TABLE WIDTH="100"% BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD>
|
||||
<TABLE WIDTH="100"% BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD>
|
||||
<H3>ASCOM Initiative</H3>
|
||||
</TD>
|
||||
<TD>
|
||||
<IMG SRC="ASCOM.png" NAME="graphics1" ALIGN="RIGHT" WIDTH="48" HEIGHT="56" BORDER="0"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P>
|
||||
<BR/>
|
||||
<BR/>
|
||||
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>
|
||||
The ASCOM Initiative consists of a group of astronomy software
|
||||
developers and instrument vendors whose goals are to promote the
|
||||
driver/client model and scripting automation.
|
||||
</P>
|
||||
<P>
|
||||
See the <A HREF="http://ascom-standards.org/" TARGET="browser">
|
||||
ASCOM
|
||||
web site
|
||||
</A> for more information. Please participate in the
|
||||
<A HREF="http://tech.groups.yahoo.com/group/ASCOM-Talk" TARGET="browser">
|
||||
ASCOM-Talk
|
||||
Yahoo Group
|
||||
</A>.
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</DIV>
|
||||
<P>
|
||||
<BR/>
|
||||
<BR/>
|
||||
|
||||
</P>
|
||||
<P>
|
||||
<BR/>
|
||||
<BR/>
|
||||
|
||||
</P>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,23 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
[ComVisible(false)]
|
||||
public class ReferenceCountedObjectBase
|
||||
{
|
||||
public ReferenceCountedObjectBase()
|
||||
{
|
||||
// We increment the global count of objects.
|
||||
Server.CountObject();
|
||||
}
|
||||
|
||||
~ReferenceCountedObjectBase()
|
||||
{
|
||||
// We decrement the global count of objects.
|
||||
Server.UncountObject();
|
||||
// We then immediately test to see if we the conditions
|
||||
// are right to attempt to terminate this server application.
|
||||
Server.ExitIf();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
@@ -0,0 +1,114 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
[ComVisible(false)] // Form not registered for COM!
|
||||
public partial class SetupDialogForm : Form
|
||||
{
|
||||
public SetupDialogForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void cmdCancel_Click(object sender, EventArgs e) // Cancel button event handler
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void BrowseToAscom(object sender, EventArgs e) // Click on ASCOM logo event handler
|
||||
{
|
||||
try
|
||||
{
|
||||
System.Diagnostics.Process.Start("http://ascom-standards.org/");
|
||||
}
|
||||
catch (Win32Exception noBrowser)
|
||||
{
|
||||
if (noBrowser.ErrorCode == -2147467259)
|
||||
MessageBox.Show(noBrowser.Message);
|
||||
}
|
||||
catch (Exception other)
|
||||
{
|
||||
MessageBox.Show(other.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetProfile(ProfileProperties profileProperties)
|
||||
{
|
||||
chkTrace.Checked = profileProperties.TraceLogger;
|
||||
// set the list of com ports to those that are currently available
|
||||
comboBoxComPort.Items.Clear();
|
||||
comboBoxComPort.Items.AddRange(System.IO.Ports.SerialPort
|
||||
.GetPortNames()); // use System.IO because it's static
|
||||
// select the current port if possible
|
||||
if (comboBoxComPort.Items.Contains(profileProperties.ComPort))
|
||||
{
|
||||
comboBoxComPort.SelectedItem = profileProperties.ComPort;
|
||||
}
|
||||
|
||||
txtGuideRate.Text = profileProperties.GuideRateArcSecondsPerSecond.ToString();
|
||||
try
|
||||
{
|
||||
cboPrecision.SelectedItem = profileProperties.Precision;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
cboPrecision.SelectedItem = "Unchanged";
|
||||
}
|
||||
}
|
||||
|
||||
public ProfileProperties GetProfile()
|
||||
{
|
||||
var profileProperties = new ProfileProperties
|
||||
{
|
||||
TraceLogger = chkTrace.Checked,
|
||||
ComPort = comboBoxComPort.SelectedItem.ToString(),
|
||||
GuideRateArcSecondsPerSecond = double.Parse(txtGuideRate.Text.Trim()),
|
||||
Precision = cboPrecision.SelectedItem.ToString()
|
||||
};
|
||||
|
||||
return profileProperties;
|
||||
}
|
||||
|
||||
private void SetupDialogForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
Activate();
|
||||
}
|
||||
|
||||
private bool _guideRateValid = true;
|
||||
|
||||
private void TextBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//const double SIDRATE = 0.9972695677; //synodic/solar seconds per sidereal second
|
||||
try
|
||||
{
|
||||
double newGuideRate = double.Parse(txtGuideRate.Text.Trim());
|
||||
|
||||
const double siderealArcSecondsPerSecond = 15.041;
|
||||
var percentOfSideReal = (newGuideRate / siderealArcSecondsPerSecond * 100);
|
||||
|
||||
lblPercentOfSiderealRate.Text = $"({percentOfSideReal:00.0}% of sidereal rate)";
|
||||
_guideRateValid = true;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
//Surpressing this exception as if the value is not valid then it's not useful.
|
||||
_guideRateValid = false;
|
||||
}
|
||||
|
||||
UpdateOKButton();
|
||||
}
|
||||
|
||||
private void UpdateOKButton()
|
||||
{
|
||||
cmdOK.Enabled = _guideRateValid && (comboBoxComPort.SelectedItem != null);
|
||||
}
|
||||
|
||||
private void ComboBoxComPort_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateOKButton();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace ASCOM.MeadeAutostar497
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
partial class SetupDialogForm
|
||||
{
|
||||
@@ -28,6 +28,7 @@ namespace ASCOM.MeadeAutostar497
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetupDialogForm));
|
||||
this.cmdOK = new System.Windows.Forms.Button();
|
||||
this.cmdCancel = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
@@ -35,87 +36,110 @@ namespace ASCOM.MeadeAutostar497
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.chkTrace = new System.Windows.Forms.CheckBox();
|
||||
this.comboBoxComPort = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.txtGuideRate = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.lblPercentOfSiderealRate = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.cboPrecision = new System.Windows.Forms.ComboBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picASCOM)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// cmdOK
|
||||
//
|
||||
this.cmdOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
resources.ApplyResources(this.cmdOK, "cmdOK");
|
||||
this.cmdOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.cmdOK.Location = new System.Drawing.Point(281, 112);
|
||||
this.cmdOK.Name = "cmdOK";
|
||||
this.cmdOK.Size = new System.Drawing.Size(59, 24);
|
||||
this.cmdOK.TabIndex = 0;
|
||||
this.cmdOK.Text = "OK";
|
||||
this.cmdOK.UseVisualStyleBackColor = true;
|
||||
this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click);
|
||||
//
|
||||
// cmdCancel
|
||||
//
|
||||
this.cmdCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
resources.ApplyResources(this.cmdCancel, "cmdCancel");
|
||||
this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cmdCancel.Location = new System.Drawing.Point(281, 142);
|
||||
this.cmdCancel.Name = "cmdCancel";
|
||||
this.cmdCancel.Size = new System.Drawing.Size(59, 25);
|
||||
this.cmdCancel.TabIndex = 1;
|
||||
this.cmdCancel.Text = "Cancel";
|
||||
this.cmdCancel.UseVisualStyleBackColor = true;
|
||||
this.cmdCancel.Click += new System.EventHandler(this.cmdCancel_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(12, 9);
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(123, 31);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Construct your driver\'s setup dialog here.";
|
||||
//
|
||||
// picASCOM
|
||||
//
|
||||
this.picASCOM.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
resources.ApplyResources(this.picASCOM, "picASCOM");
|
||||
this.picASCOM.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.picASCOM.Image = global::ASCOM.MeadeAutostar497.Properties.Resources.ASCOM;
|
||||
this.picASCOM.Location = new System.Drawing.Point(292, 9);
|
||||
this.picASCOM.Image = global::ASCOM.Meade.net.Properties.Resources.ASCOM;
|
||||
this.picASCOM.Name = "picASCOM";
|
||||
this.picASCOM.Size = new System.Drawing.Size(48, 56);
|
||||
this.picASCOM.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.picASCOM.TabIndex = 3;
|
||||
this.picASCOM.TabStop = false;
|
||||
this.picASCOM.Click += new System.EventHandler(this.BrowseToAscom);
|
||||
this.picASCOM.DoubleClick += new System.EventHandler(this.BrowseToAscom);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(13, 90);
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(58, 13);
|
||||
this.label2.TabIndex = 5;
|
||||
this.label2.Text = "Comm Port";
|
||||
//
|
||||
// chkTrace
|
||||
//
|
||||
this.chkTrace.AutoSize = true;
|
||||
this.chkTrace.Location = new System.Drawing.Point(77, 118);
|
||||
resources.ApplyResources(this.chkTrace, "chkTrace");
|
||||
this.chkTrace.Name = "chkTrace";
|
||||
this.chkTrace.Size = new System.Drawing.Size(69, 17);
|
||||
this.chkTrace.TabIndex = 6;
|
||||
this.chkTrace.Text = "Trace on";
|
||||
this.chkTrace.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBoxComPort
|
||||
//
|
||||
this.comboBoxComPort.FormattingEnabled = true;
|
||||
this.comboBoxComPort.Location = new System.Drawing.Point(77, 87);
|
||||
resources.ApplyResources(this.comboBoxComPort, "comboBoxComPort");
|
||||
this.comboBoxComPort.Name = "comboBoxComPort";
|
||||
this.comboBoxComPort.Size = new System.Drawing.Size(90, 21);
|
||||
this.comboBoxComPort.TabIndex = 7;
|
||||
this.comboBoxComPort.SelectedValueChanged += new System.EventHandler(this.ComboBoxComPort_SelectedValueChanged);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// txtGuideRate
|
||||
//
|
||||
resources.ApplyResources(this.txtGuideRate, "txtGuideRate");
|
||||
this.txtGuideRate.Name = "txtGuideRate";
|
||||
this.txtGuideRate.TextChanged += new System.EventHandler(this.TextBox1_TextChanged);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// lblPercentOfSiderealRate
|
||||
//
|
||||
resources.ApplyResources(this.lblPercentOfSiderealRate, "lblPercentOfSiderealRate");
|
||||
this.lblPercentOfSiderealRate.Name = "lblPercentOfSiderealRate";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
resources.ApplyResources(this.label5, "label5");
|
||||
this.label5.Name = "label5";
|
||||
//
|
||||
// cboPrecision
|
||||
//
|
||||
this.cboPrecision.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboPrecision.FormattingEnabled = true;
|
||||
this.cboPrecision.Items.AddRange(new object[] {
|
||||
resources.GetString("cboPrecision.Items"),
|
||||
resources.GetString("cboPrecision.Items1"),
|
||||
resources.GetString("cboPrecision.Items2")});
|
||||
resources.ApplyResources(this.cboPrecision, "cboPrecision");
|
||||
this.cboPrecision.Name = "cboPrecision";
|
||||
//
|
||||
// SetupDialogForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(350, 175);
|
||||
this.Controls.Add(this.cboPrecision);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.lblPercentOfSiderealRate);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.txtGuideRate);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.comboBoxComPort);
|
||||
this.Controls.Add(this.chkTrace);
|
||||
this.Controls.Add(this.label2);
|
||||
@@ -128,8 +152,7 @@ namespace ASCOM.MeadeAutostar497
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "SetupDialogForm";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "MeadeAutostar497 Setup";
|
||||
this.Shown += new System.EventHandler(this.SetupDialogForm_Shown);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picASCOM)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
@@ -145,5 +168,11 @@ namespace ASCOM.MeadeAutostar497
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.CheckBox chkTrace;
|
||||
private System.Windows.Forms.ComboBox comboBoxComPort;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox txtGuideRate;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label lblPercentOfSiderealRate;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.ComboBox cboPrecision;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,486 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="cmdOK.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="cmdOK.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>281, 225</value>
|
||||
</data>
|
||||
<data name="cmdOK.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>59, 24</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="cmdOK.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="cmdOK.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name=">>cmdOK.Name" xml:space="preserve">
|
||||
<value>cmdOK</value>
|
||||
</data>
|
||||
<data name=">>cmdOK.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cmdOK.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cmdOK.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="cmdCancel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
</data>
|
||||
<data name="cmdCancel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>281, 255</value>
|
||||
</data>
|
||||
<data name="cmdCancel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>59, 25</value>
|
||||
</data>
|
||||
<data name="cmdCancel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="cmdCancel.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name=">>cmdCancel.Name" xml:space="preserve">
|
||||
<value>cmdCancel</value>
|
||||
</data>
|
||||
<data name=">>cmdCancel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cmdCancel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cmdCancel.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 9</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>123, 31</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Meade AutoStar and AudioStar generic driver</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="picASCOM.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="picASCOM.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>292, 9</value>
|
||||
</data>
|
||||
<data name="picASCOM.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>48, 56</value>
|
||||
</data>
|
||||
<data name="picASCOM.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
|
||||
<value>AutoSize</value>
|
||||
</data>
|
||||
<data name="picASCOM.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>picASCOM.Name" xml:space="preserve">
|
||||
<value>picASCOM</value>
|
||||
</data>
|
||||
<data name=">>picASCOM.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>picASCOM.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>picASCOM.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 90</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>58, 13</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Comm Port</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="chkTrace.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="chkTrace.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>77, 136</value>
|
||||
</data>
|
||||
<data name="chkTrace.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>69, 17</value>
|
||||
</data>
|
||||
<data name="chkTrace.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="chkTrace.Text" xml:space="preserve">
|
||||
<value>Trace on</value>
|
||||
</data>
|
||||
<data name=">>chkTrace.Name" xml:space="preserve">
|
||||
<value>chkTrace</value>
|
||||
</data>
|
||||
<data name=">>chkTrace.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>chkTrace.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>chkTrace.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="comboBoxComPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>77, 87</value>
|
||||
</data>
|
||||
<data name="comboBoxComPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 21</value>
|
||||
</data>
|
||||
<data name="comboBoxComPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>comboBoxComPort.Name" xml:space="preserve">
|
||||
<value>comboBoxComPort</value>
|
||||
</data>
|
||||
<data name=">>comboBoxComPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>comboBoxComPort.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBoxComPort.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>10, 162</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>61, 13</value>
|
||||
</data>
|
||||
<data name="label3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Guide Rate</value>
|
||||
</data>
|
||||
<data name=">>label3.Name" xml:space="preserve">
|
||||
<value>label3</value>
|
||||
</data>
|
||||
<data name=">>label3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label3.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="txtGuideRate.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>77, 159</value>
|
||||
</data>
|
||||
<data name="txtGuideRate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>46, 20</value>
|
||||
</data>
|
||||
<data name="txtGuideRate.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="txtGuideRate.Text" xml:space="preserve">
|
||||
<value>10.0</value>
|
||||
</data>
|
||||
<data name=">>txtGuideRate.Name" xml:space="preserve">
|
||||
<value>txtGuideRate</value>
|
||||
</data>
|
||||
<data name=">>txtGuideRate.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtGuideRate.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtGuideRate.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>129, 162</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>122, 13</value>
|
||||
</data>
|
||||
<data name="label4.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>Arc seconds per second</value>
|
||||
</data>
|
||||
<data name=">>label4.Name" xml:space="preserve">
|
||||
<value>label4</value>
|
||||
</data>
|
||||
<data name=">>label4.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label4.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label4.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="lblPercentOfSiderealRate.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="lblPercentOfSiderealRate.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>129, 175</value>
|
||||
</data>
|
||||
<data name="lblPercentOfSiderealRate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 13</value>
|
||||
</data>
|
||||
<data name="lblPercentOfSiderealRate.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="lblPercentOfSiderealRate.Text" xml:space="preserve">
|
||||
<value>(67% of sidereal rate)</value>
|
||||
</data>
|
||||
<data name=">>lblPercentOfSiderealRate.Name" xml:space="preserve">
|
||||
<value>lblPercentOfSiderealRate</value>
|
||||
</data>
|
||||
<data name=">>lblPercentOfSiderealRate.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>lblPercentOfSiderealRate.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>lblPercentOfSiderealRate.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 194</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>50, 13</value>
|
||||
</data>
|
||||
<data name="label5.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>Precision</value>
|
||||
</data>
|
||||
<data name=">>label5.Name" xml:space="preserve">
|
||||
<value>label5</value>
|
||||
</data>
|
||||
<data name=">>label5.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label5.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label5.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="cboPrecision.Items" xml:space="preserve">
|
||||
<value>Unchanged</value>
|
||||
</data>
|
||||
<data name="cboPrecision.Items1" xml:space="preserve">
|
||||
<value>Low</value>
|
||||
</data>
|
||||
<data name="cboPrecision.Items2" xml:space="preserve">
|
||||
<value>High</value>
|
||||
</data>
|
||||
<data name="cboPrecision.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>77, 191</value>
|
||||
</data>
|
||||
<data name="cboPrecision.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 21</value>
|
||||
</data>
|
||||
<data name="cboPrecision.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name=">>cboPrecision.Name" xml:space="preserve">
|
||||
<value>cboPrecision</value>
|
||||
</data>
|
||||
<data name=">>cboPrecision.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cboPrecision.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cboPrecision.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>350, 288</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Meade.net Setup</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>SetupDialogForm</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,389 @@
|
||||
//
|
||||
// ================
|
||||
// Shared Resources
|
||||
// ================
|
||||
//
|
||||
// This class is a container for all shared resources that may be needed
|
||||
// by the drivers served by the Local Server.
|
||||
//
|
||||
// NOTES:
|
||||
//
|
||||
// * ALL DECLARATIONS MUST BE STATIC HERE!! INSTANCES OF THIS CLASS MUST NEVER BE CREATED!
|
||||
//
|
||||
// Written by: Bob Denny 29-May-2007
|
||||
// Modified by Chris Rowland and Peter Simpson to hamdle multiple hardware devices March 2011
|
||||
//
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ASCOM.Utilities;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
/// <summary>
|
||||
/// The resources shared by all drivers and devices, in this example it's a serial port with a shared SendMessage method
|
||||
/// an idea for locking the message and handling connecting is given.
|
||||
/// In reality extensive changes will probably be needed.
|
||||
/// Multiple drivers means that several applications connect to the same hardware device, aka a hub.
|
||||
/// Multiple devices means that there are more than one instance of the hardware, such as two focusers.
|
||||
/// In this case there needs to be multiple instances of the hardware connector, each with it's own connection count.
|
||||
/// </summary>
|
||||
public static class SharedResources
|
||||
{
|
||||
// object used for locking to prevent multiple drivers accessing common code at the same time
|
||||
private static readonly object LockObject = new object();
|
||||
|
||||
// Shared serial port. This will allow multiple drivers to use one single serial port.
|
||||
private static Serial _sSharedSerial; // Shared serial port
|
||||
|
||||
//
|
||||
// Public access to shared resources
|
||||
//
|
||||
|
||||
#region single serial port connector
|
||||
|
||||
//
|
||||
// this region shows a way that a single serial port could be connected to by multiple
|
||||
// drivers.
|
||||
//
|
||||
// Connected is used to handle the connections to the port.
|
||||
//
|
||||
// SendMessage is a way that messages could be sent to the hardware without
|
||||
// conflicts between different drivers.
|
||||
//
|
||||
// All this is for a single connection, multiple connections would need multiple ports
|
||||
// and a way to handle connecting and disconnection from them - see the
|
||||
// multi driver handling section for ideas.
|
||||
//
|
||||
|
||||
/// <summary>
|
||||
/// Shared serial port
|
||||
/// </summary>
|
||||
public static Serial SharedSerial => _sSharedSerial ?? (_sSharedSerial = new Serial());
|
||||
|
||||
/// <summary>
|
||||
/// number of connections to the shared serial port
|
||||
/// </summary>
|
||||
public static int Connections { get; set; } = 0;
|
||||
|
||||
public static void SendBlind(string message)
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
SharedSerial.ClearBuffers();
|
||||
SharedSerial.Transmit(message);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool SendBool(string message)
|
||||
{
|
||||
SharedSerial.ClearBuffers();
|
||||
return SendChar(message) == "1";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Example of a shared SendMessage method, the lock
|
||||
/// prevents different drivers tripping over one another.
|
||||
/// It needs error handling and assumes that the message will be sent unchanged
|
||||
/// and that the reply will always be terminated by a "#" character.
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <returns></returns>
|
||||
public static string SendString(string message)
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
SharedSerial.ClearBuffers();
|
||||
SharedSerial.Transmit(message);
|
||||
return SharedSerial.ReceiveTerminated("#").TrimEnd('#');
|
||||
}
|
||||
}
|
||||
|
||||
public static string SendChar(string message)
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
SharedSerial.ClearBuffers();
|
||||
SharedSerial.Transmit(message);
|
||||
return SharedSerial.ReceiveCounted(1);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ReadTerminated()
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
return SharedSerial.ReceiveTerminated("#");
|
||||
}
|
||||
}
|
||||
|
||||
public static string ReadCharacters(int throwAwayCharacters)
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
return SharedSerial.ReceiveCounted(throwAwayCharacters);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Example of handling connecting to and disconnection from the
|
||||
/// shared serial port.
|
||||
/// Needs error handling
|
||||
/// the port name etc. needs to be set up first, this could be done by the driver
|
||||
/// checking Connected and if it's false setting up the port before setting connected to true.
|
||||
/// It could also be put here.
|
||||
/// </summary>
|
||||
public static bool Connected
|
||||
{
|
||||
set
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
if (Connections == 0)
|
||||
SharedSerial.Connected = true;
|
||||
Connections++;
|
||||
}
|
||||
else
|
||||
{
|
||||
Connections--;
|
||||
if (Connections <= 0)
|
||||
{
|
||||
SharedSerial.Connected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
get => SharedSerial.Connected;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Profile
|
||||
|
||||
private const string DriverId = "ASCOM.MeadeGeneric.Telescope";
|
||||
|
||||
// Constants used for Profile persistence
|
||||
private const string ComPortProfileName = "COM Port";
|
||||
private const string TraceStateProfileName = "Trace Level";
|
||||
private const string GuideRateProfileName = "Guide Rate Arc Seconds Per Second";
|
||||
private const string PrecisionProfileName = "Precision";
|
||||
|
||||
public static void WriteProfile(ProfileProperties profileProperties)
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
using (Profile driverProfile = new Profile())
|
||||
{
|
||||
driverProfile.DeviceType = "Telescope";
|
||||
driverProfile.WriteValue(DriverId, TraceStateProfileName, profileProperties.TraceLogger.ToString());
|
||||
driverProfile.WriteValue(DriverId, ComPortProfileName, profileProperties.ComPort);
|
||||
driverProfile.WriteValue(DriverId, GuideRateProfileName, profileProperties.GuideRateArcSecondsPerSecond.ToString());
|
||||
driverProfile.WriteValue(DriverId, PrecisionProfileName, profileProperties.Precision);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private const string ComPortDefault = "COM1";
|
||||
private const string TraceStateDefault = "false";
|
||||
private const string GuideRateProfileNameDefault = "10.077939"; //67% of sidereal rate
|
||||
private const string PrecisionDefault = "Unchanged";
|
||||
|
||||
public static ProfileProperties ReadProfile()
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
ProfileProperties profileProperties = new ProfileProperties();
|
||||
using (Profile driverProfile = new Profile())
|
||||
{
|
||||
driverProfile.DeviceType = "Telescope";
|
||||
profileProperties.ComPort = driverProfile.GetValue(DriverId, ComPortProfileName, string.Empty, ComPortDefault);
|
||||
profileProperties.TraceLogger = Convert.ToBoolean(driverProfile.GetValue(DriverId, TraceStateProfileName, string.Empty, TraceStateDefault));
|
||||
profileProperties.GuideRateArcSecondsPerSecond = double.Parse(driverProfile.GetValue(DriverId, GuideRateProfileName, string.Empty, GuideRateProfileNameDefault));
|
||||
profileProperties.Precision = driverProfile.GetValue(DriverId, PrecisionProfileName, string.Empty, PrecisionDefault);
|
||||
}
|
||||
|
||||
return profileProperties;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region SetupDialog
|
||||
|
||||
public static void SetupDialog()
|
||||
{
|
||||
// consider only showing the setup dialog if not connected
|
||||
// or call a different dialog if connected
|
||||
if (Connections > 0)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("Already connected, please disconnect before altering settings");
|
||||
return;
|
||||
}
|
||||
|
||||
var profileProperties = ReadProfile();
|
||||
|
||||
using (SetupDialogForm f = new SetupDialogForm())
|
||||
{
|
||||
f.SetProfile(profileProperties);
|
||||
|
||||
var result = f.ShowDialog();
|
||||
if (result == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
profileProperties = f.GetProfile();
|
||||
|
||||
WriteProfile(profileProperties); // Persist device configuration values to the ASCOM Profile store
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Multi Driver handling
|
||||
|
||||
public static string ProductName { get; private set; } = string.Empty;
|
||||
public static string FirmwareVersion { get; private set; } = string.Empty;
|
||||
|
||||
// this section illustrates how multiple drivers could be handled,
|
||||
// it's for drivers where multiple connections to the hardware can be made and ensures that the
|
||||
// hardware is only disconnected from when all the connected devices have disconnected.
|
||||
|
||||
// It is NOT a complete solution! This is to give ideas of what can - or should be done.
|
||||
//
|
||||
// An alternative would be to move the hardware control here, handle connecting and disconnecting,
|
||||
// and provide the device with a suitable connection to the hardware.
|
||||
//
|
||||
/// <summary>
|
||||
/// dictionary carrying device connections.
|
||||
/// The Key is the connection number that identifies the device, it could be the COM port name,
|
||||
/// USB ID or IP Address, the Value is the DeviceHardware class
|
||||
/// </summary>
|
||||
private static readonly Dictionary<string, DeviceHardware> _connectedDevices = new Dictionary<string, DeviceHardware>();
|
||||
|
||||
/// <summary>
|
||||
/// This is called in the driver Connect(true) property,
|
||||
/// it add the device id to the list of devices if it's not there and increments the device count.
|
||||
/// </summary>
|
||||
/// <param name="deviceId"></param>
|
||||
public static void Connect(string deviceId)
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
if (!_connectedDevices.ContainsKey(deviceId))
|
||||
_connectedDevices.Add(deviceId, new DeviceHardware());
|
||||
_connectedDevices[deviceId].Count++; // increment the value
|
||||
|
||||
if (deviceId == "Serial")
|
||||
{
|
||||
if (_connectedDevices[deviceId].Count == 1)
|
||||
{
|
||||
var profileProperties = ReadProfile();
|
||||
SharedSerial.PortName = profileProperties.ComPort;
|
||||
SharedSerial.DTREnable = false;
|
||||
SharedSerial.RTSEnable = false;
|
||||
SharedSerial.DataBits = 8;
|
||||
SharedSerial.StopBits = SerialStopBits.One;
|
||||
SharedSerial.Parity = SerialParity.None;
|
||||
SharedSerial.Speed = SerialSpeed.ps9600;
|
||||
SharedSerial.Handshake = SerialHandshake.None;
|
||||
SharedSerial.Connected = true;
|
||||
|
||||
ProductName = SendString(":GVP#");
|
||||
FirmwareVersion = SendString(":GVN#");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Disconnect(string deviceId)
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
if (_connectedDevices.ContainsKey(deviceId))
|
||||
{
|
||||
_connectedDevices[deviceId].Count--;
|
||||
if (_connectedDevices[deviceId].Count <= 0)
|
||||
{
|
||||
_connectedDevices.Remove(deviceId);
|
||||
if (deviceId == "Serial")
|
||||
{
|
||||
SharedSerial.Connected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsConnected(string deviceId)
|
||||
{
|
||||
if (_connectedDevices.ContainsKey(deviceId))
|
||||
return (_connectedDevices[deviceId].Count > 0);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static void Lock(Action action)
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
action();
|
||||
}
|
||||
}
|
||||
|
||||
public static T Lock<T>(Func<T> func)
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
return func();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Skeleton of a hardware class, all this does is hold a count of the connections,
|
||||
/// in reality extra code will be needed to handle the hardware in some way
|
||||
/// </summary>
|
||||
public class DeviceHardware
|
||||
{
|
||||
private int _count;
|
||||
|
||||
internal int Count
|
||||
{
|
||||
set => _count = value;
|
||||
get => _count;
|
||||
}
|
||||
|
||||
internal DeviceHardware()
|
||||
{
|
||||
Count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//#region ServedClassName attribute
|
||||
///// <summary>
|
||||
///// This is only needed if the driver is targeted at platform 5.5, it is included with Platform 6
|
||||
///// </summary>
|
||||
//[global::System.AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
|
||||
//public sealed class ServedClassNameAttribute : Attribute
|
||||
//{
|
||||
// // See the attribute guidelines at
|
||||
// // http://go.microsoft.com/fwlink/?LinkId=85236
|
||||
|
||||
// /// <summary>
|
||||
// /// Gets or sets the 'friendly name' of the served class, as registered with the ASCOM Chooser.
|
||||
// /// </summary>
|
||||
// /// <value>The 'friendly name' of the served class.</value>
|
||||
// public string DisplayName { get; private set; }
|
||||
// /// <summary>
|
||||
// /// Initializes a new instance of the <see cref="ServedClassNameAttribute"/> class.
|
||||
// /// </summary>
|
||||
// /// <param name="servedClassName">The 'friendly name' of the served class.</param>
|
||||
// public ServedClassNameAttribute(string servedClassName)
|
||||
// {
|
||||
// DisplayName = servedClassName;
|
||||
// }
|
||||
//}
|
||||
//#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Text;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
public static class TelescopeList
|
||||
{
|
||||
#region Autostar 497/Audiostar
|
||||
|
||||
public readonly static string Autostar497 = "Autostar";
|
||||
|
||||
//Autostar/Audiostar firmware revisions
|
||||
public readonly static string Autostar497_30Ee = "30Ee";
|
||||
public readonly static string Autostar497_31Ee = "31Ee";
|
||||
public readonly static string Autostar497_43Eg = "43Eg";
|
||||
|
||||
#endregion
|
||||
|
||||
#region LX200GPS
|
||||
|
||||
public readonly static string LX200GPS = "LX2001";
|
||||
|
||||
public readonly static string LX200GPS_42G = "4.2G";
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
|
||||
namespace ASCOM.Meade.net.Wrapper
|
||||
{
|
||||
public interface ISharedResourcesWrapper
|
||||
{
|
||||
void Connect(string deviceId);
|
||||
void Disconnect(string deviceId);
|
||||
|
||||
string ProductName { get; }
|
||||
|
||||
string FirmwareVersion { get; }
|
||||
|
||||
void Lock(Action action);
|
||||
T Lock<T>(Func<T> func);
|
||||
|
||||
string SendString(string message);
|
||||
void SendBlind(string message);
|
||||
string SendChar(string message);
|
||||
|
||||
string ReadTerminated();
|
||||
|
||||
ProfileProperties ReadProfile();
|
||||
|
||||
void SetupDialog();
|
||||
void WriteProfile(ProfileProperties profileProperties);
|
||||
string ReadCharacters(int throwAwayCharacters);
|
||||
}
|
||||
|
||||
public class SharedResourcesWrapper : ISharedResourcesWrapper
|
||||
{
|
||||
public void Connect(string deviceId)
|
||||
{
|
||||
SharedResources.Connect( deviceId);
|
||||
}
|
||||
|
||||
public void Disconnect(string deviceId)
|
||||
{
|
||||
SharedResources.Disconnect(deviceId);
|
||||
}
|
||||
|
||||
public string ProductName => SharedResources.ProductName;
|
||||
|
||||
public string FirmwareVersion => SharedResources.FirmwareVersion;
|
||||
|
||||
public void Lock(Action action)
|
||||
{
|
||||
SharedResources.Lock(action);
|
||||
}
|
||||
|
||||
public T Lock<T>(Func<T> func)
|
||||
{
|
||||
return SharedResources.Lock(func);
|
||||
}
|
||||
|
||||
public string SendString(string message)
|
||||
{
|
||||
return SharedResources.SendString(message);
|
||||
}
|
||||
|
||||
public void SendBlind(string message)
|
||||
{
|
||||
SharedResources.SendBlind(message);
|
||||
}
|
||||
|
||||
public string SendChar(string message)
|
||||
{
|
||||
return SharedResources.SendChar(message);
|
||||
}
|
||||
|
||||
public string ReadTerminated()
|
||||
{
|
||||
return SharedResources.ReadTerminated();
|
||||
}
|
||||
|
||||
public string ReadCharacters(int throwAwayCharacters)
|
||||
{
|
||||
return SharedResources.ReadCharacters(throwAwayCharacters);
|
||||
}
|
||||
|
||||
public ProfileProperties ReadProfile()
|
||||
{
|
||||
return SharedResources.ReadProfile();
|
||||
}
|
||||
|
||||
public void SetupDialog()
|
||||
{
|
||||
SharedResources.SetupDialog();
|
||||
}
|
||||
|
||||
public void WriteProfile(ProfileProperties profileProperties)
|
||||
{
|
||||
SharedResources.WriteProfile(profileProperties);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
partial class FrmMain
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(12, 10);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(199, 33);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "This is an ASCOM driver, not a program for you to use.";
|
||||
//
|
||||
// frmMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(233, 52);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "FrmMain";
|
||||
this.Text = "Meade.net Driver Server";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
public partial class FrmMain : Form
|
||||
{
|
||||
delegate void SetTextCallback(string text);
|
||||
|
||||
public FrmMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -112,9 +112,9 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ASCOM.Platform" version="6.4.2" targetFramework="net40" />
|
||||
</packages>
|
||||