Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add device attributes to ApplicationUp messages #7451

Draft
wants to merge 1 commit into
base: v3.33
Choose a base branch
from

Conversation

vlasebian
Copy link
Contributor

Summary

References #5879

Changes

  • Add attributes field to ApplicationUplink
  • Add attributes field to ApplicationUplinkNormalized
  • Add locations, version_ids, network_ids and attributes fields to ApplicationJoinAccept
  • Add locations, version_ids, network_ids and attributes fields to ApplicationDownlink
  • Add locations, version_ids, network_ids and attributes fields to ApplicationDownlinkFailed
  • Add locations, version_ids, network_ids and attributes fields to ApplicationInvalidatedDownlinks
  • Add locations, version_ids, network_ids and attributes fields to ApplicationServiceData

Testing

TODO

Steps

...

Results
Regressions

...

Notes for Reviewers

...

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • Testing: The steps/process to test this feature are clearly explained including testing for regressions.
  • Infrastructure: If infrastructural changes (e.g., new RPC, configuration) are needed, a separate issue is created in the infrastructural repositories.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@vlasebian vlasebian changed the title api: Add device attributes to ApplicationUp messages feat: Add device attributes to ApplicationUp messages Dec 19, 2024
@vlasebian
Copy link
Contributor Author

vlasebian commented Dec 20, 2024

@johanstokking @KrishnaIyer there is a note in the implementation plan that I don't get completely:

[...] a new binary compatible variant of ApplicationDownlink [2]. [..]

[2] ApplicationDownlink is also used during submission, and it does not make much sense to allow users to submit these fields while pushing a downlink.

I understand that this change has to be made as it does not make sense to set these fields when the application sends a downlink to the end device (the fields should be set on end device creation and not modified through uplinks or downlinks).

Does this mean that a whole new message must be defined where these fields are included? Something like:

message EnrichedApplicationDownlink {
  ApplicationDownlink downlinks = 1;
  // End device location metadata, set by the Application Server while handling the message.
  map<string, Location> locations = 3;

  // End device version identifiers, set by the Application Server while handling the message.
  EndDeviceVersionIdentifiers version_ids = 4;

  // Network identifiers, set by the Network Server that handles the message.
  NetworkIdentifiers network_ids = 5;

  // Attributes for devices, set by the Application Server while handling the message.
  map<string, string> attributes = 6 [(validate.rules).map = {
    max_pairs: 10,
    keys: {
      string: {
        pattern: "^[a-z0-9](?:[-]?[a-z0-9]){2,}$",
        max_len: 36
      }
    },
    values: {
      string: {max_len: 200}
    }
  }];

  // next: 7
}

And by binary compatible variant, does that mean serialisable?

@vlasebian vlasebian self-assigned this Dec 23, 2024
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.

1 participant