jmri.jmrix.loconet.soundloader
Class LoaderEngine

java.lang.Object
  extended by jmri.jmrix.loconet.soundloader.LoaderEngine

public class LoaderEngine
extends Object

Controls the actual LocoNet transfers to download sounds into a Digitrax SFX decoder.

Author:
Bob Jacobsen Copyright (C) 2006

Constructor Summary
LoaderEngine(LocoNetSystemConnectionMemo memo)
           
 
Method Summary
 void dispose()
           
 LocoNetMessage nextTransfer()
          Get the next message for an ongoing WAV download.
 void notify(String message)
          Nofify of status of download.
 void protectedWait(int millis)
          Provide a simple object wait.
 void runDownload(SpjFile file)
          Send the complete sequence to download to a decoder.
 void sendOneWav(int index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoaderEngine

public LoaderEngine(LocoNetSystemConnectionMemo memo)
Method Detail

runDownload

public void runDownload(SpjFile file)
Send the complete sequence to download to a decoder. Intended to be run in a separate thread. Uses "notify" method for status updates; overload that to redirect the messages


sendOneWav

public void sendOneWav(int index)
                throws jmri.jmrix.loconet.soundloader.LoaderEngine.DelayException
Throws:
jmri.jmrix.loconet.soundloader.LoaderEngine.DelayException

notify

public void notify(String message)
Nofify of status of download. This implementation doesn't do much, but this is provided as a separate method to allow easy overloading


protectedWait

public void protectedWait(int millis)
Provide a simple object wait. This handles interrupts, synchonization, etc


nextTransfer

public LocoNetMessage nextTransfer()
Get the next message for an ongoing WAV download. You loop calling nextWavTransfer() until it says it's complete by returning null.


dispose

public void dispose()


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads