> That's interesting. What does this structure mean actually? How are you
>expected to parse it?
>
>You can always use something like IMPLICIT SEQUENCE OF ANY, and then
>read the raw der data from there and parse it as Data. However, that
>structure definition looks like a test for a parser rather than a useful
>structure.
>
>
>regards,
>Nikos
>
>

Actually MMS is the protocol which suggests an infrastructure to applied 
protocols through accessing to variables. Variable object model defined as

 UNNAMED-VARIABLE ::= CLASS {
     &address  Address,
     &accessControl Identifier,
     &typeDescription    TypeDescription,
     &value    Data,
     &accessMethod  ENUMERATED {
        public     
     }
} 

Here Data is a variable data value and is returned as a part of AccessResult 
structure of accessing to a MMS variable object. 

The whole Data's structure is

Data ::= CHOICE {
    -- context tag 0 is reserved for AccessResult
    array     [1] IMPLICIT SEQUENCE OF Data,
    structure [2] IMPLICIT SEQUENCE OF Data,
    boolean   [3] IMPLICIT BOOLEAN,
    bit-string     [4] IMPLICIT BIT STRING,
    integer   [5] IMPLICIT INTEGER,
    unsigned  [6] IMPLICIT INTEGER, -- shall not be negative
    floating-point [7] IMPLICIT FloatingPoint,
    --   [8] is reserved
    octet-string   [9] IMPLICIT OCTET STRING,
    visible-string [10] IMPLICIT VisibleString,
    generalized-time    [11] IMPLICIT GeneralizedTime,
    binary-time    [12] IMPLICIT TimeOfDay,
    bcd  [13] IMPLICIT INTEGER, -- shall not be negative
    booleanArray   [14] IMPLICIT BIT STRING,
    objId     [15] IMPLICIT OBJECT IDENTIFIER,
    mMSString [16] IMPLICIT MMSString
} 

MMS variable object's value could be not just a simple value but a tree-like 
structure of values like this

Report (which is Data.array)
    ReferenceNumber (which is Data.integer)
    Name (which is Data.mMSString)
    NumberOfFloatingPoint1 (which is Data.unsigned)
    ListOfFloatingPointValues (which is Data.array)
        Matrix_Id
        FloatArray_XX (which is Data.array)
            Value1(which is Data.floating-point), Value2, Value3, Value4,...

IEC60870-6-503's Bilateral Table object, Transfer Set objects and other are 
mapped to MMS Named variables objects. Therefore their access results such 
complex data value structures generating.

I suppose when a structure is been created asn1_create_element() shouldn't go 
futher in depth than member which actually represents CHOICE. I think of CHOICE 
member is something like subtree's connection point. If I wish to construct 
leaf which actually tree I call asn1_write_value() with another value been 
created by asn1_create_element() call.

Regards, Yaroslav.

Reply via email to