public class UsbTestInterface extends WatchInterface
Modifier and Type | Class and Description |
---|---|
static class |
UsbTestInterface.Versions |
WatchInterface.FileType
FILEID_BLE_FIRMWARE, FILEID_BLE_UPDATE_LOG, FILEID_GPS_FIRMWARE, FILEID_GPSQUICKFIX_DATA, FILEID_INVALID, FILEID_LOG, FILEID_MANIFEST1, FILEID_MANIFEST2, FILEID_PLAYLIST, FILEID_PREFERENCES_XML, FILEID_SYSTEM_FIRMWARE, FILEID_UPDATE_LOG, fileList, listener, preferenceFile, PRODUCTID_UNKNOWN, TTWATCH_FILE_TYPE_MASK
Constructor and Description |
---|
UsbTestInterface(String path)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
deleteFile(UsbFile file)
Deletes the file on the watch indicated by the ID in the file
passed.
|
boolean |
fileExists(int fileId)
This method checks if a file exists
|
String |
getDeviceSerialNumber()
Returns the serial number of the device.
|
ArrayList<UsbFile> |
getFileList(WatchInterface.FileType fileType)
This method requests the list of file of given type
|
int |
getProductId()
This method returns the firmware version
|
hirondelle.date4j.DateTime |
getWatchTime()
This method retrieves the time from the watch.
|
String |
readBleVersion()
This method returns the BLE version
|
boolean |
readFile(UsbFile file)
This method reads the file with file ID defined in the file
instance passed from the watch
|
String |
readFirmwareVersion()
This method returns the firmware version
|
boolean |
writeFile(UsbFile file)
Write file to the watch.
|
closeConnection, formatDevice, getPreference, isFileType, openConnection, readPreferences, resetDevice, resetGpsProcessor, sendMessageGroup1, sendStartupSequence, setPreference, setProgressListener, writeGpxQuickFixFile, writePreferences, writeVerifyFile
public UsbTestInterface(String path)
path
- The path where to find the simulation filespublic boolean fileExists(int fileId)
fileExists
in class WatchInterface
fileId
- Id of the file to checkpublic boolean readFile(UsbFile file)
readFile
in class WatchInterface
file
- File defining the file ID. The file data is read into
this file instancepublic boolean writeFile(UsbFile file)
writeFile
in class WatchInterface
file
- The file to writepublic ArrayList<UsbFile> getFileList(WatchInterface.FileType fileType)
getFileList
in class WatchInterface
fileType
- The type of files to requestpublic boolean deleteFile(UsbFile file)
deleteFile
in class WatchInterface
file
- File defining the file ID to deletepublic hirondelle.date4j.DateTime getWatchTime()
getWatchTime
in class WatchInterface
public String readBleVersion()
readBleVersion
in class WatchInterface
public String readFirmwareVersion()
readFirmwareVersion
in class WatchInterface
public int getProductId()
getProductId
in class WatchInterface
public String getDeviceSerialNumber()
getDeviceSerialNumber
in class WatchInterface
Copyright © 2019. All rights reserved.