Show More
@@ -740,6 +740,44 All textual data encoded in these frames | |||||
740 | The last atom in the frame SHOULD end with a newline (``\n``). If it |
|
740 | The last atom in the frame SHOULD end with a newline (``\n``). If it | |
741 | doesn't, clients MAY add a newline to facilitate immediate printing. |
|
741 | doesn't, clients MAY add a newline to facilitate immediate printing. | |
742 |
|
742 | |||
|
743 | Progress Update (``0x07``) | |||
|
744 | -------------------------- | |||
|
745 | ||||
|
746 | This frame holds the progress of an operation on the peer. Consumption | |||
|
747 | of these frames allows clients to display progress bars, estimated | |||
|
748 | completion times, etc. | |||
|
749 | ||||
|
750 | Each frame defines the progress of a single operation on the peer. The | |||
|
751 | payload consists of a CBOR map with the following bytestring keys: | |||
|
752 | ||||
|
753 | topic | |||
|
754 | Topic name (string) | |||
|
755 | pos | |||
|
756 | Current numeric position within the topic (integer) | |||
|
757 | total | |||
|
758 | Total/end numeric position of this topic (unsigned integer) | |||
|
759 | label (optional) | |||
|
760 | Unit label (string) | |||
|
761 | item (optional) | |||
|
762 | Item name (string) | |||
|
763 | ||||
|
764 | Progress state is created when a frame is received referencing a | |||
|
765 | *topic* that isn't currently tracked. Progress tracking for that | |||
|
766 | *topic* is finished when a frame is received reporting the current | |||
|
767 | position of that topic as ``-1``. | |||
|
768 | ||||
|
769 | Multiple *topics* may be active at any given time. | |||
|
770 | ||||
|
771 | Rendering of progress information is not mandated or governed by this | |||
|
772 | specification: implementations MAY render progress information however | |||
|
773 | they see fit, including not at all. | |||
|
774 | ||||
|
775 | The string data describing the topic SHOULD be static strings to | |||
|
776 | facilitate receivers localizing that string data. The emitter | |||
|
777 | MUST normalize all string data to valid UTF-8 and receivers SHOULD | |||
|
778 | validate that received data conforms to UTF-8. The topic name | |||
|
779 | SHOULD be ASCII. | |||
|
780 | ||||
743 | Stream Encoding Settings (``0x08``) |
|
781 | Stream Encoding Settings (``0x08``) | |
744 | ----------------------------------- |
|
782 | ----------------------------------- | |
745 |
|
783 |
@@ -45,6 +45,7 FRAME_TYPE_COMMAND_DATA = 0x03 | |||||
45 | FRAME_TYPE_BYTES_RESPONSE = 0x04 |
|
45 | FRAME_TYPE_BYTES_RESPONSE = 0x04 | |
46 | FRAME_TYPE_ERROR_RESPONSE = 0x05 |
|
46 | FRAME_TYPE_ERROR_RESPONSE = 0x05 | |
47 | FRAME_TYPE_TEXT_OUTPUT = 0x06 |
|
47 | FRAME_TYPE_TEXT_OUTPUT = 0x06 | |
|
48 | FRAME_TYPE_PROGRESS = 0x07 | |||
48 | FRAME_TYPE_STREAM_SETTINGS = 0x08 |
|
49 | FRAME_TYPE_STREAM_SETTINGS = 0x08 | |
49 |
|
50 | |||
50 | FRAME_TYPES = { |
|
51 | FRAME_TYPES = { | |
@@ -54,6 +55,7 FRAME_TYPES = { | |||||
54 | b'bytes-response': FRAME_TYPE_BYTES_RESPONSE, |
|
55 | b'bytes-response': FRAME_TYPE_BYTES_RESPONSE, | |
55 | b'error-response': FRAME_TYPE_ERROR_RESPONSE, |
|
56 | b'error-response': FRAME_TYPE_ERROR_RESPONSE, | |
56 | b'text-output': FRAME_TYPE_TEXT_OUTPUT, |
|
57 | b'text-output': FRAME_TYPE_TEXT_OUTPUT, | |
|
58 | b'progress': FRAME_TYPE_PROGRESS, | |||
57 | b'stream-settings': FRAME_TYPE_STREAM_SETTINGS, |
|
59 | b'stream-settings': FRAME_TYPE_STREAM_SETTINGS, | |
58 | } |
|
60 | } | |
59 |
|
61 | |||
@@ -107,6 +109,7 FRAME_TYPE_FLAGS = { | |||||
107 | FRAME_TYPE_BYTES_RESPONSE: FLAGS_BYTES_RESPONSE, |
|
109 | FRAME_TYPE_BYTES_RESPONSE: FLAGS_BYTES_RESPONSE, | |
108 | FRAME_TYPE_ERROR_RESPONSE: FLAGS_ERROR_RESPONSE, |
|
110 | FRAME_TYPE_ERROR_RESPONSE: FLAGS_ERROR_RESPONSE, | |
109 | FRAME_TYPE_TEXT_OUTPUT: {}, |
|
111 | FRAME_TYPE_TEXT_OUTPUT: {}, | |
|
112 | FRAME_TYPE_PROGRESS: {}, | |||
110 | FRAME_TYPE_STREAM_SETTINGS: {}, |
|
113 | FRAME_TYPE_STREAM_SETTINGS: {}, | |
111 | } |
|
114 | } | |
112 |
|
115 |
General Comments 0
You need to be logged in to leave comments.
Login now