Skip to content

Add buffered feature support to port 200 & 201#165

Merged
michaelbeutler merged 3 commits intomainfrom
feature/tag-xl-200-201-buffered
Sep 24, 2025
Merged

Add buffered feature support to port 200 & 201#165
michaelbeutler merged 3 commits intomainfrom
feature/tag-xl-200-201-buffered

Conversation

@michaelbeutler
Copy link
Copy Markdown
Contributor

@michaelbeutler michaelbeutler commented Sep 24, 2025

This pull request adds support for the buffered uplink feature to the TagXLv1 decoder, allowing it to identify when an uplink is considered "buffered" based on its age. The implementation introduces a centralized threshold for buffered status and updates the payload structs and configuration logic to reflect this new feature.

Buffered uplink feature support:

  • Introduced a new constant bufferedAgeThreshold in constants.go to define the age after which an uplink is considered buffered, centralizing the threshold value for easier maintenance.
  • Added the decoder.FeatureBuffered flag to the Features list in getConfig for relevant port/version combinations in decoder.go, ensuring the decoder advertises support for buffered uplinks. [1] [2] [3] [4]

Payload struct enhancements:

  • Implemented the decoder.UplinkFeatureBuffered interface for both Port200Payload and Port201Payload, including stub GetBufferLevel methods and the IsBuffered method, which uses the centralized threshold to determine buffered status based on timestamp age. [1] [2]

Copilot AI review requested due to automatic review settings September 24, 2025 12:08
@michaelbeutler michaelbeutler added the tagxl/v1 Affects decoder for tag XL v1 label Sep 24, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds buffered uplink feature support to the TagXL v1 decoder for port 200 and port 201 payloads by implementing the required interface methods and updating payload configurations.

  • Implements the UplinkFeatureBuffered interface for both Port200Payload and Port201Payload structs
  • Adds decoder.FeatureBuffered to the features list for all port 200 and 201 payload configurations
  • Defines buffered status based on timestamp age (messages older than 5 minutes are considered buffered)

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
pkg/decoder/tagxl/v1/decoder.go Updates payload configurations to include decoder.FeatureBuffered feature
pkg/decoder/tagxl/v1/port200.go Implements UplinkFeatureBuffered interface methods and adds interface assertion
pkg/decoder/tagxl/v1/port201.go Implements UplinkFeatureBuffered interface methods for Port201Payload

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
pkg/decoder/tagxl/v1/decoder.go 85.12% <100.00%> (ø)
pkg/decoder/tagxl/v1/port200.go 100.00% <100.00%> (ø)
pkg/decoder/tagxl/v1/port201.go 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud
Copy link
Copy Markdown

@michaelbeutler michaelbeutler requested a review from a team September 24, 2025 12:19
@michaelbeutler michaelbeutler self-assigned this Sep 24, 2025
@michaelbeutler michaelbeutler merged commit eb5dfe7 into main Sep 24, 2025
9 checks passed
@michaelbeutler michaelbeutler deleted the feature/tag-xl-200-201-buffered branch September 24, 2025 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tagxl/v1 Affects decoder for tag XL v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants