Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide API to get Submodule Type from NED file #869

Open
t-moe opened this issue Feb 22, 2021 · 0 comments
Open

Provide API to get Submodule Type from NED file #869

t-moe opened this issue Feb 22, 2021 · 0 comments
Labels
new New issue that has not been yet acknowledged

Comments

@t-moe
Copy link

t-moe commented Feb 22, 2021

Feature Request

Summary

Provide an API method to get the Submodule Type (typename) from a NED file.
E.g I would like to get the string "Ieee80211g" from C++ when having a NED file like:

network Network
{
    parameters:
        node[*].nic.typename = "Ieee80211g";
    submodules:
        node: Node[100];
}

Description

The Omnet Manual Section 3.11 Parametric Submodule and Connection Types states that it is preferred to use "Typename pattern assignments" over "node type strings" when specifying submodule types.

This works well as long as the submodules are constructed by the simulation core. If I as a user want to create the submodules dynamically (e.g. using cModuleType::find(modtypename)->create(..) as seen in netbuilder.cc of the routing example), then I have to escape to "node type strings" again, because there's no API to query the "Typename pattern assignments".

It seems as the functionality is already there in cNedNetworkBuilder::getSubmoduleTypeName, it's just not exposed as public API.

@t-moe t-moe added the new New issue that has not been yet acknowledged label Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new New issue that has not been yet acknowledged
Projects
None yet
Development

No branches or pull requests

1 participant