📄 rfc713.txt
字号:
================================| Non-atomic Object: B-LBITSTR |================================The b-LBITSTR (Long BIT Stream) data type is introducedto transmit p-BITS which cannot be handled by a b-SBITSTR.A b-LBITSTR may be used to transmit short p-BITS as well.Its format follows. -15-11000001 size-bytes data-bytesABCDEFGHABC=110 identifies this as a non-atomic object.DEFGH=00001 specifies that it is a b-LBITSTR. The standardsizing information specifies the number of succeeding bytes.Within the data-bytes, the first object encountered mustdecode to a p-INT. This number conveys the length of thebit stream to follow. The actual bit stream begins with thenext byte, and is left-adjusted in the byte stream. Forexample to encode *101010101010*, the following b-LBITSTRcould be used, although a b-SBITSTR would be more compact.11000001 -- identifies a b-LBITSTR00000010 -- b-SINTEGER, to specify length10001100 -- size = 210101010 -- first 8 data bits10100000 -- last 4 data bits==============================| Non-atomic Object: B-STRUC |==============================The b-STRUC (STRUCture) data type is used to transmitany p-STRUC. The translation rules for converting a b-STRUCinto a primitive item are presented following the discussionof b-REPEATs. The b-STRUC format appears as follows.11000010 size-bytes data-bytesABCDEFGHABC=110 identifies this as a non-atomic type.DEFGH=00010 specifies that the object is a b-STRUC. Withinthe data-bytes stream, objects simply follow in order. Thisimplies that the b-STRUC encoder and decoder modules cansimply make use of recursive calls to a standardencoder/decoder for processing each element of the b-STRUC.Note that any type of object is permitted as an element of ab-STRUC, but the size information of the b-STRUC mustinclude all bytes used to represent the elements.Containment of b-STRUCs within other b-STRUCs ispermitted to any reasonable level. That is, a b-STRUC maycontain as an element another b-STRUC, which containsanother b-STRUC, and so on. All servers are requires tohandle such containment to at least a minimum depth ofthree.Examples of encoded structures appear in a latersection. -16-============================| Non-atomic Object: B-EDT |============================A b-EDT is the object used as the carrier for p-EDTs intransmission of semantic items. It is functionallyidentical to a b-STRUC, but has a different type code topermit it to be identified and converted to a semantic iteminstead of a p-STRUC. The format of a b-EDT follows.11000011 size-bytes data-bytesABCDEFGHAs with all non-atomic types, ABC=110 to identify thisas such, and DEFGH=00011 to specify a b-EDT. The objects inthe data-bytes are decoded as for b-STRUCs. However, thefirst object must decode to a p-iNT or p-STRING and thesecond to a p-INT, to conform to the format of p-EDTs.===============================| Non-atomic Object: b-REPEAT |===============================The b-REPEAT object is never translated directly intoan item. It is legal only as an component of an enclosingb-STRUC, b-USTRUC, b-EDT, or b-REPEAT. A b-REPEAT is used toconcisely specify a set of elements to be treated as if theyappeared in the enclosing structure in place of theb-REPEAT. This provides a mechanism for encoding a sequenceof identical data items or patterns efficiently fortransmission.A common example of this would be in transmission oftext, where line images containing long sequences of spaces,or pages containing multiple carriage-return, line-feedpairs, are often encountered. Such sequences could beencoded as an appropriate b-REPEAT to compact the data fortransmission. The format of a b-REPEAT is as follows.11000100 -- identifyIng the object as a b-REPEATsize-bytes -- the standard non-atomic object size informationcountspec -- an object which translates to a p-INT..data -- the objects which define the pattern..The 'countspec' object must translate to an p-INT tospecify the number of times that the following data patternshould be repeated in the object enclosing the b-REPEAT. -17-The remaining objects in the b-REPEAT constitute thedata pattern which is to be repeated. The decoding of theenclosing structure will be continued as if the data patternobjects appeared 'countspec' times in place of the b-REPEAT.Zero repeat counts are permitted, for generality. Theycause no objects to be simulated in the enclosing structure.An encoder does not have to use b-REPEATs at all, ifsimplicity of coding outweighs the benefits of datacompression. In message services, for example, an encodermight limIt itself to only compressing long text strings. Itis important for compatibility, however, to have the abilityin the decoders to handle b-REPEATs.===============================| Non-atomic Object: B-USTRUC |===============================The b-USTRUC (Uniform Structure) object type isprovided to enable servers to convey the fact that a p-STRUCbeing transferred contains items of only a single type. Themost common example would involve a b-USTRUC whichtranslates to a p-STRUC of only p-CHARs, and hence may beconsidered to be a p-STRING. Servers may use thisinformation to assist them in decoding objects efficiently.No server is required to generate b-USTRUCs.The internal construction of a b-USTRUC is identical tothat of a b-STRUC, except for the type-byte. The format of ab-USTRUC follows.11000101 size-bytes data-bytesABCDEFGHABC=110 to identify a non-atomic object. DEFGH=00101specifies the object as a b-USTRUC.===============================| Non-atomic Object: B-STRING |===============================The b-STRING object is included to permit explicitspecification of a structure as a p-STRING. Thisinformation will permit receiving servers to process theincoming structure more efficiently. A b-STRING isformatted similarity to a b-USTRUC, except that its type-byteidentifies the object as a b-STRI/NG. The normal sizinginformation is followed by a stream of bytes which areinterpreted as b-CHAR7s, Ignoring the high-order bit. Theformat of a b-STRING follows.11000110 size-bytes data-bytesABCDEFGHABC=110 to identify a non-atomic object. DEFGH=00110specifies the object as a b-STRING. -18-VI.5 -- Structure Translation RulesA b-STRUC is translated into a p-STRUC. This isperformed by translating each object of the b-STRUC Into itscorresponding item, and saving it for inclusion In thep-STRUC being generated. A b-USTRUC is handled similarly,but the coding programs may utilize the information that theresultant p-STRUC will contain items of uniform type. Thepreferred method of coding p-STRINGS is to use b-USTRUCs.If all of the elements of the resultant p-STRUC arep-CHARs, it is presented to the user of the decoder as ap-STRING. A p-STRING should be considered to be a synonymfor a p-STRUC containing only characters. It need notnecessarily exist at particular sites which would presentp-STRUCs of p-CHARs to their application programsThe object b-REPEAT is handled in a special fashionwhen encountered as an element. When this occurs, the datapattern of the b-REPEAT is translated into a sequence ofitems, and that sequence is repeated in the next higherlevel as many times as specified in the b-REPEAT.Therefore, b-REPEATS are legal only as elements of asurrounding b-STRUC, b-USTRUC, b-EDT, or b-REPEAT.In encoding a p-STRUC or p-STRING for transmission, atranslator may use b-REPEATs as desired to effect datacompression, but their use is not mandatory. Similarly,b-STRINGS may be used, but are not mandatory.A b-EDT is translated into a p-EDT to identify it as acarrier for a semantic item. Otherwise, it is treatedidentically to a b-STRUC.VI.6 -- Translation SummaryThe following table summarizes the possibletranslations between primitive items and objects.p-INT <--> b-LINTEGER, b-SINTEGERp-STRING <--> b-STRING, b-STRUC, b-USTRUCp-STRUC <--> b-STRING, b-STRUC, b-USTRUCp-BITS <--> b=SBITSTR, b-LBITSTRp-CHAR <--> b-CHAR7p-BOOL <--> b-BOOLp-EMPTY <--> b=EMPTYp-XTRA <--> b-XTRAp-EDT <--> b-EDT (all semantic items)-none- <--> b-PADDING-none- <--> b-REPEAT (only within structure)Note that all semantic items are represented as p-EDTswhich always exist as b-EDTs in byte-stream format. -19-V1.7 -- Structure Coding ExamplesThe following stream transmits a b-STRUC containing 3b-SINTEGERs, with values 1, 2, and 3, representing a p-STRUCcontaining three p-INTs, i.e. (1 2 3).11000010 -- b-STRUC00000011 -- size=310000001 -- b-SINTEGER=110000010 -- b-SINTEGER=210000011 -- b-SINTEGER=3The next example represents a b-STRUC containing thecharacters X and Y, followed by the b-LINTEGER 10,representing a p-STRUC of 2 p-CHARs and a p-INT, i.e., ('X''Y' 10). Note that the p-INT prevents considering this ap-STRING.11000010 -- b-STRUC00000100 -- size=401011000 -- b-CHAR7 'X'01011001 -- b-CHAR7 'Y'11100001 -- b-LINTEGER00001010 -- 10Note that a better way to send this p-STRUC would be torepresent the integer as a b-SINTEGER, as shown below.11000010 -- b-STRUC00000011 -- size=301011000 -- b-CHAR7 'X'01011001 -- b-CHAR7 'Y'10001010 -- b-SINTEGER=10The next example shows a b-STRUC of b-CHAR7s. It isthe translation of the b-STRING "HELLO".11000010 -- b-STRUC00000101 -- size=501001000 -- b-CHAR7 'H'01000101 -- b-CHAR7 'E'01001100 -- b-CHAR7 'L'01001100 -- b-CHAR7 'L'01001111 -- b-CHAR7 'O'This datum could also be transmitted as a b-STRING.Note that the character bytes are not necessarily b-CHAR7s,since the high-order bit is ignored.11000110 -- b-STRING00000101 -- size=501001000 -- 'H'01000101 -- 'E'01001100 -- 'L'01001100 -- 'L'01001111 -- 'O' -20-To encode a p-STRING containing 20 carriage-returnline-feed pairs, the following b-STRUC containing a b-REPEATcould be used.11000010 -- b-STRUC00000101 -- size=511000100 -- b-REPEAT00000011 -- size=310010100 -- count, b-SINTEGER=2000001101 -- b-CHAR7, "CR'00001010 -- b-CHAR7, 'IF'To encode a p-STRUC of p-INTs, where the sequencecontains a sequence of thirty 0's preceded by a single 1,the following b-STRUC could be used.11000010 -- b-STRUC00000110 -- size=610000001 -- b-SINTEGER=111000100 -- b-REPEAT00000010 -- size=210011110 -- count, b-SINTEGER=3010000000 -- b-SINTEGER=0VII. A GENERAL DATA TRANSFER SCHEMEThis section considers a possible scheme for extendingthe concept of a data translator into an multi-purpose datatransfer mechanism.The proposed environment would provide a set ofprimitive items, including those enumerated herein butextended as necessary to accommodate a variety ofapplications. Communication between processes would bedefined solely in terms of these items, and wouldspecifically avoid any consideration of the actual formatsin which the data is transferred.A repertoire of translators would be provided, one ofwhich is the MSDTP machinery, for use in converting items toany of a number of transmission formats. Borrowing aconcept from radio terminology, each translator would beanalogous to a different type of modulation scheme, to beused to transfer data through some communications medium.Such media could be an eight-bit byte-oriented connection,36-bit connection, etc. and conceivably have otherdistinguishing features, such as bandwidth, cost, and delay.For each media which a site supports, it would provide itsprogrammers with a module for performing the translationsrequired. -21-Certain media or translators might not handle variousitems. For example, the MSDTP does not handle items whichmight be termed p-FLOATs, p-COMPLEXs, p-ARRAY, and so on. Inaddition, the efficiency of various media for transfer ofspecific items may differ drastically. MSDTP, for example,transfers data frequently used in message handling veryefficiently, but is relatively poor at transfer of verylarge or deep tree structures.Available at each site as a process or subroutinepackage wouLd be a module responsible for interfacing withits counterpart at the other end of the media. Thesemodules would use a protocol, not yet defined, to matchtheir capabilities, and choose a particular media andtranslator, when more than one exists, for transfer of dataitems.Such a facility could totally insulate applicationsfrom need to consider encoding formats, machine differences,and so on, as well as eliminate duplication of effort inproducing such facilities for every new project whichrequires them. In addition, as new translators or media areintroduced, they would become immediately available toexisting users without reprogramming.Implementation of such a protocol should not be verydifficult or time-consuming, since it need not be verysophisticated in choosing the most appropriate transfermechanism in initial implementations. The system isinherently upward-compatible and easily expandable. -22-
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -