in reply to Re: Page refresh, timings and simulations
in thread Page refresh, timings and simulations
Dear all,
Thanks for the suggestions.
What I have decided to do is fairly straightforward and easy so it doesn't have to do anything fancy like forking processes as suggested in the article pointed out.
As the simulations are not time critical (the 10 seconds was purely for observation purposes so that people had time to study a screen of data looking for salient points), then the perl program has time to read a shed load of data if required.
SO:
(upon PC startup in the morning) the perl program initialises all its variables then checks for the existance of a specifically-named data file. If file does not exist, program waits for simulator input to start the whole process for the day. Forms HTML file with first pass of data received, displays HTML on screen. The perl file then stores ALL relevant pieces of data that it needs in the specifically-named data file.
The HTML file displaying the data, after a delay (the 10 seconds above)(via Javascript as the META tag "refresh" is NOT standard and should not be used according to the W3C's own technical pages) calls for itself to be refreshed by running the perl program again.
The perl program, upon entry again from the very start, again initialises all its variables. As before, it checks for the existance of the specifically-named data file (remember it was created at the end of the very first daily pass), sees that it is there and reads in the values that it requires from the file, over-writing the defaults that were set up by the initialisations. Creates new HTML file/display with the new values and away it goes until it is time for cocoa at bed time.
Ths interaction here gives both the perl and the html plenty of time to do their job (remember there is nothing else going on on this particular PC), gives personnel time to read what is on the screen, and enables the perl program to 'remember' what went before. It is also easy to document in both paper and program terms so that anyone with only a limited knowledge of perl and html can adapt easily if so required.
Things are chugging away merrily as I write!
Thanks for the suggestions