NOTE: The decoders
mailing list is no longer active. The list archives are made available for historical reasons.
Hi Steven, > I'm trying to have LDM 5.0.6 send the bulletins to a TCL script so it > can do some slight manipulation of the bulletin. Instead of starting > one copy of the script that receives all of the bulletins, I get many, > many versions of the script each processing one bulletin. Is there > some 'thing' that a scripting language needs to be able to do to be a > 'decoder' in the pqact.conf file? The entry I have in my pqact.conf > is: > > WMO ^FT.... .... [0-3][0-9] > PIPE -strip wmo_ingester data/wmo Your decoder needs to not exit just because there is no data on its input. In C, this is done with a "select" call specifying a timeout on a read, which just blocks when there is no input and completes when input is available. If the timeout expires, it exits gracefully. For LDM decoders, a typical timeout might be 20 minutes. Robb Kambic has written a bunch of perl decoders, and I believe they behave similarly, but I'm not fluent enough in perl to see how he tells them to block waiting for input if no input is currently available. So the trick is, make sure when your decoder reads from its input, it "blocks" (waits without burning up CPU) until input is available, rather than reading an EOF and exiting. The pqact program keeps track of decoders that haven't exited and makes sure new products that match the associated pqact.conf lines are delivered to these active decoders, rather than starting up new ones. pqact also notices when a child decoder exits, and removes it from its decoder list, so new products would cause a new decoder to be started up in this case. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program russ@xxxxxxxxxxxxxxxx http://www.unidata.ucar.edu
decoders
archives: