Hello,
Please see the following.
Reference to ITU-T H.225.0 (05/2006), encoding should be performed as aligned
variant PER.
If the encoded data contains CHOICE requestInProgress then first bit should be
1 to indicate that selected CHOICE is in extension. The extension has 8
elements with CHOICE value of 0 for requestInProgress and 7 for
admissionConfirmSequence. This gives a range of 7 - 0 + 1 = 8. This requires 3
bits to encode any value inside this CHOICE extension. Here ub=7 and lb=0.
Value 0 for CHOICE requestInProgress is thus encoded as 0 - 0 (value - lb) = 0
decimal = 000 binary, resulting in bit stream 1000. The least significant four
bits are so far unassigned.
If the CHOICE is in root then first bit should be 0. The root has 25 elements
with gatekeeperRequest having value 0 and unknownMessageResponse 24. This gives
a range of 24 - 0 + 1 = 25. Here ub=24 and lb=0. This requires 5 bits for
encoding any CHOICE in root. So CHOICE unregistrationConfirm with value of 7
will be encoded as 7 - 0 (value - lb)
= 7 decimal = 00111 binary. Resulting bit stream will be 000111. The least
significant two bits are so far unassigned.
The unassigned bits in above encoding are used in encoding the CHOICE element.
Regards,
Shahid.
---- Einat Soudry <[EMAIL PROTECTED]> wrote:
> Hi
>
>
>
> This is my first post in this mailing list, hope to get some help here.
>
> My question is related to H.323 protocol, CHOICE encoding below.
>
>
>
> In my application I have the byte containing the RAS message, in order to
> identify which message is it I do the following:
>
> In case first bit is 1 ( the message is in the extension part) I take the 7
> bits by masking with 0x7f
>
> Is it right calculation? do the messages after the "." are 0 for
> requestInProgress , 1 for resourcesAvailableIndicate, 2 for
> resourcesAvailableConfirm etc' ?
>
>
>
> How should I identify the messages in the first part (not the extension
> part)? What are the 2 least significant bits used for in that case?
>
>
>
>
>
>
>
> RasMessage ::= CHOICE
>
> }
>
> gatekeeperRequest GatekeeperRequest,
>
> gatekeeperConfirm GatekeeperConfirm,
>
> gatekeeperReject GatekeeperReject,
>
> registrationRequest RegistrationRequest,
>
> registrationConfirm RegistrationConfirm,
>
> registrationReject RegistrationReject,
>
> unregistrationRequest UnregistrationRequest,
>
> unregistrationConfirm UnregistrationConfirm,
>
> unregistrationReject UnregistrationReject,
>
> admissionRequest AdmissionRequest,
>
> admissionConfirm AdmissionConfirm,
>
> admissionReject AdmissionReject,
>
> bandwidthRequest BandwidthRequest,
>
> bandwidthConfirm BandwidthConfirm,
>
> bandwidthReject BandwidthReject,
>
> disengageRequest DisengageRequest,
>
> disengageConfirm DisengageConfirm,
>
> disengageReject DisengageReject,
>
> locationRequest LocationRequest,
>
> locationConfirm LocationConfirm,
>
> locationReject LocationReject,
>
> infoRequest InfoRequest,
>
> infoRequestResponse InfoRequestResponse,
>
> nonStandardMessage NonStandardMessage,
>
> unknownMessageResponse UnknownMessageResponse,
>
> ...,
>
> requestInProgress RequestInProgress,
>
> resourcesAvailableIndicate ResourcesAvailableIndicate,
>
> resourcesAvailableConfirm ResourcesAvailableConfirm,
>
> infoRequestAck InfoRequestAck,
>
> infoRequestNak InfoRequestNak,
>
> serviceControlIndication ServiceControlIndication,
>
> serviceControlResponse ServiceControlResponse
>
> {
>
>
>
>
>
> Thank you
>
> Einat
>
_______________________________________________
Asn1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1