Created with colorer-take5 library. Type 'asn1'
<ivmai@mail.ru>
IvmaiAsn-XDR-Encoding
ENCODING-DEFINITIONS ::= BEGIN
EXPORTS
XDREncodingRules;
IMPORTS;
nullEncoding #NULL ::= {
ENCODING-SPACE }
integerEncoding #INTEGER ::= {
ENCODINGS {
{
IF semi-bounded-without-negatives
ENCODING-SPACE
SIZE 1
MULTIPLE OF dword32
ENCODING positive-int },
{
IF bounded-with-negatives
ENCODING-SPACE
SIZE fixed-to-max
MULTIPLE OF dword32 },
{
IF bounded-without-negatives
ENCODING-SPACE
SIZE fixed-to-max
MULTIPLE OF dword32
ENCODING positive-int },
{
ENCODING-SPACE
SIZE 1
MULTIPLE OF dword32 } } }
booleanEncoding #BOOLEAN ::= {
USE #INTEGER
MAPPING VALUES {
FALSE TO 0,
TRUE TO 1 }
WITH integerEncoding }
#LengthAndElements {< #Element >} ::= #CONCATENATION {
length #INTEGER (0 .. MAX),
elements #Element }
charsWithLenEncoding {< REFERENCE: length >} #IA5String ::= {
TRANSFORMS {
{
CHAR-TO-BITS
AS iso10646
SIZE 1
MULTIPLE OF octet } }
REPETITION-ENCODING {
REPETITION-SPACE
SIZE variable-with-determinant
MULTIPLE OF repetitions
USING length } }
concatPaddedEncoding #CONCATENATION ::= {
ENCODING-SPACE
MULTIPLE OF dword32
VALUE-PADDING
JUSTIFIED left: 0
POST-PADDING zero
UNUSED BITS
DETERMINED BY not-needed
}
lengthAndCharsEncoding {< #Element >}
#LengthAndElements {< #Element >} ::= {
ENCODE STRUCTURE {
length integerEncoding,
elements charsWithLenEncoding {< length >}
STRUCTURED WITH concatPaddedEncoding } }
ia5stringEncoding #IA5String ::= {
REPETITION-ENCODING {
REPLACE
STRUCTURE
WITH #LengthAndElements
ENCODED BY lengthAndCharsEncoding } }
#FixedElements {< #Element >} ::= #CONCATENATION {
elements #Element }
octetsNoLenEncoding #OCTET-STRING ::= {
REPETITION-ENCODING {
REPETITION-SPACE
MULTIPLE OF repetitions } }
fixedOctetsEncoding {< #Element >}
#FixedElements {< #Element >} ::= {
ENCODE STRUCTURE {
elements octetsNoLenEncoding
STRUCTURED WITH concatPaddedEncoding } }
octetsWithLenEncoding {< REFERENCE: length >} #OCTET-STRING ::= {
REPETITION-ENCODING {
REPETITION-SPACE
SIZE variable-with-determinant
MULTIPLE OF repetitions
USING length } }
lengthAndOctetsEncoding {< #Element >}
#LengthAndElements {< #Element >} ::= {
ENCODE STRUCTURE {
length integerEncoding,
elements octetsWithLenEncoding {< length >}
STRUCTURED WITH concatPaddedEncoding } }
octetStringEncoding #OCTET-STRING ::= {
REPETITION-ENCODINGS {
{
IF fixed-size
REPLACE
STRUCTURE
WITH #FixedElements
ENCODED BY fixedOctetsEncoding },
{
REPLACE
STRUCTURE
WITH #LengthAndElements
ENCODED BY lengthAndOctetsEncoding } } }
sequenceofNoLenEncoding #SEQUENCE-OF ::= {
REPETITION-ENCODING {
REPETITION-SPACE
MULTIPLE OF repetitions } }
concatenationEncoding #CONCATENATION ::= {
ENCODING-SPACE }
fixedSequenceofEncoding {< #Element >}
#FixedElements {< #Element >} ::= {
ENCODE STRUCTURE {
elements sequenceofNoLenEncoding
STRUCTURED WITH concatenationEncoding } }
sequenceofWithLenEncoding {< REFERENCE: length >} #SEQUENCE-OF ::= {
REPETITION-ENCODING {
REPETITION-SPACE
SIZE variable-with-determinant
MULTIPLE OF repetitions
USING length } }
lengthAndSequenceofEncoding {< #Element >}
#LengthAndElements {< #Element >} ::= {
ENCODE STRUCTURE {
length integerEncoding,
elements sequenceofWithLenEncoding {< length >}
STRUCTURED WITH concatenationEncoding } }
sequenceOfEncoding #SEQUENCE-OF ::= {
REPETITION-ENCODINGS {
{
IF fixed-size
REPLACE
STRUCTURE
WITH #FixedElements
ENCODED BY fixedSequenceofEncoding },
{
REPLACE
STRUCTURE
WITH #LengthAndElements
ENCODED BY lengthAndSequenceofEncoding } } }
sequenceEncoding #SEQUENCE ::= {
ENCODING-SPACE }
tagEncoding #TAG ::= {
ENCODING-SPACE
SIZE 1
MULTIPLE OF dword32
EXHIBITS HANDLE "Tag"
AT {
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 } }
choiceEncoding #CHOICE ::= {
ALTERNATIVE
DETERMINED BY handle
HANDLE "Tag" }
XDREncodingRules #ENCODINGS ::= {
nullEncoding |
integerEncoding |
booleanEncoding |
ia5stringEncoding |
octetStringEncoding |
sequenceOfEncoding |
sequenceEncoding |
tagEncoding |
choiceEncoding }
END