Skip to content

Commit 05d6078

Browse files
Merge branch 'develop1.0'
2 parents 7c50a1f + f1c739f commit 05d6078

File tree

62 files changed

+4277
-1313
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+4277
-1313
lines changed

ASCOM.Alpaca.Razor/ASCOM.Alpaca.Razor.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
</ItemGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="ASCOM.Alpaca.Device" Version="2.0.9" />
20-
<PackageReference Include="ASCOM.Common.Components" Version="2.0.9" />
19+
<PackageReference Include="ASCOM.Alpaca.Device" Version="2.2.0" />
20+
<PackageReference Include="ASCOM.Common.Components" Version="2.2.0" />
2121
<PackageReference Include="ASCOM.Exception.Library" Version="7.0.1" />
22-
<PackageReference Include="ASCOM.Tools" Version="2.0.9" />
23-
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.0.0" />
24-
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="8.0.0" />
22+
<PackageReference Include="ASCOM.Tools" Version="2.2.0" />
23+
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.6" />
24+
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="9.0.6" />
2525
</ItemGroup>
2626

2727
<PropertyGroup>

ASCOM.Alpaca.Simulators/ASCOM.Alpaca.Simulators.csproj

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
55
<UserSecretsId>967c7185-69cc-4a35-bf4b-c3c1cb89f6a3</UserSecretsId>
66
<Authors>Daniel Van Noord</Authors>
77
<Description>A full set of ASCOM Simulators exposing the Alpaca Controller Interfaces</Description>
88
<ApplicationIcon>favicon.ico</ApplicationIcon>
9-
<Copyright>2021-23 Daniel Van Noord</Copyright>
9+
<Copyright>2021-25 Daniel Van Noord</Copyright>
1010
<AssemblyName>ascom.alpaca.simulators</AssemblyName>
1111
<TrimMode>partial</TrimMode>
1212
<JsonSerializerIsReflectionEnabledByDefault>true</JsonSerializerIsReflectionEnabledByDefault>
@@ -31,16 +31,17 @@
3131
</ItemGroup>
3232

3333
<ItemGroup>
34-
<PackageReference Include="ASCOM.Alpaca.Device" Version="2.0.9" />
35-
<PackageReference Include="ASCOM.Common.Components" Version="2.0.9" />
34+
<PackageReference Include="ASCOM.Alpaca.Device" Version="2.2.0" />
35+
<PackageReference Include="ASCOM.Common.Components" Version="2.2.0" />
3636
<PackageReference Include="ASCOM.DeviceInterfaces" Version="7.0.0" />
3737
<PackageReference Include="ASCOM.Exception.Library" Version="7.0.1" />
38-
<PackageReference Include="ASCOM.Tools" Version="2.0.9" />
38+
<PackageReference Include="ASCOM.Tools" Version="2.2.0" />
3939
<PackageReference Include="Blazored.Toast" Version="4.2.1" />
40+
<PackageReference Include="H.NotifyIcon" Version="2.3.1" />
4041
<PackageReference Include="LetsMake.GithubUpdateChecker" Version="0.1.0-rc2" />
41-
<PackageReference Include="Microsoft.FeatureManagement.AspNetCore" Version="4.0.0" />
42-
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.0.0" />
43-
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="8.0.0" />
42+
<PackageReference Include="Microsoft.FeatureManagement.AspNetCore" Version="4.3.0" />
43+
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.6" />
44+
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="9.0.6" />
4445
</ItemGroup>
4546

4647
<ItemGroup>
@@ -100,6 +101,12 @@
100101
<ProjectReference Include="..\ASCOM.COM.LocalServer\OmniSim.LocalServer.csproj" />
101102
</ItemGroup>
102103

104+
<ItemGroup>
105+
<None Update="favicon.ico">
106+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
107+
</None>
108+
</ItemGroup>
109+
103110
<Target Name="CopyCustomContent" AfterTargets="AfterBuild" Condition="$(DefineConstants.Contains('ASCOM_COM'))">
104111
<Copy SourceFiles="..\OmniSimCOMProxy\bin\$(Configuration)\net48\OmniSim.COMProxy.exe" DestinationFolder="$(OutDir)\COM" />
105112
</Target>

ASCOM.Alpaca.Simulators/Controllers/DomeSettingsController.cs

Lines changed: 1127 additions & 0 deletions
Large diffs are not rendered by default.

ASCOM.Alpaca.Simulators/Controllers/FilterWheelSettingsController.cs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,5 +307,53 @@ public ActionResult<Response> InterfaceVersion(
307307
{
308308
return ProcessRequest(() => { (DeviceManager.GetFilterWheel(DeviceNumber) as ASCOM.Simulators.FilterWheel).FilterWheelHardware.InterfaceVersion.Value = InterfaceVersion; }, DeviceManager.ServerTransactionID, ClientID, ClientTransactionID, $"InterfaceVersion={InterfaceVersion}");
309309
}
310+
/// <summary>
311+
/// OmniSim Only - The delay to be used for Connect() in milliseconds, allowed values are 1-30000
312+
/// </summary>
313+
/// <remarks>
314+
/// <para>The delay to be used for Connect() in milliseconds, allowed values are 1-30000</para>
315+
/// </remarks>
316+
/// <param name="DeviceNumber">Zero based device number as set on the server (A uint32 with a range of 0 to 4294967295)</param>
317+
/// <param name="ClientID">Client's unique ID.</param>
318+
/// <param name="ClientTransactionID">Client's transaction ID.</param>
319+
/// <response code="200">Transaction complete or exception</response>
320+
/// <response code="400" examples="Error message describing why the command cannot be processed">Method or parameter value error, check error message</response>
321+
/// <response code="500" examples="Error message describing why the command cannot be processed">Server internal error, check error message</response>
322+
[HttpGet]
323+
[Produces(MediaTypeNames.Application.Json)]
324+
[ApiExplorerSettings(GroupName = "OmniSim")]
325+
[Route("filterwheel/{DeviceNumber}/connectdelay")]
326+
public ActionResult<ASCOM.Common.Alpaca.IntResponse> ConnectDelay(
327+
[Required][DefaultValue(0)][SwaggerSchema(Strings.DeviceIDDescription, Format = "uint32")][Range(0, 4294967295)] uint DeviceNumber,
328+
[SwaggerSchema(Strings.ClientIDDescription, Format = "uint32")][Range(0, 4294967295)] uint ClientID = 0,
329+
[SwaggerSchema(Strings.ClientTransactionIDDescription, Format = "uint32")][Range(0, 4294967295)] uint ClientTransactionID = 0)
330+
{
331+
return ProcessRequest(() => (DeviceManager.GetFilterWheel(DeviceNumber) as ASCOM.Simulators.FilterWheel).FilterWheelHardware.ConnectDelay.Value, DeviceManager.ServerTransactionID, ClientID, ClientTransactionID);
332+
}
333+
/// <summary>
334+
/// OmniSim Only - The delay to be used for Connect() in milliseconds, allowed values are 1-30000
335+
/// </summary>
336+
/// <remarks>
337+
/// <para>The delay to be used for Connect() in milliseconds, allowed values are 1-30000</para>
338+
/// </remarks>
339+
/// <param name="DeviceNumber">Zero based device number as set on the server (A uint32 with a range of 0 to 4294967295)</param>
340+
/// <param name="ConnectDelay">The delay to be used for Connect() in milliseconds, allowed values are 1-30000</param>
341+
/// <param name="ClientID">Client's unique ID.</param>
342+
/// <param name="ClientTransactionID">Client's transaction ID.</param>
343+
/// <response code="200">Transaction complete or exception</response>
344+
/// <response code="400" examples="Error message describing why the command cannot be processed">Method or parameter value error, check error message</response>
345+
/// <response code="500" examples="Error message describing why the command cannot be processed">Server internal error, check error message</response>
346+
[HttpPut]
347+
[Produces(MediaTypeNames.Application.Json)]
348+
[ApiExplorerSettings(GroupName = "OmniSim")]
349+
[Route("filterwheel/{DeviceNumber}/connectdelay")]
350+
public ActionResult<Response> ConnectDelay(
351+
[Required][DefaultValue(0)][SwaggerSchema(Strings.DeviceIDDescription, Format = "uint32")][Range(0, 4294967295)] uint DeviceNumber,
352+
[Required][FromForm][SwaggerSchema("The delay to be used for Connect() in milliseconds, allowed values are 1-30000")] System.Int16 ConnectDelay,
353+
[FromForm][SwaggerSchema(Strings.ClientIDDescription, Format = "uint32")][Range(0, 4294967295)] uint ClientID = 0,
354+
[FromForm][SwaggerSchema(Strings.ClientTransactionIDDescription, Format = "uint32")][Range(0, 4294967295)] uint ClientTransactionID = 0)
355+
{
356+
return ProcessRequest(() => { (DeviceManager.GetFilterWheel(DeviceNumber) as ASCOM.Simulators.FilterWheel).FilterWheelHardware.ConnectDelay.Value = ConnectDelay; }, DeviceManager.ServerTransactionID, ClientID, ClientTransactionID, $"ConnectDelay={ConnectDelay}");
357+
}
310358
}
311359
}

