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

Add source address to UAttributes #102

Merged
merged 4 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
21 changes: 13 additions & 8 deletions uprotocol/uattributes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -46,38 +46,43 @@ message UAttributes {
// Message type (publish, request, response)
UMessageType type = 2;

// The source (address) of the message. For published events this is the producers publish topic
// for requests it is the calling uE respose topic (who sent the request). For responses this is the
// method URI from the uService.
UUri source = 3;
stevenhartley marked this conversation as resolved.
Show resolved Hide resolved

// Destination UUri for a message used for unicast message types
// (notification, request, response)
optional UUri sink = 3;
optional UUri sink = 4;
stevenhartley marked this conversation as resolved.
Show resolved Hide resolved


// Message priority per
// https://github.com/eclipse-uprotocol/uprotocol-spec/blob/main/basics/qos.adoc[uProtocol Prioritization]
UPriority priority = 4;
UPriority priority = 5;

// TTL is How long this message should live for after it was generated (in milliseconds).
// Event expires when:
// \$t_current > t_{id} + ttl\$
optional int32 ttl = 5;
optional int32 ttl = 6;

// Permission level per https://github.com/eclipse-uprotocol/uprotocol-spec/blob/main/basics/permissions.adoc[Permissions]
optional int32 permission_level = 6;
optional int32 permission_level = 7;

// 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 = 7;
optional int32 commstatus = 8;

// The correlation ID (UUDI) passed for response type messages to corelate the
// response to a request.
optional UUID reqid = 8;
optional UUID reqid = 9;
Copy link
Contributor

Choose a reason for hiding this comment

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

optional keyword can be removed FMPOV


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

// Optional identifier used to correlate observability across related events
optional string traceparent = 10;
optional string traceparent = 11;
}


Expand Down
12 changes: 3 additions & 9 deletions uprotocol/umessage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,18 @@

import "uattributes.proto";
import "upayload.proto";
import "uri.proto";

option java_package = "org.eclipse.uprotocol.v1";
option java_outer_classname = "UMessageProto";
option java_multiple_files = true;

// UMessage is the top-level message type for the uProtocol.
// It contains a UUri, UAttributes, and UPayload and is a way of representing a
// It contains a header (UAttributes), and payload (UPayload) and is a way of representing a
// message that would be sent between two uEs.
message UMessage {
// The source (address) of the message. For published events this is the producers publish topic
// for requests it is the calling uE respose topic (who sent the request). For responses this is the
// method URI from the uService
UUri source = 1;

// uProtocol mandatory and optional attributes
UAttributes attributes = 2;
UAttributes attributes = 1;

// Optional message payload containing the data to be sent
UPayload payload = 3;
UPayload payload = 2;
}
8 changes: 5 additions & 3 deletions uprotocol/uri.proto
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ message UUri {
// is local.
message UAuthority {
optional string name = 1; // Domain & device name as a string
optional bytes ip = 2; // IPv4 or IPv6 Address in byte format
optional bytes id = 3; // Unique ID for the device, could be a VIN, SHA 128, or any other identifier
// *NOTE:* MAX length is 255 bytes
oneof number {
stevenhartley marked this conversation as resolved.
Show resolved Hide resolved
bytes ip = 2; // IPv4 or IPv6 Address in byte format
bytes id = 3; // Unique ID for the device, could be a VIN, SHA 128, or any other identifier
// *NOTE:* MAX length is 255 bytes
}
}


Expand Down
Loading