From: <pau...@ac...> - 2007-02-13 17:28:19
|
Hi All, I've been working on a problem that Gerry Hopkins brought up on the users list. We've taken care of Gerry's original problem, but Gerry has brought up an issue that I'm looking for ideas as to how (or if) we can handle this satisfactorily. For background... Gerry is using a CVP EasyDCC system. CVP fixes the communications rate at 9600bps CVP lets you ask for the "Standard Consist" information one consist at a time ("Standard Consists" are created inside the command station, like a Digitrax "Universal Consist"). Through the serial port, we can access consists 1-255 On creation, the consist manager polls the command station to find out what consists exist, and what locomotives are in each consist. After I sent Gerry an update, he reports the following: On 13 Feb, Gerry Hopkins wrote: > I installed the patch, it now counts up to consist 255 (FF) and is > then OK. Is there any need to do this? > > I have to wait until it gets to 255 before I try to read or program a > decoder. Takes a few minutes. What I'm interested in is do any of you have any ideas on how we can lessen the user viewable impact of the process. I'll make the following observations... We might be able to cache the information from the command station between runs of the program, but that doesn't really gain us much (we have no way to tell if a consist was removed or modified in the command station memory between JMRI sessions). We could set up the read to occur when the consist tool is first started, but then we have a several minute delay before the consist manager will be available. We could throttle the rate at which we send out the commands for the command station interrogation. This would lesson the impact to users unless they wanted to use the consist manager right away, in which case we could kill the pacing code. We could only request the consists when a user asks for a specific consist number. This might work in the EasyDCC case, since we are limited to consists with numbers 1-255 (the command station doesn't remember anything about advanced consists, only "Standard Consists"), but that presents a large list to the user for selecting a consist. Does anyone have any other thoughts on how this might be handled? Paul -- ______________________________________________________________________________ "Quality is a Characteristic of thought and statement that is recognized by a nonthinking process. Because definitions are a product of rigid formal thinking, quality cannot be defined." Robert M. Pirsig Zen and The Art of Motorcycle Maintenance |