module MNCC_CodecPort { import from MNCC_Types all; import from UD_PortType all; import from UD_Types all; type record MNCC_send_data { MNCC_PDU data, integer id }; private function MNCC_to_UD(in MNCC_send_data pin, out UD_send_data pout) { pout.id := pin.id; pout.data := enc_MNCC_PDU(pin.data); } with { extension "prototype(fast)" } private function UD_to_MNCC(in UD_send_data pin, out MNCC_send_data pout) { pout.id := pin.id; pout.data := dec_MNCC_PDU(pin.data); } with { extension "prototype(fast)" } type port MNCC_CODEC_PT message { out UD_close; out UD_listen; in UD_listen_result; out UD_shutdown; out UD_connect; in UD_connect_result; inout MNCC_send_data; in UD_connected; } with { extension "user UD_PT out ( UD_close -> UD_close:simple; UD_listen -> UD_listen:simple; UD_shutdown -> UD_shutdown:simple; UD_connect -> UD_connect:simple; MNCC_send_data -> UD_send_data: function(MNCC_to_UD) ) in ( UD_listen_result -> UD_listen_result:simple; UD_connect_result -> UD_connect_result:simple; UD_send_data -> MNCC_send_data: function(UD_to_MNCC); UD_connected -> UD_connected:simple )" }; template MNCC_send_data t_SD_MNCC(integer id, template MNCC_PDU pdu) := { data := pdu, id := id } template MNCC_send_data t_SD_MNCC_MSGT(integer id, template MNCC_MsgType msg_type) := { data := { msg_type := msg_type, u := ? }, id := id } }