Skip to content

Conversation

@StephenHidem
Copy link
Owner

PR Classification

Refactor and enhancement of ANT device scanning and logging, along with version updates and test improvements.

PR Summary

Refactored AntDeviceCollection to separate scanning initialization, improved logging, and updated tests and versioning.

  • AntDeviceCollection: Introduced StartScanning method, updated MessageHandler and CreateAntDevice methods.
  • AntDeviceCollectionTests: Updated to use ILogger mocks, added new tests for logging critical errors.
  • SendMessageChannel: Added new internal class for message handling.
  • SendMessageChannelTests: Refactored tests to consolidate NotImplementedException checks.
  • Project files: Updated version to 5.0.0.0, added new version history files and documentation updates.

The line `Dispose();  // clear the channels` was removed from the method where a critical log message is generated if `ChannelId` is null. This change ensures that the code will no longer call the `Dispose` method to clear the channels in this scenario.
- Made `AntDeviceCollection` a partial class.
- Added `_sendMessageChannel` field to `AntDeviceCollection`.
- Simplified `AntDeviceCollection` constructor by removing async initialization.
- Added `StartScanning` method to initialize ANT radio and channels.
- Renamed `Channel_ChannelResponse` to `MessageHandler` and updated it.
- Refactored `CreateAntDevice` to use `_sendMessageChannel`.
- Updated `AntPlus.csproj` to version `5.0.0.0`.
- Added `SendMessageChannel` class to manage multiple ANT channels.
- Implemented async data sending and channel management in `SendMessageChannel`.
Refactored test classes to use mock loggers and updated test methods to be asynchronous. Added new tests for logging critical messages and warnings. Introduced a new `SendMessageChannelTests` class to verify `NotImplementedException` and concurrent method invocations.
Updated `AntPlus.csproj` to include new package release notes indicating breaking changes. The `AntDeviceCollection` constructor no longer initiates ANT device scanning; `StartScanning` must be called after instantiation.

Updated `AntPllusVersionHistory.aml` and `HostingExtensionsVersionHistory.aml` to include new list items with links to the new version history.

Updated `ContentLayout.content` to add new topics for versions 5.0.0.0 and 1.1.1.0, marking version 5.0.0.0 as selected.

Updated `Documentation.shfbproj` to re-add namespace summary items and include new entries for the version history files for versions 5.0.0.0 and 1.1.1.0.

Added new files `v5.0.0.0.aml` and `v1.1.1.0.aml` detailing the releases, including breaking changes, improvements, and a fix for a potential race condition.
@StephenHidem StephenHidem self-assigned this Feb 8, 2025
@StephenHidem StephenHidem merged commit f54ee37 into master Feb 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants