The Weather Forecasting Forum

Discussions about the latest in meteorology, programs, tools, and techniques
It is currently Tue Dec 12, 2017 6:08 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: timing after spawn
PostPosted: Mon Mar 06, 2006 11:15 pm 
Offline
Junior Member

Joined: Mon Mar 06, 2006 10:57 pm
Posts: 4
Location: San Juan
I built a noaaport system and wrote all the software to receive and process the data
(http://www.noaaport.net). My favorite program to display the data is becoming DA,
except that it lacks the ability to process and display satellite data (GINI files).

I have suggested to David Taylor (of SatSignal and friends) to write a simple program
that could be integrated with DA via the spawn command to add that missing link.
He came up with what appears to be a simple yet effective program for that, and last
night he sent me an evaluation copy that I have been testing.
The program will be available from him.

However I am having a slight problem and I wanted to see if someone could have
an answer to the following. The program is called "giniviewer" and takes as argument
the name of the data file (call it datafile), and produces an image file on disk (call it image.bmp).

Then I use like this

spawn,giniviewer,datafile,0
import,image.bmp

The problem is that giniviewer takes a few seconds to process the data, and then
the script generates an error because it seems that the import instruction is executed
immediately after the spawn command but before the image has been generated.
The "solution" is to insert a sleep interval, like

spawn,giniviewer,datafile,0
sleep,10
import,image.bmp

The question is whether there is any way to specify that the spawn command should
wait until the spawned process finishes, before it goes to the next instruction, or
is this kind of trick the only option.

Thanks for any advice.

Jose F Nieves


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group