Skip to content

Commit 7453229

Browse files
committed
Prep for release to NuGet.
1 parent 1367d49 commit 7453229

File tree

12 files changed

+80
-32
lines changed

12 files changed

+80
-32
lines changed

AntPlus/AntPlus.csproj

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
<PackageId>SmallEarthTech.$(AssemblyName)</PackageId>
99
<Version>$(AssemblyVersion)</Version>
1010
<Title>ANT+ Class Library</Title>
11-
<PackageProjectUrl>https://github.com/StephenHidem/AntPlus</PackageProjectUrl>
11+
<PackageProjectUrl>http://stephenhidem.github.io/AntPlus</PackageProjectUrl>
1212
<Authors>Stephen Hidem</Authors>
13-
<Copyright>© $(Authors). All rights reserved.</Copyright>
13+
<Copyright>© $(Authors) 2023. All rights reserved.</Copyright>
1414
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1515
<IncludeSymbols>True</IncludeSymbols>
1616
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
17-
<PackageReadmeFile>README.md</PackageReadmeFile>
1817
<PackageTags>ant; ant+; ant plus; smallearthtech</PackageTags>
1918
<Description>Enables applications to interface and acquire data from a variety of ANT+ sensor sources. The primary class is AntPlus and it contains device profiles of ANT+ devices and common data pages.</Description>
2019
<RepositoryUrl>https://github.com/StephenHidem/AntPlus</RepositoryUrl>
@@ -23,6 +22,8 @@
2322
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2423
<AssemblyName>SmallEarthTech.$(MSBuildProjectName)</AssemblyName>
2524
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
25+
<PackageIcon>PackageLogo.png</PackageIcon>
26+
<PackageReadmeFile>readme.md</PackageReadmeFile>
2627
</PropertyGroup>
2728

2829
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
@@ -68,13 +69,6 @@
6869
<EmbeddedResource Include="Images\Unknown.png" />
6970
</ItemGroup>
7071

71-
<ItemGroup>
72-
<None Include="..\README.md">
73-
<Pack>True</Pack>
74-
<PackagePath>\</PackagePath>
75-
</None>
76-
</ItemGroup>
77-
7872
<ItemGroup>
7973
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
8074
</ItemGroup>
@@ -89,4 +83,15 @@
8983
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
9084
</PackageReference>
9185
</ItemGroup>
86+
87+
<ItemGroup>
88+
<None Update="PackageLogo.png">
89+
<Pack>True</Pack>
90+
<PackagePath>\</PackagePath>
91+
</None>
92+
<None Update="readme.md">
93+
<Pack>True</Pack>
94+
<PackagePath>\</PackagePath>
95+
</None>
96+
</ItemGroup>
9297
</Project>

AntPlus/PackageLogo.png

73.8 KB
Loading

AntPlus/readme.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Small Earth Technology ANT+ Class Library
2+
Add a reference to this class in your application to interact with ANT+ devices and display sensor data.
3+
##### Supported ANT+ profiles:
4+
- Asset tracker
5+
- Bicycle power
6+
- Bike speed and cadence
7+
- Fitness equipment
8+
- Geocache
9+
- Heart rate monitors
10+
- Muscle oxygen
11+
- Stride based speed and distance
12+
13+
Unknown devices are supported by the UnknownDevice class.

AntRadioInterface/AntRadioInterface.csproj

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99
<Authors>Stephen Hidem</Authors>
1010
<Title>ANT+ Radio Interface Class Library</Title>
1111
<Version>$(AssemblyVersion)</Version>
12-
<Copyright>© $(Authors). All rights reserved.</Copyright>
13-
<PackageProjectUrl>https://github.com/StephenHidem/AntPlus</PackageProjectUrl>
14-
<PackageReadmeFile>README.md</PackageReadmeFile>
15-
<PackageTags>ant; ant+; ant plus; smallearthtech</PackageTags>
12+
<Copyright>© $(Authors) 2023. All rights reserved.</Copyright>
13+
<PackageProjectUrl>http://stephenhidem.github.io/AntPlus</PackageProjectUrl>
14+
<PackageTags>ant; ant+; ant plus; dynastream; smallearthtech</PackageTags>
1615
<RepositoryUrl>https://github.com/StephenHidem/AntPlus</RepositoryUrl>
1716
<Description>The AntRadioInterface defines an interface to interact with an ANT radio to send and receive from an ANT device. Use this package to create a concrete implementation of an ANT radio.</Description>
1817
<PackageLicenseExpression>MIT</PackageLicenseExpression>
@@ -22,21 +21,20 @@
2221
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2322
<AssemblyName>SmallEarthTech.$(MSBuildProjectName)</AssemblyName>
2423
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
24+
<PackageIcon>PackageLogo.png</PackageIcon>
25+
<PackageReadmeFile>readme.md</PackageReadmeFile>
2526
</PropertyGroup>
2627

2728
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
2829
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
2930
</PropertyGroup>
3031

31-
<ItemGroup>
32-
<Compile Remove="IAntResponse.cs" />
33-
</ItemGroup>
32+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'" />
33+
34+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'" />
3435

3536
<ItemGroup>
36-
<None Include="..\README.md">
37-
<Pack>True</Pack>
38-
<PackagePath>\</PackagePath>
39-
</None>
37+
<Compile Remove="IAntResponse.cs" />
4038
</ItemGroup>
4139

