Hello, I'm new to ASN.1 and am looking for some guidance, I think I'm trying to 
treat it too much like inheritance in c++ but not sure what is the best 
direction..

I would like to define a set of messages that have a common header with three 
guid octet strings, the first of these strings will have a constant, unique 
pre-defined value.  Rough example is below, it compiles, but I've tried many 
syntax variations trying to add default values to msgObj with DEFAULT and 
'abc...'H, etc, but none of them compile.  What are some approaches to do 
something like this?


MsgBase DEFINITIONS ::=
BEGIN

MsgBaseType ::= SEQUENCE {
    msgObj  UuidType,
    srcObj  UuidType,
    dstObj  UuidType
}

UuidType ::= OCTET STRING (SIZE (16)) 

-- how to make header->msgObj unique for IntegerMessage and BoolMessage?
-- say, d6dc8a30428611dbb0de0800200c9a66 and 217fe690428711dbb0de0800200c9a66
-- repectivly??

IntMessage ::= SEQUENCE {
    header MsgBaseType,
    intVal INTEGER
}

BoolMessage ::= SEQUENCE {
    header MsgBaseType,
    boolVal BOOLEAN
}

END



THANK YOU!

Keith

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

Reply via email to