pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41123?usp=email )


Change subject: tcap: Add initial templates
......................................................................

tcap: Add initial templates

"continue" message name in asn1 file needs to be modified, since titan
doesn't allow "continue" keyword as union option, and it doesn't find it
as "Continue" (with cap in first character).
I also tried adding "_" at the end, ie. "continue_", but it says the
udnerscore is not permitted inside ASN.1.

Change-Id: Ibc471733554c75b7c494b2bd4126232dd8c0553c
---
M library/tcap/TCAPMessages.asn
A library/tcap/TCAP_Templates.ttcn
2 files changed, 54 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/23/41123/1

diff --git a/library/tcap/TCAPMessages.asn b/library/tcap/TCAPMessages.asn
index 84a3532..b995d7a 100644
--- a/library/tcap/TCAPMessages.asn
+++ b/library/tcap/TCAPMessages.asn
@@ -22,7 +22,7 @@
                                unidirectional                          
[APPLICATION 1]         IMPLICIT Unidirectional,
                                begin                                           
[APPLICATION 2]         IMPLICIT Begin,
                                end                                             
        [APPLICATION 4]         IMPLICIT End,
-                               continue                                        
[APPLICATION 5]         IMPLICIT Continue,
+                               continu                                 
[APPLICATION 5]         IMPLICIT Continue,
                                abort                                           
[APPLICATION 7]         IMPLICIT Abort
 }

diff --git a/library/tcap/TCAP_Templates.ttcn b/library/tcap/TCAP_Templates.ttcn
new file mode 100644
index 0000000..aa12653
--- /dev/null
+++ b/library/tcap/TCAP_Templates.ttcn
@@ -0,0 +1,53 @@
+module TCAP_Templates {
+
+import from General_Types all;
+import from Misc_Helpers all;
+import from Native_Functions all;
+
+import from TCAPMessages language "ASN.1:1997" all;
+import from TCAP_Types all;
+
+
+template (value) TCMessage
+ts_TCAP_Begin(template (value) OCT4 otid) := {
+       begin := {
+               otid := otid,
+               dialoguePortion := omit,
+               components := omit
+       }
+}
+
+template (value) TCMessage
+ts_TCAP_Continue(template (value) OCT4 otid,
+                template (value) OCT4 dtid) := {
+       continu := {
+               otid := otid,
+               dtid := dtid,
+               dialoguePortion := omit,
+               components := omit
+       }
+}
+
+template (value) TCMessage
+ts_TCAP_End(template (value) OCT4 dtid) := {
+       end := {
+               dtid := dtid,
+               dialoguePortion := omit,
+               components := omit
+       }
+}
+
+template (value) TCMessage
+ts_TCAP_Abort(template (value) OCT4 dtid, template (omit) Reason reason := 
omit) := {
+       abort := {
+               dtid := dtid,
+               reason := reason
+       }
+}
+
+template (value) Reason
+ts_TCAP_Reason_p_AbortCause(template (value) P_AbortCause p_abortCause := 0 
/*unrecognizedMessageType*/) := {
+       p_abortCause := p_abortCause
+}
+
+}

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41123?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ibc471733554c75b7c494b2bd4126232dd8c0553c
Gerrit-Change-Number: 41123
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pes...@sysmocom.de>

Reply via email to