is it possible in matlab to set maximum runtime for an iperf connection?

i am working on matlab with ipef and would like to set a maximum runtime for the iperf connection to close if it exceeds the runtime,i am using a dos command to set the iperf connection. or do i have to implement a watchdog timer?? if so how could i implement a watchdog timer. Please help me in this regard.Thanks in advance.

 Accepted Answer

If the string you submit to the dos() call does not include an '&' and if the command invoked does not create a separate graphics interface and then return to the shell, then No, you cannot create a MATLAB-level watchdog timer (at least not without using multiple workers.)
If the string you submit to the dos() call has an appropriate '&' then the command will be started in the background, and control will return to MATLAB, which can then run whatever it wants. However, the standard output from the dos program to the MATLAB command window is not going to work in that situation. You might be able to redirect the standard output to a file and read the file from MATLAB.
For example
dos('iperf -p 300 fred.wilma.bambam.org > PingLog.txt &')

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!