ASCOM.Alpaca.Simulators/Controllers/FocuserSettingsController.cs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,54 @@ public ActionResult<Response> InterfaceVersion(
6868
return ProcessRequest(() => { (DeviceManager.GetFocuser(DeviceNumber) as ASCOM.Simulators.Focuser).InterfaceVersionSetting.Value = InterfaceVersion; }, DeviceManager.ServerTransactionID, ClientID, ClientTransactionID, $"InterfaceVersion={InterfaceVersion}");
6969
}
7070
/// <summary>
71+
/// OmniSim Only - The delay to be used for Connect() in milliseconds, allowed values are 1-30000
72+
/// </summary>
73+
/// <remarks>
74+
/// <para>The delay to be used for Connect() in milliseconds, allowed values are 1-30000</para>
75+
/// </remarks>
76+
/// <param name="DeviceNumber">Zero based device number as set on the server (A uint32 with a range of 0 to 4294967295)</param>
77+
/// <param name="ClientID">Client's unique ID.</param>
78+
/// <param name="ClientTransactionID">Client's transaction ID.</param>
79+
/// <response code="200">Transaction complete or exception</response>
80+
/// <response code="400" examples="Error message describing why the command cannot be processed">Method or parameter value error, check error message</response>
81+
/// <response code="500" examples="Error message describing why the command cannot be processed">Server internal error, check error message</response>
82+
[HttpGet]
83+
[Produces(MediaTypeNames.Application.Json)]
84+
[ApiExplorerSettings(GroupName = "OmniSim")]
85+
[Route("focuser/{DeviceNumber}/connectdelay")]
86+
public ActionResult<ASCOM.Common.Alpaca.IntResponse> ConnectDelay(
87+
[Required][DefaultValue(0)][SwaggerSchema(Strings.DeviceIDDescription, Format = "uint32")][Range(0, 4294967295)] uint DeviceNumber,
88+
[SwaggerSchema(Strings.ClientIDDescription, Format = "uint32")][Range(0, 4294967295)] uint ClientID = 0,
89+
[SwaggerSchema(Strings.ClientTransactionIDDescription, Format = "uint32")][Range(0, 4294967295)] uint ClientTransactionID = 0)
90+
{
91+
return ProcessRequest(() => (DeviceManager.GetFocuser(DeviceNumber) as ASCOM.Simulators.Focuser).ConnectDelay.Value, DeviceManager.ServerTransactionID, ClientID, ClientTransactionID);
92+
}
93+
/// <summary>
94+
/// OmniSim Only - The delay to be used for Connect() in milliseconds, allowed values are 1-30000
95+
/// </summary>
96+
/// <remarks>
97+
/// <para>The delay to be used for Connect() in milliseconds, allowed values are 1-30000</para>
98+
/// </remarks>
99+
/// <param name="DeviceNumber">Zero based device number as set on the server (A uint32 with a range of 0 to 4294967295)</param>
100+
/// <param name="ConnectDelay">The delay to be used for Connect() in milliseconds, allowed values are 1-30000</param>
101+
/// <param name="ClientID">Client's unique ID.</param>
102+
/// <param name="ClientTransactionID">Client's transaction ID.</param>
103+
/// <response code="200">Transaction complete or exception</response>
104+
/// <response code="400" examples="Error message describing why the command cannot be processed">Method or parameter value error, check error message</response>
105+
/// <response code="500" examples="Error message describing why the command cannot be processed">Server internal error, check error message</response>
106+
[HttpPut]
107+
[Produces(MediaTypeNames.Application.Json)]
108+
[ApiExplorerSettings(GroupName = "OmniSim")]
109+
[Route("focuser/{DeviceNumber}/connectdelay")]
110+
public ActionResult<Response> ConnectDelay(
111+
[Required][DefaultValue(0)][SwaggerSchema(Strings.DeviceIDDescription, Format = "uint32")][Range(0, 4294967295)] uint DeviceNumber,
112+
[Required][FromForm][SwaggerSchema("The delay to be used for Connect() in milliseconds, allowed values are 1-30000")] System.Int16 ConnectDelay,
113+
[FromForm][SwaggerSchema(Strings.ClientIDDescription, Format = "uint32")][Range(0, 4294967295)] uint ClientID = 0,
114+
[FromForm][SwaggerSchema(Strings.ClientTransactionIDDescription, Format = "uint32")][Range(0, 4294967295)] uint ClientTransactionID = 0)
115+
{
116+
return ProcessRequest(() => { (DeviceManager.GetFocuser(DeviceNumber) as ASCOM.Simulators.Focuser).ConnectDelay.Value = ConnectDelay; }, DeviceManager.ServerTransactionID, ClientID, ClientTransactionID, $"ConnectDelay={ConnectDelay}");
117+
}
118+
/// <summary>
71119
/// OmniSim Only - True if the focuser can halt
72120
/// </summary>
73121
/// <remarks>

