1 // This file is under GNU General Public License 3.0
3 // generated files of this template are under BSD License 2.0
5 // generate message functions
7 // Copyleft (c) 2017, p≡p foundation
9 // Written by Volker Birk
14 include standardlib.ysl2
15 include ./functions.ysl2
17 function "pEp_imports"
18 | IMPORTS Identity, IdentityList, TID, Hash FROM PEP;
22 -- This file is under BSD License 2.0
24 -- «@name» protocol for p≡p
25 -- Copyright (c) 2016-2018 p≡p foundation
27 -- Written by Volker Birk
32 apply "protocol", 0, mode=overview;
33 apply "protocol/fsm", 0, mode=individual;
36 template "protocol", mode=overview
37 document "generated/{yml:lcase(@name)}.asn1", "text" {
42 { iso(1) org(3) dod(6) internet(1) private(4) enterprise(1) pEp(47878) «yml:lcase(@name)»(«@id») }
44 DEFINITIONS AUTOMATIC TAGS EXTENSIBILITY IMPLIED ::=
48 `` for "fsm" | IMPORTS «@name» FROM «yml:ucase(@name)»;
51 `` for "fsm" |> «yml:lcase(@name)» [APPLICATION «@id»] «@name»`if "position()!=last()" > , `
59 template "fsm", mode=individual
60 document "generated/{yml:lcase(@name)}.asn1", "text" {
65 { iso(1) org(3) dod(6) internet(1) private(4) enterprise(1) pEp(47878) «yml:lcase(../@name)»(«../@id») «yml:lcase(@name)»(«@id») }
67 DEFINITIONS AUTOMATIC TAGS EXTENSIBILITY IMPLIED ::=
74 Version ::= SEQUENCE {
75 major INTEGER (0..255) DEFAULT «version/@major»,
76 minor INTEGER (0..255) DEFAULT «version/@minor»
79 `` apply "message", 0, mode=impl;
80 «@name» ::= SEQUENCE {
82 sequence INTEGER -- always increases
86 `` for "message" |>> «yml:mixedCase(@name)» [APPLICATION «@id»] «@name»`if "position()!=last()" > ,`
95 template "message", mode=impl
97 «@name» ::= SEQUENCE {
98 `` for "field|auto" |> «func:asn1name()» «func:asn1type()»`if "position()!=last()" > ,`