Commit efc78d21 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ added accompanying examples for standalone use

parent bf70bef3
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
--<ASN1.HugeInteger World-Schema.Rocket.range>--
World-Schema DEFINITIONS AUTOMATIC TAGS ::= 
BEGIN
  Rocket ::= SEQUENCE       
  {
     range     INTEGER, -- huge (see a special directive above)
     name      UTF8String (SIZE(1..16)),
     message   UTF8String DEFAULT "Hello World" , 
     fuel      ENUMERATED {solid, liquid, gas},
     speed     CHOICE     
     { 
        mph    INTEGER,  
        kmph   INTEGER  
     }  OPTIONAL, 
     payload   SEQUENCE OF UTF8String 
  }                                                     
END
+28 −0
Original line number Diff line number Diff line
Package generated_from_Rocket_asn {
    Type String
    Type TODO_RESOLVE_REFERENCED
    Use "\"Rocket.asn\"" as SOURCE_MAPPING
    Structure Rocket (
        Integer range,
        UTF8String ^name,
        UTF8String message,
        Rocket___fuel fuel,
        optional Rocket___speed speed,
        Rocket___payload payload
    )
    Type Integer
    Type UTF8String
    Structure AsnEnum ( )
    Structure Rocket___speed { union } (
        Integer mph,
        Integer kmph
    )
    Constraint union
    Collection Rocket___payload of UTF8String
    Enumerated Rocket___fuel {
        Rocket___fuel solid,
        Rocket___fuel liquid,
        Rocket___fuel gas
    }
    Map Rocket to "\"Rocket\"" in SOURCE_MAPPING as Rocket_MAPPING
    Package generated_from_World_Schema }
 No newline at end of file
+21 −0
Original line number Diff line number Diff line
LibraryASN1module DEFINITIONS ::=
BEGIN
  Library ::= SEQUENCE {
     address   UTF8String DEFAULT "Sophia-Antipolis, France", 
     documents SEQUENCE OF Document
  }
  
  Document ::= SEQUENCE {
     title     UTF8String (SIZE(1..128)),
     status    ENUMERATED {draft, published, historical},
     authors   SEQUENCE OF UTF8String,
     number    CHOICE { 
        es     INTEGER,  
        eg     INTEGER,
        tr     INTEGER  
     }  OPTIONAL,
     updated   DATE
  }


END
 No newline at end of file
+35 −0
Original line number Diff line number Diff line
Package generated_from_example_1_library_asn {
    Type String
    Type TODO_RESOLVE_REFERENCED
    Use "\"example-1-library.asn\"" as SOURCE_MAPPING
    Structure Library (
        UTF8String address,
        Library___documents documents
    )
    Structure Document (
        UTF8String title,
        Document___status status,
        Document___authors authors,
        optional Document___number number,
        Date updated
    )
    Type UTF8String
    Collection Library___documents of Document
    Structure AsnEnum ( )
    Collection Document___authors of UTF8String
    Structure Document___number { union } (
        Integer es,
        Integer eg,
        Integer tr
    )
    Constraint union
    Type Integer
    Type Date
    Enumerated Document___status {
        Document___status draft,
        Document___status published,
        Document___status historical
    }
    Map Library to "\"Library\"" in SOURCE_MAPPING as Library_MAPPING
    Map Document to "\"Document\"" in SOURCE_MAPPING as Document_MAPPING
    Package generated_from_LibraryASN1module }
 No newline at end of file
+37 −0
Original line number Diff line number Diff line
SSPASN1module DEFINITIONS ::=
BEGIN
    NodeDescriptor ::= SEQUENCE
    {
        aNodeName NodeName,  -- Node name
        aShortName UUID,  -- Short node name
        aNode CHOICE
        {
            aLink SEQUENCE
            {
                aLinkedFileIdentity NodeIdentity,  -- Identity of the linked SSP file
                aLinkedFileSize FileSize  -- Size of the linked SSP file
            },
            aFile SEQUENCE
            {
                aFileSize FileSize  -- Size of the SSP file
            },
            aDirectory SEQUENCE
            {
            }
        },
        aMetaData SEQUENCE OF MetaDatum OPTIONAL,  -- Optional meta data
        aACL SET OF AccessControl OPTIONAL  -- Access Control List attribute
    }
    
    /* Node identity */
    NodeName ::= UTF8String (SIZE(1..16))  -- node name encoded in UTF-8
    NodeReference ::= SEQUENCE (SIZE(1..6)) OF NodeName  -- pathname and node name
    
    NodeIdentity ::= CHOICE
    {
        aShortName UUID,  -- UUID of file reference using absolute pathname
        aNodeReference NodeReference  -- Node reference
    }


END
 No newline at end of file
Loading