12.03.2010 17:04, Olivier DUBUISSON пишет:
>
> Can someone answer to this?
>
Hello, Olivier
Actually the answer is very simple. See my comments below.

> -------- Original Message --------
> Subject:      ASN.1 help
> Date:         Fri, 12 Mar 2010 14:47:27 +0700
> From:         Lazy Boy<[email protected]>
> To:   <[email protected]>
>
>
>
> Dear You.
>
> I’ll appreciate if you can give me a little favor. When I read ASN.1
> standard I encounter this following syntax :
>
>
>
> *AChBillingChargingCharacteristics {PARAMETERS-BOUND : bound} ::= OCTET
> STRING (SIZE (bound.&minAChBillingChargingLength ..
> bound.&maxAChBillingChargingLength)) *
>
> * (CONSTRAINED BY {-- shall be the result of the BER-encoded value of
> the type -- *
>
> * CAMELAChBillingChargingCharacteristics {bound}*
>
> *}*
>
> *)*
>
> * *
>
> *CAMEL-AChBillingChargingCharacteristics {PARAMETERS-BOUND : bound} ::=
> CHOICE { *
>
> *            timeDurationCharging     [0] SEQUENCE { *
>
> *            maxCallPeriodDuration    [0] INTEGER (1..864000), *
>
> *                        releaseIfdurationExceeded   [1] BOOLEAN DEFAULT
> FALSE, *
>
> *                        tariffSwitchInterval    [2] INTEGER
> (1..86400)   OPTIONAL, *
>
> *                        tone        [3] BOOLEAN DEFAULT FALSE, *
>
> *                        extensions       [4] Extensions {bound} OPTIONAL, *
>
> *            ... *
>
> *            } *
>
> * }*
>
>
>
> With *minAChBillingChargingLength; maxAChBillingChargingLength *values
> are 5 and 177, respectively.
>
>
>
> Can you explain how the type above will be encoded complying Basic
> Encoding Rules?
>
> The more detailed, the better.
>

The notation of AChBillingChargingCharacteristics you've mentioned above
is provided in 3GPP TS 29.078 using earlier ASN.1 syntax with
UserDefinedConstraint.

In terms of modern ASN.1 it may be redefined using ContentsConstraint (X.682 
cl. 11) as follow:

AChBillingChargingCharacteristics {PARAMETERS-BOUND : bound} ::= OCTET STRING
(SIZE(bound.&minAChBillingChargingLength ..
        bound.&maxAChBillingChargingLength))
( CONTAINING CAMEL-AChBillingChargingCharacteristics{bound}
   ENCODED BY oid-BER)

where oid-BER is defined as

oid-BER OBJECT-IDENTIFIER ::= {joint-iso-itu-t asn1 (1) basic-encoding (1)}

If you uses some ASN.1 tools that supports automatic en/decoding of 
ContentConstraint such redefinition is enough to go.

Othewise, you've to manually perform en/decoding in two steps.
For example, the encoding procedure looks like follow:

1) produce complete BER encoding of CAMEL-AChBillingChargingCharacteristics
2) encode resulting octet stream as value of
    AChBillingChargingCharacteristics, that is ordinary OCTET STRING type.

The decoding procedure is inverse one.


Hope this helps.

Roman V. Gerasimov.
>
>
> Best regards and thanks a million.
>
> =========== Lazy Boy ==============
>
> Tran Hai Long
>
> staff of System Development Center of NEO SJC
>
> Mail:      [email protected]<mailto:[email protected]>
>
> Web:     neo.com.vn<http://neo.com.vn>
>
> Mobile: 0973989887
>
> Gmail: [email protected]<mailto:[email protected]>
>
> ********* MAKE IT DIFFERENT ********
> _______________________________________________
> Asn1 mailing list
> [email protected]
> http://lists.asn1.org/mailman/listinfo/asn1
>

_______________________________________________
Asn1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to