Skip to content

Commit aecf1d5

Browse files
committed
OpenedFrameType and OpenedPortType have been removed.
The GetSerialString and GetProductDescription methods in AntUsbRadio have been marked as obsolete. Overloads in the interfaces have been removed in favor of optional arguments with default values. The GetDeviceCapabilities method may require rework in implementations.
1 parent 680fec6 commit aecf1d5

File tree

1,060 files changed

+1979
-4206
lines changed

Some content is hidden

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

1,060 files changed

+1979
-4206
lines changed

AntRadioInterface/AntRadioInterface.csproj

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
2424
<PackageIcon>PackageLogo.png</PackageIcon>
2525
<PackageReadmeFile>readme.md</PackageReadmeFile>
26-
<PackageReleaseNotes>OpenedFrameType and OpenedPortType have been removed in this release. The GetSerialString method in IAntUsbRadio is redundant and has been marked as obsolete.</PackageReleaseNotes>
26+
<PackageReleaseNotes>
27+
OpenedFrameType and OpenedPortType have been removed in this release. The GetSerialString and GetProductDescription methods in IAntUsbRadio have been marked as obsolete.
28+
Overloads in the interfaces have been removed in favor of optional arguments with default values. The GetDeviceCapabilities method may require rework in implementations.
29+
</PackageReleaseNotes>
2730
</PropertyGroup>
2831

2932
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">

AntRadioInterface/IAntConfiguration.cs

