All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bidib.wizard.api.model.CommandStationNodeInterface Maven / Gradle / Ivy

There is a newer version: 2.0.29
Show newest version
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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy