USP requires a mechanism to serialize data to be sent over a message transfer protocol. The description of each individual message and the USP Record encoding scheme is covered in a section of this document and/or in the referenced specification. This version of the specification includes support for:
R-ENC.0 - An implementation using protocol buffers encoding to encode USP Messages (Requests, Responses, and Errors) MUST conform to the schema defined in usp-msg-1-1.proto.
R-ENC.1 - An implementation using protocol buffers encoding to encode USP Records MUST conform to the schema defined in usp-record-1-1.proto.
Protocol Buffers Version 3 uses a set of enumerated elements to coordinate encoding and decoding during transmission. It is intended that these remain backwards compatible, but new versions of the schema may contain new enumerated elements.
R-ENC.2 - If an Endpoint receives a USP payload containing an unknown enumeration value for a known field, the Endpoint MUST report the failure to the receiving MTP to indicate a “bad request” and do no further processing of the USP Record or USP Message.
Protocol Buffers uses a datatype called
oneof. This means that the element
contains elements of one or more varying types.
R-ENC.3 - USP Records and USP Messages that contain an element of type
oneof MUST include 1 and only 1 instance of the element, which MUST contain
one of the possible elements.
R-ENC.4 - A USP Record that violates R-ENC.3 MUST be discarded.
R-ENC.5 - A USP Message that violates R-ENC.3 SHOULD return an error of type 7004 (Invalid Arguments).