Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Fix UAttributes integer type #107

Merged
merged 3 commits into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions uprotocol/uattributes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import "uri.proto";
import "uuid.proto";
import "ustatus.proto";
import "uprotocol_options.proto";

option java_package = "org.eclipse.uprotocol.v1";
Expand Down Expand Up @@ -60,19 +61,19 @@ message UAttributes {
// https://github.com/eclipse-uprotocol/uprotocol-spec/blob/main/basics/qos.adoc[uProtocol Prioritization]
UPriority priority = 5;

// TTL is How long this message should live for after it was generated (in milliseconds).
// TTL is How long this message should live for after it was generated (in milliseconds). If not present,
// or 0 (zero), the message is assumed to not timeout (i.e. live forever).<br>
// Event expires when:
// \$t_current > t_{id} + ttl\$
optional int32 ttl = 6;
optional uint32 ttl = 6;

// Permission level per https://github.com/eclipse-uprotocol/uprotocol-spec/blob/main/basics/permissions.adoc[Permissions]
optional int32 permission_level = 7;
optional uint32 permission_level = 7;
stevenhartley marked this conversation as resolved.
Show resolved Hide resolved

// Communication error attribute populated by uP-L2 dispatchers only when an error
// has occurred in the delivery of RPC request or response events.
// The contents of this attribute, if present, is the unsigned integer representation of
// UCode
optional int32 commstatus = 8;
// If the attribute is not present, there is no communication error
optional UCode commstatus = 8;
Copy link
Contributor

Choose a reason for hiding this comment

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

FMPOV this should be changed according to the outcome of #77

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sophokles73 are you saying the documentation would need to change but not the field name and purpose right? We might add additional UCodes but it shouldn't change the signature

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, communication error is quite a generic term. IMHO it could be used to indicate both a problem at the infrastructure or the application level. This is what I suggested in #77. The only thing that we need to do is to define the semantics of commstatus accordingly in the spec.


// The correlation ID (UUDI) passed for response type messages to corelate the
// response to a request.
Expand All @@ -86,6 +87,23 @@ message UAttributes {
}


// Message that defines a subset of UAttributes used for RPC Method invocation
message CallOptions {
// Message priority per
// https://github.com/eclipse-uprotocol/uprotocol-spec/blob/main/basics/qos.adoc[uProtocol Prioritization]
UPriority priority = 1;

// TTL is How long this message should live for after it was generated (in milliseconds). If not present,
// or 0 (zero), the message is assumed to not timeout (i.e. live forever).<br>
// Event expires when:
// \$t_current > t_{id} + ttl\$
optional uint32 ttl = 2;

// Authorization token used for TAP per https://github.com/eclipse-uprotocol/uprotocol-spec/blob/main/basics/permissions.adoc[Permissions]
optional string token = 3;
}


// uProtocol defines message types. Using the message type, validation can be performed to ensure transport
// validity of the data in the {@link UAttributes}.
enum UMessageType {
Expand Down
Loading