OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000432OMNeT++IDE / NED editorpublic2011-11-09 13:222011-11-09 14:46
Reportermichael 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
StatusnewResolutionopen 
PlatformOSOS Version
Product Version4.2rc1 
Target VersionFixed in Version 
Summary0000432: Extending vectorized submodule in inherited module
DescriptionIt would be nice if following would be possible:

module A
{
    parameters:
        string pType = default("aa");

    //#...
    submodules:
        low: BaseAny {
        }
        sub[0]: <pType> like IAny {
            //#...
        }
        upp: BaseAny {
        }

    connections:
        low.upperControlOut --> sub[0].lowerControlIn;
        low.upperControlIn <-- sub[0].lowerControlOut;

        for i=0..sizeof(sub)-2 {
            sub[i].upperControlOut --> sub[i+1].lowerControlIn;
            sub[i].upperControlIn <-- sub[i+1].lowerControlOut;
        }

        sub[sizeof(sub)-1].upperControlOut --> upp.lowerControlIn;
        sub[sizeof(sub)-1].upperControlIn <-- upp.lowerControlOut;
}

module B extends A
{
    parameters:
        string pAddOnType = default("aa");

    //#...
    submodules:
        sub[1]: <pAddOnType > like IAny {
            //#...
        }
}
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000587)
rhornig (administrator)
2011-11-09 13:48

It's not clear what you want to achieve. In the example the submodule vector is first declared as 0 size, then in the derived module it is declared as a 1 sized vector. Is the intention is to have a module vector where the elements of the vector have different type (but all implementing IAny)?
(0000588)
michael (reporter)
2011-11-09 14:46

Yes and no, I want to increase the size of sub in B and sub[1] may have another type as sub[0].

I think following is currently allowed (but only in A):

module A
{
    //#...
    submodules:
        low: BaseAny {
        }
        sub[0]: <pType> like IAny {
            //#...
        }
        sub[1]: <pAnotherType> like IAny {
            //#...
        }
        upp: BaseAny {
        }
    //#...
}

the definition of "sub[]:..." results in an error yet and

... "sub++: <pAnotherType> {}" syntax is not correct but it is what I want: extending sub-vector and define other type/parameters for it (should also possible in B).

- Issue History
Date Modified Username Field Change
2011-11-09 13:22 michael New Issue
2011-11-09 13:48 rhornig Note Added: 0000587
2011-11-09 14:46 michael Note Added: 0000588


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker