aboutsummaryrefslogtreecommitdiffstats
path: root/library/SMPP_Templates.ttcn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-04-14 10:57:41 +0200
committerHarald Welte <laforge@gnumonks.org>2018-04-14 21:58:16 +0200
commit32ff8b90f4384b5a8732df06c0a1f24da5c7ffb5 (patch)
tree7882422b56703a64b2b95c4c8880a585864447eb /library/SMPP_Templates.ttcn
parent384f4fee234cd9d69178abda8af933e664af5d37 (diff)
msc: Add SMPP_Emulation + SMPP_Templates
Diffstat (limited to 'library/SMPP_Templates.ttcn')
-rw-r--r--library/SMPP_Templates.ttcn125
1 files changed, 125 insertions, 0 deletions
diff --git a/library/SMPP_Templates.ttcn b/library/SMPP_Templates.ttcn
new file mode 100644
index 00000000..9a56cf2c
--- /dev/null
+++ b/library/SMPP_Templates.ttcn
@@ -0,0 +1,125 @@
+module SMPP_Templates {
+
+import from General_Types all;
+import from SMPP_Types all;
+
+template (value) SMPP_header ts_SMPP_hdr(OCT4 command_id, SMPP_error_code status,
+ integer seq := 0) := {
+ command_len := 0,
+ command_id := command_id,
+ command_status := status,
+ seq_num := seq
+}
+template SMPP_header tr_SMPP_hdr(template OCT4 command_id, template SMPP_error_code status,
+ template integer seq := ?) := {
+ command_len := ?,
+ command_id := command_id,
+ command_status := status,
+ seq_num := seq
+}
+
+template (value) SMPP_PDU ts_SMPP(OCT4 command_id, SMPP_error_code status,
+ template (value) SMPP_operation_body body) := {
+ header := ts_SMPP_hdr(command_id, status),
+ body := body
+}
+template SMPP_PDU tr_SMPP(template OCT4 command_id, template SMPP_error_code status,
+ template integer seq := ?,
+ template SMPP_operation_body body := ?) := {
+ header := tr_SMPP_hdr(command_id, status, seq),
+ body := body
+}
+
+
+
+template (value) SMPP_PDU ts_SMPP_BIND_TX(template (value) SMPP_Bind bind) := {
+ header := ts_SMPP_hdr(c_SMPP_command_id_bind_transmitter, ESME_ROK),
+ body := {
+ bind_transmitter := bind
+ }
+}
+template SMPP_PDU tr_SMPP_BIND_TX(template (value) SMPP_Bind bind, template integer seq := ?) := {
+ header := tr_SMPP_hdr(c_SMPP_command_id_bind_transmitter, ESME_ROK, seq),
+ body := {
+ bind_transmitter := bind
+ }
+}
+
+template (value) SMPP_PDU ts_SMPP_BIND_TX_resp(SMPP_error_code status,
+ template (value) SMPP_Bind_resp bind) := {
+ header := ts_SMPP_hdr(c_SMPP_command_id_bind_transmitter_resp, status),
+ body := {
+ bind_transmitter_resp := bind
+ }
+}
+
+template (value) SMPP_PDU ts_SMPP_BIND_RX(template (value) SMPP_Bind bind) := {
+ header := ts_SMPP_hdr(c_SMPP_command_id_bind_receiver, ESME_ROK),
+ body := {
+ bind_receiver := bind
+ }
+}
+template SMPP_PDU tr_SMPP_BIND_RX(template (value) SMPP_Bind bind, template integer seq := ?) := {
+ header := tr_SMPP_hdr(c_SMPP_command_id_bind_receiver, ESME_ROK, seq),
+ body := {
+ bind_receiver := bind
+ }
+}
+
+template (value) SMPP_PDU ts_SMPP_BIND_RX_resp(SMPP_error_code status,
+ template (value) SMPP_Bind_resp bind) := {
+ header := ts_SMPP_hdr(c_SMPP_command_id_bind_receiver_resp, status),
+ body := {
+ bind_receiver_resp := bind
+ }
+}
+
+template (value) SMPP_PDU ts_SMPP_BIND_TRX(template (value) SMPP_Bind bind) := {
+ header := ts_SMPP_hdr(c_SMPP_command_id_bind_transceiver, ESME_ROK),
+ body := {
+ bind_transceiver := bind
+ }
+}
+template SMPP_PDU tr_SMPP_BIND_TRX(template (value) SMPP_Bind bind, template integer seq := ?) := {
+ header := tr_SMPP_hdr(c_SMPP_command_id_bind_transceiver, ESME_ROK, seq),
+ body := {
+ bind_transceiver := bind
+ }
+}
+
+template (value) SMPP_PDU ts_SMPP_BIND_TRX_resp(SMPP_error_code status,
+ template (value) SMPP_Bind_resp bind) := {
+ header := ts_SMPP_hdr(c_SMPP_command_id_bind_transceiver_resp, status),
+ body := {
+ bind_transceiver_resp := bind
+ }
+}
+
+template (value) SMPP_PDU ts_SMPP_ENQ_LINK := {
+ header := ts_SMPP_hdr(c_SMPP_command_id_enquire_link, ESME_ROK),
+ body := {
+ enquire_link := {}
+ }
+}
+
+template (value) SMPP_PDU ts_SMPP_ENQ_LINK_resp := {
+ header := ts_SMPP_hdr(c_SMPP_command_id_enquire_link_resp, ESME_ROK),
+ body := {
+ enquire_link_resp := {}
+ }
+}
+
+template (value) SMPP_PDU ts_SMPP_DELIVER_SM_resp(SMPP_error_code status, integer seq) := {
+ header := ts_SMPP_hdr(c_SMPP_command_id_deliver_sm_resp, status, seq),
+ body := {
+ deliver_sm_resp := {
+ message_id := "", /* unused */
+ opt_pars := omit
+ }
+ }
+}
+
+
+
+
+}