Skip to content

EN_setLinkValue  #42

Open
Open
@sandcastler

Description

@sandcastler

I'm reviewing the code and am 'new' at C++ (though I feel pretty good in VBA/ModL). I noticed that API to set system parameters (EN_setLinkValuie, EN_setControl, EN_setOption, EN_setTimeParam, EN_XXXX, ect...) is not currently developed. If I were to develop some of these, if I understand correctly, I'd want to add to datamanager.cpp; for example, to setLinkValue, I'd take getLinkValue and essentially reverse the method so that the value is set, and not retrieved. so the function would have the same format but essentially switch value and the link parameter variable?

int DataManager::setLinkValue(int index, int param, double value, Network* nw)

and for the switch case:

{
case EN_DIAMETER:
link->diameter * nw->ucf(Units::DIAMETER)=value ;
break;

is it that simple or am I'm missing something.?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions