Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 2.82 KB

upayload.adoc

File metadata and controls

73 lines (53 loc) · 2.82 KB

uProtocol Payload (uPayload)

Table of Contents

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in IETF BCP14 (RFC2119 & RFC8174)

SPDX-FileCopyrightText: 2024 Contributors to the Eclipse Foundation

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.

SPDX-FileType: DOCUMENTATION
SPDX-License-Identifier: Apache-2.0

1. Overview

UPayload is a wrapper around a message’s payload data, either by value or reference, as well as some metadata describing the payload like format, size, etc.

Note
Please refer to upayload.proto for more details

2. Payload Format

The following table provides an overview of the payload formats supported by uProtocol.

UPayloadFormat MIME Type Payload encoding

UPAYLOAD_FORMAT_PROTOBUF_WRAPPED_IN_ANY

application/x-protobuf

The message payload MUST be the network byte order serialization of a google.protobuf.Any structure that contains the payload itself along with the schema URI indicating the (protobuf) type of the payload.

UPAYLOAD_FORMAT_PROTOBUF

application/protobuf

The message payload MUST be the network byte order serialization of the protobuf structure representing the payload data.

UPAYLOAD_FORMAT_JSON

application/json

The message payload MUST be the network byte order UTF-8 encoding of a JSON structure representing the payload data.

UPAYLOAD_FORMAT_SOMEIP

application/x-someip

The message payload MUST be the network byte order serialization of SOME/IP payload data.

UPAYLOAD_FORMAT_SOMEIP_TLV

application/x-someip_tlv

The message payload MUST be the network byte order serialization of SOME/IP TLV payload data.

UPAYLOAD_FORMAT_RAW

application/octet-stream

The message payload MUST be a byte array representing the payload data.

UPAYLOAD_FORMAT_TEXT

text/plain

The message payload MUST be the network byte order UTF-8 encoding of a unicode string representing the payload data.