On Tue, 15 Jul 2003, Reed Hedges wrote:
> OK, I have two changes to CDevice and to main.cc:
> 1. I made an "alwayson" member of CDevice (public). This is normally
> false, unless you set "alwayson" in the config file (like before), or
> the device sets it in its constructor. Then, after the devices are
> created, instead of just checking the config file, parse_config_file
> checks this flag and subscribes if it's true.
> Unfortunately, while useful, this will happen for Stage, since it
> doesn't use the config file, and it looks like only the preceding
> devices in the config file will be in the table. So I also did what I
> suggested before:
> 2. I added a last-minute setup hook in the form of a virtual method to
> CDevice called "Prepare". main() calls each method's "Prepare" method
> on all devices right before going into the main loop.
Frankly, I'd rather not extend the CDevice API further, unless we really need
to. However, looking at what you want to do, I don't see another option. So
go ahead with those changes, but don't document them (I'm sure that you were
just about to), because I don't want other drivers using them. That way we
can take them back out later.
The changes you're making won't be necessary once Stage supports the new
separate config file model, right? Because then you can put "alwayson" in
Player's config file. So these changes can be temporary, basically so that
you get your experiments done in the near term.
Also, I'm thinking that once your name service has been tried out a bit as a
driver, we can just roll it into the server core, since it really provides
fundamental server functionality. At that point, it will be available all the
time and we don't have to worry about config files, "alwayson", etc.