omnet图中选择显示不同的图片

 在omnet++中,在拓扑图的显示中,有时候我们需要显示不同的图片,这里有可以调用它的一个显示函数:
displayString().setTagArg("i",0,"node2");(node2”是你小显示的图片的名字,格式是gif的
这个函数的原型是:
/**
     * Sets an argument for the given tag. The value may be NULL pointer.
     * If index points beyond the last argument, the list of arguments will
     * be extended by inserting intervening empty arguments if necessary.
     *
     * The result is true if the operation was successful. False is returned
     * if the given tag doesn't exist, or index is invalid (negative or
     * greater than the maximum numer of arguments, currently 16).
     */
    bool setTagArg(const char *tagname, int index, const char *value)
 bool cDisplayString::setTagArg(const char *tagname, int index, const char *value)
{
    // may notify() twice (for insert.. and set..), but it's OK
    int t = gettagindex(tagname);
    if (t==-1)
        t = insertTag(tagname);
    return setTagArg(t, index, value);
}
存在于cdispstr.h文件中。可以详细用法可以参考omnet++的使用手册第9章

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值