On 11 November 2011 23:03, Bob Jacobsen <rgj1927@...> wrote:
> On Nov 11, 2011, at 2:39 PM, Kevin Dickerson wrote:
>> On 11/11/2011 22:23, Bob Jacobsen wrote:
>>> The idea here is that those are working in parallel with other
>>> operations on the layout, e.g. need to be consistent with other
>>> Throttle operations or other Turnout operations.
>> So in both cases, we need to pass into the turnout or throttle manager
>> the correct command station manager, or find a suitable way to get the
>> correct command station manager.
> Yes, I think that's right. It's a bit of a pain because of the number of concrete classes, but I think that's necessary for these cases.
> Eventually, lots of code will be capable of using non-default managers for things, as the Power Control does now. In that case, _all_ the necessary context has to be accessible through the selected manager, because that's the only thing that's being selected.
I'm looking through all of this, I think it is easier to pass around
the SystemConnectionMemo around, as this includes access to other bits
that the throttles use, so it makes sense to just pass one item rather
than three or four.
One thing that I have come across in the Loconet throttles is that
they are still referencing LnTrafficController.instance(), shouldn't
they be referencing the specific traffic controller for the
connection? Therefore should the traffic controller instance() be
down as depreciated?