Add Javadoc to RuffyCommands.

This commit is contained in:
Johannes Mockenhaupt 2017-11-01 23:54:18 +01:00
parent fe45b917be
commit fe3385cce8
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -5,24 +5,34 @@ import java.util.Date;
import de.jotomo.ruffy.spi.history.PumpHistoryRequest; import de.jotomo.ruffy.spi.history.PumpHistoryRequest;
public interface RuffyCommands { public interface RuffyCommands {
/** Issues a bolus issues updates on progress through via {@link BolusProgressReporter}. */
CommandResult deliverBolus(double amount, BolusProgressReporter bolusProgressReporter); CommandResult deliverBolus(double amount, BolusProgressReporter bolusProgressReporter);
/** Requests cancellation of an active bolus if possible. */
void cancelBolus(); void cancelBolus();
CommandResult setTbr(int percent, int duration); CommandResult setTbr(int percent, int duration);
CommandResult cancelTbr(); CommandResult cancelTbr();
/** Confirms an active warning alert on the pump.
* @see PumpWarningCodes */
CommandResult confirmAlert(int warningCode); CommandResult confirmAlert(int warningCode);
/** Indicate if the pump is ready to receive commands. */
boolean isPumpAvailable(); boolean isPumpAvailable();
/** Indicate of the pump is busy processing a command. */
boolean isPumpBusy(); boolean isPumpBusy();
/** Read the state of the pump, which encompasses all information displayed on the main menu. */
CommandResult readPumpState(); CommandResult readPumpState();
/** Read revervoir level and last bolus via Quick Info */
CommandResult readReservoirLevelAndLastBolus(); CommandResult readReservoirLevelAndLastBolus();
/** Reads pump history via the My Data menu. The {@link PumpHistoryRequest} specifies
* what types of data and how far back data is returned. */
CommandResult readHistory(PumpHistoryRequest request); CommandResult readHistory(PumpHistoryRequest request);
CommandResult readBasalProfile(int number); CommandResult readBasalProfile(int number);
@ -33,8 +43,10 @@ public interface RuffyCommands {
CommandResult setDateAndTime(Date date); CommandResult setDateAndTime(Date date);
// TODO below methods are drafts
void requestPairing(); void requestPairing();
/** Send the key displayed on the pump during pairing/bonding. */
void sendAuthKey(String key); void sendAuthKey(String key);
void unpair(); void unpair();