+26-75
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public enum LibConfigFlags
3434
RadioConfigAlways = 0x01,
3535
/// <summary>The message out inc time stamp</summary>
3636
MesgOutIncTimeStamp = 0x20,
37-
/// <summary>The message out inc rssi</summary>
37+
/// <summary>The message out inc RSSI</summary>
3838
MesgOutIncRssi = 0x40,
3939
/// <summary>The message out inc device identifier</summary>
4040
MesgOutIncDeviceId = 0x80,
@@ -48,37 +48,23 @@ public interface IAntConfiguration
4848
/// <param name="maxPacketLength">Maximum length of the packet.</param>
4949
/// <param name="requiredFields">The required fields.</param>
5050
/// <param name="optionalFields">The optional fields.</param>
51-
void ConfigureAdvancedBursting(bool enable, byte maxPacketLength, AdvancedBurstConfigFlags requiredFields, AdvancedBurstConfigFlags optionalFields);
52-
/// <summary>Configures the advanced bursting.</summary>
53-
/// <param name="enable">if set to <c>true</c> [enable].</param>
54-
/// <param name="maxPacketLength">Maximum length of the packet.</param>
55-
/// <param name="requiredFields">The required fields.</param>
56-
/// <param name="optionalFields">The optional fields.</param>
57-
/// <param name="responseWaitTime">The response wait time.</param>
51+
/// <param name="responseWaitTime">The response wait time in milliseconds. The default is 0ms.</param>
5852
/// <returns>
5953
/// true if successful
6054
/// </returns>
61-
bool ConfigureAdvancedBursting(bool enable, byte maxPacketLength, AdvancedBurstConfigFlags requiredFields, AdvancedBurstConfigFlags optionalFields, uint responseWaitTime);
62-
/// <summary>Configures the extended advanced bursting.</summary>
63-
/// <param name="enable">if set to <c>true</c> [enable].</param>
64-
/// <param name="maxPacketLength">Maximum length of the packet.</param>
65-
/// <param name="requiredFields">The required fields.</param>
66-
/// <param name="optionalFields">The optional fields.</param>
67-
/// <param name="stallCount">The stall count.</param>
68-
/// <param name="retryCount">The retry count.</param>
69-
void ConfigureAdvancedBursting_ext(bool enable, byte maxPacketLength, AdvancedBurstConfigFlags requiredFields, AdvancedBurstConfigFlags optionalFields, ushort stallCount, byte retryCount);
55+
bool ConfigureAdvancedBursting(bool enable, byte maxPacketLength, AdvancedBurstConfigFlags requiredFields, AdvancedBurstConfigFlags optionalFields, uint responseWaitTime = 0);
7056
/// <summary>Configures the extended advanced bursting.</summary>
7157
/// <param name="enable">if set to <c>true</c> [enable].</param>
7258
/// <param name="maxPacketLength">Maximum length of the packet.</param>
7359
/// <param name="requiredFields">The required fields.</param>
7460
/// <param name="optionalFields">The optional fields.</param>
7561
/// <param name="stallCount">The stall count.</param>
7662
/// <param name="retryCount">The retry count.</param>
77-
/// <param name="responseWaitTime">The response wait time.</param>
63+
/// <param name="responseWaitTime">The response wait time in milliseconds. The default is 0ms.</param>
7864
/// <returns>
7965
/// true if successful
8066
/// </returns>
81-
bool ConfigureAdvancedBursting_ext(bool enable, byte maxPacketLength, AdvancedBurstConfigFlags requiredFields, AdvancedBurstConfigFlags optionalFields, ushort stallCount, byte retryCount, uint responseWaitTime);
67+
bool ConfigureAdvancedBursting_ext(bool enable, byte maxPacketLength, AdvancedBurstConfigFlags requiredFields, AdvancedBurstConfigFlags optionalFields, ushort stallCount, byte retryCount, uint responseWaitTime = 0);
8268
/// <summary>Configures the advanced burst splitting.</summary>
8369
/// <param name="splitBursts">if set to <c>true</c> [split bursts].</param>
8470
/// <returns>
@@ -89,111 +75,76 @@ public interface IAntConfiguration
8975
/// <param name="config">The configuration.</param>
9076
/// <param name="size">The size.</param>
9177
/// <param name="time">The time.</param>
92-
void ConfigureEventBuffer(EventBufferConfig config, ushort size, ushort time);
93-
/// <summary>Configures the event buffer.</summary>
94-
/// <param name="config">The configuration.</param>
95-
/// <param name="size">The size.</param>
96-
/// <param name="time">The time.</param>
97-
/// <param name="responseWaitTime">The response wait time.</param>
78+
/// <param name="responseWaitTime">The response wait time in milliseconds. The default is 0ms.</param>
9879
/// <returns>
9980
/// true if successful
10081
/// </returns>
101-
bool ConfigureEventBuffer(EventBufferConfig config, ushort size, ushort time, uint responseWaitTime);
102-
/// <summary>Configures the event filter.</summary>
103-
/// <param name="eventFilter">The event filter.</param>
104-
void ConfigureEventFilter(ushort eventFilter);
82+
bool ConfigureEventBuffer(EventBufferConfig config, ushort size, ushort time, uint responseWaitTime = 0);
10583
/// <summary>Configures the event filter.</summary>
10684
/// <param name="eventFilter">The event filter.</param>
107-
/// <param name="responseWaitTime">The response wait time.</param>
85+
/// <param name="responseWaitTime">The response wait time in milliseconds. The default is 0ms.</param>
10886
/// <returns>
10987
/// true if successful
11088
/// </returns>
111-
bool ConfigureEventFilter(ushort eventFilter, uint responseWaitTime);
89+
bool ConfigureEventFilter(ushort eventFilter, uint responseWaitTime = 0);
11290
/// <summary>Configures the high duty search.</summary>
11391
/// <param name="enable">if set to <c>true</c> [enable].</param>
11492
/// <param name="suppressionCycles">The suppression cycles.</param>
115-
void ConfigureHighDutySearch(bool enable, byte suppressionCycles);
116-
/// <summary>Configures the high duty search.</summary>
117-
/// <param name="enable">if set to <c>true</c> [enable].</param>
118-
/// <param name="suppressionCycles">The suppression cycles.</param>
119-
/// <param name="responseWaitTime">The response wait time.</param>
93+
/// <param name="responseWaitTime">The response wait time in milliseconds. The default is 0ms.</param>
12094
/// <returns>
12195
/// true if successful
12296
/// </returns>
123-
bool ConfigureHighDutySearch(bool enable, byte suppressionCycles, uint responseWaitTime);
97+
bool ConfigureHighDutySearch(bool enable, byte suppressionCycles, uint responseWaitTime = 0);
12498
/// <summary>Configures the user NVM.</summary>
12599
/// <param name="address">The address.</param>
126100
/// <param name="data">The data.</param>
127101
/// <param name="size">The size.</param>
128-
void ConfigureUserNvm(ushort address, byte[] data, byte size);
129-
/// <summary>Configures the user NVM.</summary>
130-
/// <param name="address">The address.</param>
131-
/// <param name="data">The data.</param>
132-
/// <param name="size">The size.</param>
133-
/// <param name="responseWaitTime">The response wait time.</param>
102+
/// <param name="responseWaitTime">The response wait time in milliseconds. The default is 0ms.</param>
134103
/// <returns>
135104
/// true if successful
136105
/// </returns>
137-
bool ConfigureUserNvm(ushort address, byte[] data, byte size, uint responseWaitTime);
106+
bool ConfigureUserNvm(ushort address, byte[] data, byte size, uint responseWaitTime = 0);
138107
/// <summary>Crystal enable.</summary>
139-
void CrystalEnable();
140-
/// <summary>Crystal enable.</summary>
141-
/// <param name="responseWaitTime">The response wait time.</param>
108+
/// <param name="responseWaitTime">The response wait time in milliseconds. The default is 0ms.</param>
142109
/// <returns>
143110
/// true if successful
144111
/// </returns>
145-
bool CrystalEnable(uint responseWaitTime);
146-
/// <summary>Enables the led.</summary>
147-
/// <param name="isEnabled">if set to <c>true</c> [is enabled].</param>
148-
void EnableLED(bool isEnabled);
149-
/// <summary>Enables the led.</summary>
112+
bool CrystalEnable(uint responseWaitTime = 0);
113+
/// <summary>Enables the LED.</summary>
150114
/// <param name="isEnabled">if set to <c>true</c> [is enabled].</param>
151-
/// <param name="responseWaitTime">The response wait time.</param>
115+
/// <param name="responseWaitTime">The response wait time in milliseconds. The default is 0ms.</param>
152116
/// <returns>
153117
/// true if successful
154118
/// </returns>
155-
bool EnableLED(bool isEnabled, uint responseWaitTime);
119+
bool EnableLED(bool isEnabled, uint responseWaitTime = 0);
156120
/// <summary>Enables Rx extended messages.</summary>
157121
/// <param name="isEnabled">if set to <c>true</c> [is enabled].</param>
158-
void EnableRxExtendedMessages(bool isEnabled);
159-
/// <summary>Enables Rx extended messages.</summary>
160-
/// <param name="isEnabled">if set to <c>true</c> [is enabled].</param>
161-
/// <param name="responseWaitTime">The response wait time.</param>
122+
/// <param name="responseWaitTime">The response wait time in milliseconds. The default is 0ms.</param>
162123
/// <returns>
163124
/// true if successful
164125
/// </returns>
165-
bool EnableRxExtendedMessages(bool isEnabled, uint responseWaitTime);
126+
bool EnableRxExtendedMessages(bool isEnabled, uint responseWaitTime = 0);
166127
/// <summary>Sets the library configuration.</summary>
167128
/// <param name="libConfigFlags">The library configuration flags.</param>
168-
void SetLibConfig(LibConfigFlags libConfigFlags);
169-
/// <summary>Sets the library configuration.</summary>
170-
/// <param name="libConfigFlags">The library configuration flags.</param>
171-
/// <param name="responseWaitTime">The response wait time.</param>
129+
/// <param name="responseWaitTime">The response wait time in milliseconds. The default is 0ms.</param>
172130
/// <returns>
173131
/// true if successful
174132
/// </returns>
175-
bool SetLibConfig(LibConfigFlags libConfigFlags, uint responseWaitTime);
133+
bool SetLibConfig(LibConfigFlags libConfigFlags, uint responseWaitTime = 0);
176134
/// <summary>Sets the network key.</summary>
177135
/// <param name="netNumber">The network number.</param>
178136
/// <param name="networkKey">The network key.</param>
179-
void SetNetworkKey(byte netNumber, byte[] networkKey);
180-
/// <summary>Sets the network key.</summary>
181-
/// <param name="netNumber">The network number.</param>
182-
/// <param name="networkKey">The network key.</param>
183-
/// <param name="responseWaitTime">The response wait time.</param>
137+
/// <param name="responseWaitTime">The response wait time in milliseconds. The default is 0ms.</param>
184138
/// <returns>
185139
/// true if successful
186140
/// </returns>
187-
bool SetNetworkKey(byte netNumber, byte[] networkKey, uint responseWaitTime);
188-
/// <summary>Sets the transmit power for all channels.</summary>
189-
/// <param name="transmitPower">The transmit power.</param>
190-
void SetTransmitPowerForAllChannels(TransmitPower transmitPower);
141+
bool SetNetworkKey(byte netNumber, byte[] networkKey, uint responseWaitTime = 0);
191142
/// <summary>Sets the transmit power for all channels.</summary>
192143
/// <param name="transmitPower">The transmit power.</param>
193-
/// <param name="responseWaitTime">The response wait time.</param>
144+
/// <param name="responseWaitTime">The response wait time in milliseconds. The default is 0ms.</param>
194145
/// <returns>
195146
/// true if successful
196147
/// </returns>
197-
bool SetTransmitPowerForAllChannels(TransmitPower transmitPower, uint responseWaitTime);
148+
bool SetTransmitPowerForAllChannels(TransmitPower transmitPower, uint responseWaitTime = 0);
198149
}
199150
}

