Interface KartSequencer
Sequencer interface.
This interface can be used to transfer sequences to the Kart and control and monitor their execution. Note that not all Kart models do support this feature.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the passed kart sequencer listener to the kart.void
Cancels the actually running sequence.boolean
Returns true if a sequence is actually running (or downloaded) on the kart, false if no sequence is running.void
Removes the kart sequencer listener.void
run
(KartSequence sequence) Uploads the sequence to the kart's sequence player and starts it.
-
Method Details
-
isSequenceRunning
boolean isSequenceRunning()Returns true if a sequence is actually running (or downloaded) on the kart, false if no sequence is running.
Note that you can only start a sequence if there is not already a sequence running.
IMPORTANT: This feature is experimental and might not be implemented on all Karts!
Sequences can not be canceled.
- Returns:
- True if sequence is running, false otherwise.
-
cancelRunningSequence
void cancelRunningSequence()Cancels the actually running sequence.
If no sequence is running, the method has no effect.
-
run
Uploads the sequence to the kart's sequence player and starts it. A sequence is executed autonomously by the kart.
As long as the Kart runs the sequence, the all remote control commands (except the sequence stop command) are ignored by the Kart. Control is only recovered after the sequence has been completed or canceled.
IMPORTANT: This feature is experimental and might not be implemented on all Karts!
- Parameters:
sequence
- Sequence to upload to the Kart and start.
-
addKartSequencerListener
Adds the passed kart sequencer listener to the kart.
The listener will be notified about the completion of a sequence started before.
- Parameters:
listener
- Reference to the object implementing the kart sequencer listener interface.- Throws:
NullPointerException
- If the passed listened parameter is null.
-
removeKartSequencerListener
Removes the kart sequencer listener.
- Parameters:
listener
- Reference to the object implementing the kart sequencer listener interface to remove.- Throws:
NullPointerException
- If the passed listened parameter is null.
-