4240
<ItemGroup>
@@ -46,4 +44,15 @@
4644
</PackageReference>
4745
</ItemGroup>
4846

47+
<ItemGroup>
48+
<None Update="PackageLogo.png">
49+
<Pack>True</Pack>
50+
<PackagePath>\</PackagePath>
51+
</None>
52+
<None Update="readme.md">
53+
<Pack>True</Pack>
54+
<PackagePath>\</PackagePath>
55+
</None>
56+
</ItemGroup>
57+
4958
</Project>

AntRadioInterface/IAntChannel.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ public interface IAntChannel : IDisposable
129129

130130
#region ANT Channel Functions
131131

132+
/// <summary>Gets the channel number.</summary>
133+
/// <returns>ANT channel number.</returns>
134+
byte ChannelNumber { get; }
135+
132136
/// <summary>
133137
/// Returns current channel status.
134138
/// Throws exception on timeout.

AntRadioInterface/PackageLogo.png

73.8 KB
Loading

AntRadioInterface/readme.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Small Earth Technology ANT+ Radio Interface Library
2+
Derive concrete class implementations from the AntRadioInterface class to support the hardware being used. This largely
3+
follows Dynastream's .NET and native implementations of their ANT USB stick. Multiple interfaces are defined along with
4+
classes to derive from (AntResponse and DeviceCapabilities). These classes and interfaces are used by the ANT+ class library.
5+
6+
See AntUsbStick in the [repository](https://github.com/StephenHidem/AntPlus/tree/master/Examples/AntUsbStick) for an example
7+
that supports the Dynastream/Garmin ANT USB stick.
8+
One important thing to note is this example uses the .NET and native DLLs provided in Dynastream's PC SDK.

Examples/AntMulticastServer/AntMulticastServer.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
<ItemGroup>
1717
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
18+
<PackageReference Include="Serilog.Extensions.Hosting" Version="7.0.0" />
19+
<PackageReference Include="Serilog.Extensions.Logging" Version="7.0.0" />
20+
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
1821
</ItemGroup>
1922

2023
<ItemGroup>

Examples/AntUsbStick/AntChannel.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ internal AntChannel(ANT_Channel channel, ILogger<AntChannel> logger)
2222
_logger = logger;
2323
antChannel = channel;
2424
channel.channelResponse += Channel_channelResponse;
25-
_logger.LogDebug("Created AntChannel {Channel}", channel.getChannelNum());
25+
_logger.LogDebug("Created AntChannel {Channel}", ChannelNumber);
2626
}
2727

2828
private void Channel_channelResponse(ANT_Response response)
2929
{
3030
AntResponse antResponse = new UsbAntResponse(response);
31-
_logger.LogTrace("Channel response. Channel # = {ChannelNumber}, Response ID = {ResponseID}, Payload = {Payload}", antChannel.getChannelNum(), (MessageId)antResponse.ResponseId, BitConverter.ToString(antResponse.Payload ?? new byte[] { 0 }));
31+
_logger.LogTrace("Channel response. Channel # = {ChannelNumber}, Response ID = {ResponseID}, Payload = {Payload}", ChannelNumber, (MessageId)antResponse.ResponseId, BitConverter.ToString(antResponse.Payload ?? new byte[] { 0 }));
3232
ChannelResponse?.Invoke(this, antResponse);
3333
}
3434

@@ -56,6 +56,9 @@ public bool ConfigFrequencyAgility(byte freq1, byte freq2, byte freq3, uint resp
5656
return antChannel.configFrequencyAgility(freq1, freq2, freq3, responseWaitTime);
5757
}
5858

59+
/// <inheritdoc/>
60+
public byte ChannelNumber => antChannel.getChannelNum();
61+
5962
/// <inheritdoc/>
6063
public bool IncludeExcludeListAddChannel(ChannelId channelId, byte listIndex, uint responseWaitTime)
6164
{
@@ -121,7 +124,7 @@ public async Task<MessagingReturnCode> SendExtAcknowledgedData(ChannelId channel
121124
BitConverter.GetBytes(channelId.Id)[3], data, ackWaitTime);
122125
}
123126
});
124-
_logger.LogDebug("SendExtAcknowledgedData: Channel # = {ChannelNumber}, Channel ID = 0x{ChannelId:X8}, Return code = {MRC}, data = {Data}", antChannel.getChannelNum(), channelId.Id, rc, BitConverter.ToString(data));
127+
_logger.LogDebug("SendExtAcknowledgedData: Channel # = {ChannelNumber}, Channel ID = 0x{ChannelId:X8}, Return code = {MRC}, data = {Data}", ChannelNumber, channelId.Id, rc, BitConverter.ToString(data));
125128
return rc;
126129
}
127130

Examples/AntUsbStick/AntUsbStick.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@
3232

3333
<ItemGroup>
3434
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
35-
<PackageReference Include="SmallEarthTech.AntRadioInterface" Version="1.0.1" />
35+
</ItemGroup>
36+
37+
<ItemGroup>
38+
<ProjectReference Include="..\..\AntRadioInterface\AntRadioInterface.csproj" />
3639
</ItemGroup>
3740

3841
<ItemGroup>

0 commit comments

Comments
 (0)