On Fri, 11 Oct 2002, Bernard Kufluk wrote:
> Hi,
>
> I have the problem of receiving a message like this:-
>
> ----------------------------------
> | ROSE OPERATION | ARGUMENT |
> ----------------------------------
>
> The architecture I am looking to implement:-
>
> 1. Decode the header and identify the operation value
>
> 2. Use the operation value to decided which plug in to pass the raw
> undecoded argument to.
>
> 3. Decode the argument in the plug in and act appropriately.
>
> This seems to be a typical OSI style model - the first layer decoding the
> outer part of the message; and then passing the inner message on to a
> further layer.
> However when I came to implement this - I find that I cannot find an
> appropriate way to specify the argument part of the rose message - apart
> from OCTET STRING. OCTET STRING seems to be frowned upon as an outmoded
> way of specifying the hole in the packet.
>
> The ROSE ASN.1 definitions seem to be geared towards defining the whole
> packet at decode time - you cannot decode some of the packet without a
> knowledge of the contents.
> The design described above gives two stage decode - so that the orginal
> layer that receives the message does not need to include the ASN.1 for the
> argument. This means that I can then add future plug-in's without having
> to change any code in original layer.
>
> Does anyone have an answer to this ? (or should I use OCTET STRING *or*
> change my architecture to decode the whole packet in one go ?)
"argument" is defined as an open type:
argument OPERATION.&ArgumentType ({Operations} {@opcode})
You will not be able to decode the contents of the open type until you use
"opcode" to determine the type of the value being carried by "argument".
This gives you precisely what you are looking for.
-------------------------------------------------------------------------
Bancroft Scott Toll Free :1-888-OSS-ASN1
OSS Nokalva International:1-732-302-0750
[EMAIL PROTECTED] Tech Support :1-732-302-9669 x-1
1-732-302-9669 x-200 Fax :1-732-302-0023
http://www.oss.com