org.bidib.wizard.api.model.BoosterNodeInterface 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.AccessoryState;
import org.bidib.jbidibc.messages.enums.BoosterControl;
import org.bidib.wizard.api.model.listener.BoosterStatusListener;
import org.bidib.wizard.model.status.BoosterStatus;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.functions.Action;
import io.reactivex.rxjava3.functions.Consumer;
public interface BoosterNodeInterface {
static final String PROPERTY_BOOSTER_CONTROL = "boosterControl";
/**
* Get the wrapped node.
*
* @return the node
*/
NodeInterface getNode();
/**
* Add the booster status listener.
*
* @param l
* the listener
*/
void addBoosterStatusListener(BoosterStatusListener l);
/**
* Remove the booster status listener.
*
* @param l
* the listener
*/
void removeBoosterStatusListener(BoosterStatusListener l);
/**
* @param current
* the booster current value
*/
void setBoosterCurrent(Integer current, long timestamp);
/**
* @return the booster current
*/
Integer getBoosterCurrent();
/**
* @param boosterMaxCurrent
* the maximum booster current
*/
void setBoosterMaximumCurrent(Integer boosterMaxCurrent);
/**
* @return the maximum booster current
*/
Integer getBoosterMaximumCurrent();
/**
* Update the max booster current value from the features.
*/
void fetchMaxBoosterCurrent();
/**
* @return the lastCurrentUpdate
*/
Long getLastCurrentUpdate();
/**
* @param status
* the booster status
*/
void setBoosterStatus(BoosterStatus status);
/**
* @return the booster status
*/
BoosterStatus getBoosterStatus();
/**
* @param temperature
* the booster temperature
*/
void setBoosterTemperature(Integer temperature);
/**
* @return the booster temperature
*/
Integer getBoosterTemperature();
/**
* @param voltage
* the booster voltage
*/
void setBoosterVoltage(Integer voltage);
/**
* @return the booster voltage
*/
Integer getBoosterVoltage();
/**
* @param boosterControl
* the boosterControl to set
*/
void setBoosterControl(BoosterControl boosterControl);
/**
* @return the boosterControl
*/
BoosterControl getBoosterControl();
/**
* Update the booster control with the accessory state.
*
* @param accessoryState
* the accessory state
*/
void updateBoosterControl(final AccessoryState accessoryState);
/**
* Subscribe to changes of booster state.
*
* @param onNext
* the data consumer
* @param onError
* the error consumer
* @return the disposable
*/
Disposable subscribeSubjectBoosterState(
Consumer onNext, Consumer onError, Action onComplete);
}