简体   繁体   English

如何将CSV文件集成到OMNeT ++最新版本中?

[英]How can I integrate a CSV-File into OMNeT++ latest Version?

I use the Version 5.4.1 and Need to add a CSV-File that contains weather datas to OMNeT++ for simulating the Dataexchange between nodes. 我使用版本5.4.1,并且需要向OMNeT ++添加一个包含天气数据的CSV文件,以模拟节点之间的数据交换。 I do not know how I can add this file to OMNeT++ and could not find anything helpful in the documentation. 我不知道如何将该文件添加到OMNeT ++,并且在文档中找不到任何有用的信息。 Thanks. 谢谢。

OMNeT++ uses C++ to define behavior of modules, so one can use any available in C++ way to open a CSV file and parse it, for example look at this answer . OMNeT ++使用C ++定义模块的行为,因此人们可以使用任何可用C ++方式打开CSV文件并进行解析,例如查看此答案
Moreover, OMNeT++ API contains cStringTokenizer class that may be used to parse a string. 而且,OMNeT ++ API包含可用于解析字符串的cStringTokenizer类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM