Skip to content

Bugfix/apps update ptransfer fix deprecation - #1470

Merged
skarg merged 8 commits into
masterfrom
bugfix/apps-update-ptransfer-fix-deprecation
Aug 14, 2026
Merged

Bugfix/apps update ptransfer fix deprecation#1470
skarg merged 8 commits into
masterfrom
bugfix/apps-update-ptransfer-fix-deprecation

Conversation

@skarg

@skarg skarg commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

skarg added 7 commits August 14, 2026 09:35
- Updated the main application to send a ConfirmedPrivateTransfer message with multiple application values.
- Removed the old ptransfer solution and source files, replacing them with a new implementation.
- Introduced new handler files for ConfirmedPrivateTransfer requests and acknowledgments.
- Added support for sending ConfirmedPrivateTransfer requests with a list of encoded values.
- Improved error handling and response management for the ConfirmedPrivateTransfer service.
- Updated service registration and initialization to accommodate the new service handlers.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes the ptransfer demo by moving ConfirmedPrivateTransfer send/handler logic into the core stack’s basic service layer, wiring the server demo to handle confirmed private transfers, and updating build targets accordingly.

Changes:

  • Add core stack support for ConfirmedPrivateTransfer request send (s_pt.*) and confirmed request/ack handlers (h_pt.*, h_pt_a.*), and expose them via services.h.
  • Update the apps/ptransfer CLI to send one-or-more application values and rely on the new core send/handler support (removing legacy app-local implementations).
  • Add/adjust build entries for the new sources and a CMake app target for ptransfer.

Reviewed changes

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

Show a summary per file
File Description
src/bacnet/basic/services.h Exposes new ConfirmedPrivateTransfer send/handler headers via the basic services umbrella include.
src/bacnet/basic/service/s_pt.h Updates the public sender API for ConfirmedPrivateTransfer to take a value list.
src/bacnet/basic/service/s_pt.c Adds a stack-level ConfirmedPrivateTransfer request sender implementation.
src/bacnet/basic/service/h_pt.h Updates confirmed private transfer handler prototype and export decoration.
src/bacnet/basic/service/h_pt.c Adds a stack-level confirmed private transfer request handler implementation.
src/bacnet/basic/service/h_pt_a.h Updates confirmed private transfer ACK handler prototype and export decoration.
src/bacnet/basic/service/h_pt_a.c Adds a stack-level confirmed private transfer ACK handler implementation.
apps/server/main.c Registers the new confirmed private transfer handler in the server demo.
apps/ptransfer/main.c Reworks the ptransfer CLI to encode tag/value pairs and send via the new stack sender.
apps/ptransfer/Makefile Renames the built artifact (currently inconsistent with other build paths).
apps/Makefile Adds ptransfer to the app build subdirectories.
Makefile Adds top-level ptransfer and uptransfer convenience targets.
CMakeLists.txt Adds new core service sources to the library and adds a CMake app target for ptransfer.
apps/ptransfer/s_ptransfer.c Removes legacy app-local ConfirmedPrivateTransfer sender implementation.
apps/ptransfer/h_pt.c Removes legacy app-local ConfirmedPrivateTransfer request handler implementation.
apps/ptransfer/h_pt_a.c Removes legacy app-local ConfirmedPrivateTransfer ACK handler implementation.
apps/ptransfer/ptransfer.sln Removes an obsolete Visual Studio solution file.
Suppressed comments (1)

src/bacnet/basic/service/h_pt.c:63

  • On decode failure (decode_len < 0), the abort APDU is also encoded at Handler_Transmit_Buffer[0] and will be overwritten by the NPDU header encoded later. Encode this abort APDU at &Handler_Transmit_Buffer[npdu_len] (after the NPDU length is known).
        decode_len = ptransfer_decode_service_request(
            service_request, service_len, &data);
        if (decode_len < 0) {
            apdu_len = abort_encode_apdu(
                &Handler_Transmit_Buffer[0], service_data->invoke_id,
                ABORT_REASON_OTHER, true);

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/bacnet/basic/service/h_pt.c Outdated
Comment thread src/bacnet/basic/service/s_pt.c
Comment thread src/bacnet/basic/service/s_pt.c
Comment thread apps/ptransfer/main.c
Comment thread apps/ptransfer/Makefile
@skarg
skarg merged commit 052f49b into master Aug 14, 2026
36 checks passed
@skarg
skarg deleted the bugfix/apps-update-ptransfer-fix-deprecation branch August 14, 2026 19:32
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.

2 participants