%description:

Test parameter multiple inheritance for channel interfaces.

%file: test.ned

import testlib.Dump;

channelinterface IChannel
{
    parameters:
        string p0;
}

channelinterface IChannel1 extends IChannel
{
    parameters:
        int p1;
}

channelinterface IChannel2 extends IChannel
{
    parameters:
        double p2;
}

channel TestChannel extends ned.IdealChannel like IChannel1, IChannel2
{
    parameters:
        string p0;
        int p1;
        double p2;
}

module Node
{
    gates:
        inout g;
    connections allowunconnected:
}

network Test
{
    parameters:
        string aType = "TestChannel";
    submodules:
        a: Node;
        b: Node;
        dump: Dump;
    connections:
        a.g$o --> <aType> like IChannel1 { parameters: p0 = "hello"; p1 = 1; p2 = 2; }--> b.g$i;  //FIXME wrong test case! p2 should NOT be avialable here
        b.g$o --> <aType> like IChannel2 { parameters: p0 = "hello"; p1 = 1; p2 = 2; }--> a.g$i;  // and p1 should NOT be avialable here
}

%contains: stdout
module Test: Test {
    parameters:
        @isNetwork
        aType = "TestChannel"
    submodules:
        module Test.a: Node {
            gates:
                g$i: <-- b.g$o, (TestChannel)channel p0="hello" p1=1 p2=2
                g$o: --> b.g$i, (TestChannel)channel p0="hello" p1=1 p2=2
        }
        module Test.b: Node {
            gates:
                g$i: <-- a.g$o, (TestChannel)channel p0="hello" p1=1 p2=2
                g$o: --> a.g$i, (TestChannel)channel p0="hello" p1=1 p2=2
        }
}