public interface EquipmentObserver
Modifier and Type | Method and Description |
---|---|
void |
onAutoLoginRequest() |
void |
onConnected()
This method is called after a successful connection to equipment.
|
void |
onConnection()
This method is called before the app make connection to the equipment.
|
void |
onConsoleMaxInclineReceived(double maxIncline)
This method is called in response to the GET_CONSOLE_MAX_INCLINE message.
|
void |
onConsoleMaxTimeReceived(int maxTime)
This method is called in response to the GET_CONSOLE_MAX_TIME message.
|
void |
onConsoleUnitsReceived(byte units)
This method is called in response to the GET_CONSOLE_UNITS message.
|
void |
onDisconnected()
This method is called after a connection between app and equipment is
ended.
|
void |
onError(java.lang.Exception e)
Any error will trigger this method call which can be one of the following
exception:
DeviceNotAttachedException - Device is not attached to equipment USB port (try to reconnect the cable) ConnectionLostException - Connection is not established (retry the connection process) InvalidProtocolException - Invalid communication protocol (could be an incompatible console and library version) GeneralEquipmentException - Others The exception message will also includes the state of communication which can be: handshake, number of presets, preset list, preset data, play list, result file name, result file data, version, console version, max packet size, stream data with "before", "during" or "after" attribute. E.g. |
void |
onInit()
This method is called on the initialization of object.
|
java.util.List<WorkoutPreset> |
onSendingWorkoutPreset()
This method is called during the sending of workoutpreset to the
equipment.
|
void |
onSetWorkoutInclineAckReceived(boolean status)
This method is called in response to the SET_WORKOUT_INCLINE message.
|
void |
onSetWorkoutLevelAckReceived(boolean status)
This method is called in response to the SET_WORKOUT_LEVEL message.
|
void |
onSetWorkoutThrAckReceived(boolean status)
This method is called in response to the SET_WORKOUT_THR message.
|
void |
onSetWorkoutWattsAckReceived(boolean status)
This method is called in response to the SET_WORKOUT_WATTS message.
|
void |
onShowConsoleMessageAckReceived(boolean status)
This method is called in response to the SHOW_CONSOLE_MESSAGE message.
|
void |
onStreamReceived(WorkoutStream workoutstream)
This method is called every second during a workout with updated workout
data.
|
void |
onWorkoutPresetSent()
This method is called after the work out presets are sent to equipment.
|
void |
onWorkoutResultReceived(WorkoutResult workoutresult)
This method is called after the work out is done and ended by the fitness
user.
|
void onInit()
void onConnection()
void onConnected()
java.util.List<WorkoutPreset> onSendingWorkoutPreset()
void onWorkoutPresetSent()
void onWorkoutResultReceived(WorkoutResult workoutresult)
workoutresult
- Workoutresult returned by the EquipmentLibraryWorkoutResult
void onStreamReceived(WorkoutStream workoutstream)
workoutstream
- Workoutstream returned by the EquipmentLibraryWorkoutStream
void onDisconnected()
void onError(java.lang.Exception e)
DeviceNotAttachedException
,
ConnectionLostException
,
InvalidProtocolException
,
GeneralEquipmentException
void onConsoleUnitsReceived(byte units)
units
- units returned by the EquipmentLibraryunits
void onConsoleMaxTimeReceived(int maxTime)
maxTime
- maxTime returned by the EquipmentLibrarymaxTime
void onConsoleMaxInclineReceived(double maxIncline)
maxIncline
- maxIncline returned by the EquipmentLibrarymaxIncline
void onSetWorkoutInclineAckReceived(boolean status)
status
- status returned by the EquipmentLibrary:status
void onSetWorkoutWattsAckReceived(boolean status)
status
- status returned by the EquipmentLibrary:status
void onSetWorkoutLevelAckReceived(boolean status)
status
- status returned by the EquipmentLibrary:status
void onSetWorkoutThrAckReceived(boolean status)
status
- status returned by the EquipmentLibrary:status
void onShowConsoleMessageAckReceived(boolean status)
status
- status returned by the EquipmentLibrarystatus
void onAutoLoginRequest()