summaryrefslogtreecommitdiffstats
path: root/library/SMPP_Templates.ttcn
blob: 9a56cf2c8743b0c1e2d860dcf6044f48709d94b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
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
		}
	}
}




}