org.bidib.wizard.api.model.CommandStationNodeInterface Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bidibwizard-api Show documentation
Show all versions of bidibwizard-api Show documentation
jBiDiB BiDiB Wizard API POM
package org.bidib.wizard.api.model;
import org.bidib.jbidibc.messages.enums.CommandStationProgState;
import org.bidib.wizard.api.model.listener.CommandStationStatusListener;
import org.bidib.wizard.model.status.CommandStationStatus;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.functions.Action;
import io.reactivex.rxjava3.functions.Consumer;
public interface CommandStationNodeInterface {
/**
* Get the wrapped node.
*
* @return the node
*/
NodeInterface getNode();
/**
* Add a command station status listener.
*
* @param commandStationStatusListener
* the listener
*/
void addCommandStationStatusListener(CommandStationStatusListener commandStationStatusListener);
/**
* Remove a command station status listener.
*
* @param commandStationStatusListener
* the listener
*/
void removeCommandStationStatusListener(CommandStationStatusListener commandStationStatusListener);
/**
* Subscribe to changes of command station state.
*
* @param onNext
* the data consumer
* @param onError
* the error consumer
* @return the disposable
*/
Disposable subscribeSubjectCommandStationState(
Consumer onNext, Consumer onError, Action onComplete);
/**
* Subscribe to changes of command station prog state.
*
* @param onNext
* the data consumer
* @param onError
* the error consumer
* @return the disposable
*/
Disposable subscribeSubjectCommandStationProgState(
Consumer onNext, Consumer onError);
/**
* @return the commandStationState
*/
CommandStationStatus getCommandStationStatus();
/**
* @param commandStationState
* the commandStationState to set
*/
void setCommandStationStatus(CommandStationStatus commandStationState);
/**
* @return the commandStationProgState
*/
CommandStationProgState getCommandStationProgState();
/**
* @param commandStationProgState
* the commandStationProgState to set
*/
void setCommandStationProgState(CommandStationProgState commandStationProgState);
/**
* @return the DCCA available flag
*/
Boolean isDccAdvAvailable();
/**
* Set the DCCA available flag.
*
* @param dccAdvAvailable
* the DCCA available flag
*/
void setDccAdvAvailable(Boolean dccAdvAvailable);
}