AntRadioInterface/IAntControl.cs

+6-19
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,17 @@ public interface IAntControl
55
{
66
/// <summary>Open channel 0 in continuous scan mode. Channel 0 should have been
77
/// previously assigned and configured as a slave receive channel.</summary>
8-
void OpenRxScanMode();
9-
/// <summary>Open channel 0 in continuous scan mode. Channel 0 should have been
10-
/// previously assigned and configured as a slave receive channel.</summary>
11-
/// <param name="responseWaitTime">The response wait time.</param>
8+
/// <param name="responseWaitTime">The response wait time in milliseconds. The default is 0ms.</param>
129
/// <returns>
1310
/// true if successful
1411
/// </returns>
15-
bool OpenRxScanMode(uint responseWaitTime);
12+
bool OpenRxScanMode(uint responseWaitTime = 0);
1613
/// <summary>This message is sent to the ANT radio to request specific information from the radio.</summary>
17-
/// <param name="channelNum">The channel number.</param>
1814
/// <param name="messageID">The message identifier.</param>
19-
void RequestMessage(byte channelNum, RequestMessageID messageID);
20-
/// <summary>This message is sent to the ANT radio to request specific information from the radio.</summary>
21-
/// <param name="messageID">The message identifier.</param>
22-
void RequestMessage(RequestMessageID messageID);
23-
/// <summary>Resets the ANT radio.</summary>
24-
/// <remarks>
25-
/// Execution of this command terminates all channels.All information previously configured
26-
/// in the system can no longer be considered valid. The application should wait 500ms before any
27-
/// further commands are issued from the host.
28-
/// </remarks>
29-
void ResetSystem();
15+
/// <param name="channelNum">The channel number. The default channel is 0.</param>
16+
void RequestMessage(RequestMessageID messageID, byte channelNum = 0);
3017
/// <summary>Resets the ANT radio.</summary>
31-
/// <param name="responseWaitTime">The response wait time.</param>
18+
/// <param name="responseWaitTime">The response wait time in milliseconds. The default is 500ms.</param>
3219
/// <returns>
3320
/// true if successful
3421
/// </returns>
@@ -37,6 +24,6 @@ public interface IAntControl
3724
/// in the system can no longer be considered valid. The application should wait 500ms before any
3825
/// further commands are issued from the host.
3926
/// </remarks>
40-
bool ResetSystem(uint responseWaitTime);
27+
bool ResetSystem(uint responseWaitTime = 500);
4128
}
4229
}

0 commit comments

Comments
 (0)