question: public void slotFromLocoAddress ( int i , SlotListener l ) { mLocoAddrHash . put ( Integer . valueOf ( i ) , l ) ; LocoNetMessage m = new LocoNetMessage ( 4 ) ; m . setOpCode ( LnConstants . OPC_LOCO_ADR ) ; m . setElement ( 1 , ( i / 128 ) & 0x7F ) ; m . setElement ( 2 , i & 0x7F ) ; tc . sendLocoNetMessage ( m ) ; }
target:  Obtain a slot for a particular loco address. <P> This requires access to the command station, even if the locomotive address appears in the current contents of the slot array, to ensure that our local image is up-to-date. <P> This method sends an info request. When the echo of this is returned from the LocoNet, the next slot-read is recognized as the response. <P> The object that's looking for this information must provide a SlotListener to notify when the slot ID becomes available. <P> The SlotListener is not subscribed for slot notifications; it can do that later if it wants. We don't currently think that's a race condition.