osmo-ttcn3-hacks/mgw/RTP_CodecPort.ttcn

62 lines
1.5 KiB
Plaintext

module RTP_CodecPort {
import from IPL4asp_PortType all;
import from IPL4asp_Types all;
import from RTP_Types all;
type record RTP_RecvFrom {
ConnectionId connId,
HostName remName,
PortNumber remPort,
HostName locName,
PortNumber locPort,
RTP_messages_union msg
};
template RTP_RecvFrom t_RTP_RecvFrom(template RTP_messages_union msg) := {
connId := ?,
remName := ?,
remPort := ?,
locName := ?,
locPort := ?,
msg := msg
}
type record RTP_Send {
ConnectionId connId,
RTP_messages_union msg
}
template RTP_Send t_RTP_Send(template ConnectionId connId, template RTP_messages_union msg) := {
connId := connId,
msg := msg
}
private function IPL4_to_RTP_RecvFrom(in ASP_RecvFrom pin, out RTP_RecvFrom pout) {
pout.connId := pin.connId;
pout.remName := pin.remName;
pout.remPort := pin.remPort;
pout.locName := pin.locName;
pout.locPort := pin.locPort;
pout.msg := f_RTP_dec(pin.msg)
} with { extension "prototype(fast)" };
private function RTP_to_IPL4_Send(in RTP_Send pin, out ASP_Send pout) {
pout.connId := pin.connId;
pout.proto := { udp := {} };
pout.msg := f_RTP_enc(pin.msg);
} with { extension "prototype(fast)" };
type port RTP_CODEC_PT message {
out RTP_Send;
in RTP_RecvFrom,
ASP_ConnId_ReadyToRelease,
ASP_Event;
} with { extension "user IPL4asp_PT
out(RTP_Send -> ASP_Send:function(RTP_to_IPL4_Send))
in(ASP_RecvFrom -> RTP_RecvFrom: function(IPL4_to_RTP_RecvFrom);
ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: simple;
ASP_Event -> ASP_Event: simple)"
}
}