c++ - NS-3 with DCE: How to get input at runtime working with my binaries -


i'm using ns-3 direct code execution, working on ubuntu, , after while, got work, thing is: have 4 nodes each 1 binary run, , of binaries take input me @ runtime, via std::cin. (they send messages other nodes based on input). need working inside ns-3-environment , couldn't figure out how.

so far, if start simulation , gets point node application starts waiting input (in endless loop), whole thing blocks, doesn't start other applications, never stops simulation. if curiously type , hit enter, says "relocation error: elf-cache/0/libgcc_s.so.1: symbol dl_iterate_phdr, version glibc_2.2.5 not defined in file 0001.so.6 link time reference" , gives me exit code 127.

so, naturally find out how runtime input in ns3, can't find material on this.

so, found solution file input finally. maybe it's useful someone.

std::ifstream config_doc("path/here/file.txt", std::ifstream::binary); 

worked me - if make sure path starts @ designated folder ns3-node. example, if it's 0th (1st) node, has placed inside folder files-0, this: (...) /source/ns-3-dce/files-0/path/here/file.txt (if use path/here/file.txt above). node has home directory in files-x directory.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -