msc: Add SMPP_Emulation + SMPP_Templates
Change-Id: I80efe16f603227694c6242d556ae77590271e4c6
diff --git a/library/SMPP_Templates.ttcn b/library/SMPP_Templates.ttcn
new file mode 100644
index 0000000..9a56cf2
--- /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
+ }
+ }
+}
+
+
+
+
+}