diff --git a/library/AMR_Types.ttcn b/library/AMR_Types.ttcn new file mode 100644 index 000000000..3ef2fbc55 --- /dev/null +++ b/library/AMR_Types.ttcn @@ -0,0 +1,38 @@ +/* + * (C) 2019-2022 by sysmocom s.f.m.c. GmbH + * All rights reserved. + * + * Author: Pau Espin Pedrol + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + */ + +module AMR_Types { + +import from General_Types all; + +/* AMR voice frame type identifiers + * See also 3GPP TS 26.101, Table 1a: Interpretation of Frame Type, Mode + * Indication and Mode Request fields */ +type enumerated AMRFT { + AMR_FT_0, /* 4.75 */ + AMR_FT_1, /* 5.15 */ + AMR_FT_2, /* 5.90 */ + AMR_FT_3, /* 6.70 */ + AMR_FT_4, /* 7.40 */ + AMR_FT_5, /* 7.95 */ + AMR_FT_6, /* 10.2 */ + AMR_FT_7, /* 12.2 */ + AMR_FT_SID /* SID */ +}; + +/* AMR voice frame length (in bytes, rounded), + * See also RFC 3267, chapter 3.6 */ +const integer c_AMRFT_len[9] := {12, 13, 15, 17, 19, 20, 26, 31, 5}; + +function f_amrft_payload_len(INT4b amr_ft) return integer { + return c_AMRFT_len[amr_ft]; +} + +} with { encode "RAW"} diff --git a/library/OSMUX_Emulation.ttcn b/library/OSMUX_Emulation.ttcn index 618926691..10338d275 100644 --- a/library/OSMUX_Emulation.ttcn +++ b/library/OSMUX_Emulation.ttcn @@ -55,6 +55,7 @@ import from General_Types all; import from Osmocom_Types all; import from IPL4asp_Types all; import from Misc_Helpers all; +import from AMR_Types all; import from OSMUX_Types all; import from OSMUX_CodecPort all; import from OSMUX_CodecPort_CtrlFunct all; diff --git a/library/OSMUX_Types.ttcn b/library/OSMUX_Types.ttcn index 091b4d706..8ff7451ac 100644 --- a/library/OSMUX_Types.ttcn +++ b/library/OSMUX_Types.ttcn @@ -83,28 +83,4 @@ type union OSMUX_PDU { )" }; - -/* AMR voice frame type identifiers - * See also 3GPP TS 26.101, Table 1a: Interpretation of Frame Type, Mode - * Indication and Mode Request fields */ -type enumerated AMRFT { - AMR_FT_0, /* 4.75 */ - AMR_FT_1, /* 5.15 */ - AMR_FT_2, /* 5.90 */ - AMR_FT_3, /* 6.70 */ - AMR_FT_4, /* 7.40 */ - AMR_FT_5, /* 7.95 */ - AMR_FT_6, /* 10.2 */ - AMR_FT_7, /* 12.2 */ - AMR_FT_SID /* SID */ -}; - -/* AMR voice frame length (in bytes, rounded), - * See also RFC 3267, chapter 3.6 */ -const integer c_AMRFT_len[9] := {12, 13, 15, 17, 19, 20, 26, 31, 5}; - -function f_amrft_payload_len(INT4b amr_ft) return integer { - return c_AMRFT_len[amr_ft]; -} - } with { encode "RAW"} diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 6d23c101f..cbc22a627 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -24,6 +24,7 @@ module MGCP_Test { import from OSMUX_CodecPort all; import from OSMUX_CodecPort_CtrlFunct all; import from OSMUX_Emulation all; + import from AMR_Types all; import from IPL4asp_Types all; import from General_Types all; import from Native_Functions all; diff --git a/mgw/gen_links.sh b/mgw/gen_links.sh index d59127768..a7b1684d2 100755 --- a/mgw/gen_links.sh +++ b/mgw/gen_links.sh @@ -40,6 +40,7 @@ gen_links $DIR $FILES DIR=../library FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc " +FILES+="AMR_Types.ttcn " FILES+="RTP_CodecPort.ttcn RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_Emulation.ttcn IuUP_EncDec.cc " FILES+="OSMUX_CodecPort.ttcn OSMUX_Emulation.ttcn OSMUX_Types.ttcn OSMUX_CodecPort_CtrlFunct.ttcn OSMUX_CodecPort_CtrlFunctDef.cc " FILES+="Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn "