[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding extra items to ASN.1



Title: Adding extra items to ASN.1

Dear All,

I currently use SNACC 1.3 to build a number of message definitions, and wanted to know if it was possible to add extra items to the end of a type declaration that can be ignored by the other end.

I have one system that I want to update regularly by adding new elements but the other end that my system connects to I want to stay as per its original declaration (the new elements would not necessarily be used by the other system but perhaps by another system that I have to connect to. I was under the impression that if I sent a message with types declared and one of those types had an extra optional element declared at the end, that the receiving system would ignore it and carry on processing the rest of the message (similar to Extensibility Implied in a way). As an example please see below;

MsgOne {
 HeaderInfo     HeaderInfoType,
 TestAttribs    TestAttribsType OPTIONAL,
 TestParams     TestParamsType OPTIONAL
}

HeaderInfo {
HeaderID        HeaderIDType,
HeaderName      HeaderNameType
}

TestAttribs {
Test1           Test1Type OPTIONAL,
Test2           Test2Type OPTIONAL,
Test3           Test3Type OPTIONAL,
newElement      NewElementType OPTIONAL         (New element added)
}

TestParams {
TestP1          TestP1Type OPTIONAL,
TestP2          TestP2Type OPTIONAL,
TestP3          TestP3Type OPTIONAL,
}


In the above example I have declared a new optional type called newElement. In the other system this new element is not declared so it will not know about. What I wanted to do was send a message with the new element and hope that the other end would ignore it. The ASN.1 code would suggest that when it sees this element it would just drop out of the bottom of the code in a 'when others' declaration and carry on processing the rest of the message, but all I get is an error stating that there was a length discrepancy. The message would be something like (in a simple format);

MsgOne
        HeaderID        1
        HeaderName      Test
        Test1           1      
        Test2           2
        Test3           3
        newElement      new
        TestP1          P1
        TestP2          P2
        TestP3          P3

Thanks,

Simon Kearn
(+44 (0)23 9244 3188
*simon.kearn@xxxxxxxx