ASCOM.Alpaca.Simulators/Controllers/RotatorSettingsController.cs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,54 @@ namespace ASCOM.Alpaca.Simulators
1919
[Route("simulator/v1/")]
2020
public class RotatorSettingsController : ProcessBaseController
2121
{
22+
/// <summary>
23+
/// OmniSim Only - The delay to be used for Connect() in milliseconds, allowed values are 1-30000
24+
/// </summary>
25+
/// <remarks>
26+
/// <para>The delay to be used for Connect() in milliseconds, allowed values are 1-30000</para>
27+
/// </remarks>
28+
/// <param name="DeviceNumber">Zero based device number as set on the server (A uint32 with a range of 0 to 4294967295)</param>
29+
/// <param name="ClientID">Client's unique ID.</param>
30+
/// <param name="ClientTransactionID">Client's transaction ID.</param>
31+
/// <response code="200">Transaction complete or exception</response>
32+
/// <response code="400" examples="Error message describing why the command cannot be processed">Method or parameter value error, check error message</response>
33+
/// <response code="500" examples="Error message describing why the command cannot be processed">Server internal error, check error message</response>
34+
[HttpGet]
35+
[Produces(MediaTypeNames.Application.Json)]
36+
[ApiExplorerSettings(GroupName = "OmniSim")]
37+
[Route("rotator/{DeviceNumber}/connectdelay")]
38+
public ActionResult<ASCOM.Common.Alpaca.IntResponse> ConnectDelay(
39+
[Required][DefaultValue(0)][SwaggerSchema(Strings.DeviceIDDescription, Format = "uint32")][Range(0, 4294967295)] uint DeviceNumber,
40+
[SwaggerSchema(Strings.ClientIDDescription, Format = "uint32")][Range(0, 4294967295)] uint ClientID = 0,
41+
[SwaggerSchema(Strings.ClientTransactionIDDescription, Format = "uint32")][Range(0, 4294967295)] uint ClientTransactionID = 0)
42+
{
43+
return ProcessRequest(() => ((DeviceManager.GetRotator(DeviceNumber) as ASCOM.Simulators.Rotator)).RotatorHardware.ConnectDelay.Value, DeviceManager.ServerTransactionID, ClientID, ClientTransactionID);
44+
}
45+
/// <summary>
46+
/// OmniSim Only - The delay to be used for Connect() in milliseconds, allowed values are 1-30000
47+
/// </summary>
48+
/// <remarks>
49+
/// <para>The delay to be used for Connect() in milliseconds, allowed values are 1-30000</para>
50+
/// </remarks>
51+
/// <param name="DeviceNumber">Zero based device number as set on the server (A uint32 with a range of 0 to 4294967295)</param>
52+
/// <param name="ConnectDelay">The delay to be used for Connect() in milliseconds, allowed values are 1-30000</param>
53+
/// <param name="ClientID">Client's unique ID.</param>
54+
/// <param name="ClientTransactionID">Client's transaction ID.</param>
55+
/// <response code="200">Transaction complete or exception</response>
56+
/// <response code="400" examples="Error message describing why the command cannot be processed">Method or parameter value error, check error message</response>
57+
/// <response code="500" examples="Error message describing why the command cannot be processed">Server internal error, check error message</response>
58+
[HttpPut]
59+
[Produces(MediaTypeNames.Application.Json)]
60+
[ApiExplorerSettings(GroupName = "OmniSim")]
61+
[Route("rotator/{DeviceNumber}/connectdelay")]
62+
public ActionResult<Response> ConnectDelay(
63+
[Required][DefaultValue(0)][SwaggerSchema(Strings.DeviceIDDescription, Format = "uint32")][Range(0, 4294967295)] uint DeviceNumber,
64+
[Required][FromForm][SwaggerSchema("The delay to be used for Connect() in milliseconds, allowed values are 1-30000")] System.Int16 ConnectDelay,
65+
[FromForm][SwaggerSchema(Strings.ClientIDDescription, Format = "uint32")][Range(0, 4294967295)] uint ClientID = 0,
66+
[FromForm][SwaggerSchema(Strings.ClientTransactionIDDescription, Format = "uint32")][Range(0, 4294967295)] uint ClientTransactionID = 0)
67+
{
68+
return ProcessRequest(() => { ((DeviceManager.GetRotator(DeviceNumber) as ASCOM.Simulators.Rotator)).RotatorHardware.ConnectDelay.Value = ConnectDelay; }, DeviceManager.ServerTransactionID, ClientID, ClientTransactionID, $"ConnectDelay={ConnectDelay}");
69+
}
2270
/// <summary>
2371
/// OmniSim Only - The ASCOM Interface Version, allowed values are 1-4
2472
/// </summary>

0 commit comments

Comments
 (0)