1 /******************************************************************************
2 * Copyright (c) 2000-2014 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 ******************************************************************************/
10 import from SGsAP_Types all;
14 external function enc(in PDU_SGsAP pdu) return octetstring
15 with { extension "prototype(convert) encode (RAW)" }
17 external function dec(in octetstring o) return PDU_SGsAP
18 with { extension "prototype(convert) decode (RAW)" }
20 const octetstring expected := '01010829262001030000150200'O; // 200102 040562F2200001
22 testcase tc() runs on H
24 var PDU_SGsAP pdu := {
25 sGsAP_PAGING_REQUEST := {
26 messageType := '00000001'B,
33 digits := '262021030000051'H,
34 fillerDigit := omit } },
42 var octetstring encoded := enc(pdu);
43 if (encoded == expected) { setverdict(pass); }
44 else { setverdict(fail, match(encoded, expected)); }
46 var PDU_SGsAP decc := dec(encoded);