Class Garmin.DevicePlugin
Garmin.DevicePlugin
Defined in: GarminDevicePlugin.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Garmin.DevicePlugin(pluginElement)
Wraps the ActiveX/Netscape plugin that should be installed on your machine in order to talk to a Garmin Device.
|
| Field Attributes | Field Name and Description |
|---|---|
| <static> |
Garmin.DevicePlugin.LATEST_VERSION
Latest version (not required) of the Garmin Communicator Plugin, and a complementary toString function to print it out with
|
| <static> |
Garmin.DevicePlugin.REQUIRED_VERSION
Latest required version of the Garmin Communicator Plugin, and a complementary toString function to print it out with.
|
| Method Attributes | Method Name and Description |
|---|---|
|
bytesAvailable(deviceNumber, relativeFilePath)
Determine the amount of space available on a Mass Storage Mode Device Volume.
|
|
|
Cancel the asynchronous Download Data operation.
|
|
|
Cancels the current find devices interaction.
|
|
|
Cancel the asynchronous ReadableFileListing operation
Minimum version 2.8.1.0 |
|
|
Cancel the asynchronous ReadFitDirectory operation.
|
|
|
Cancel the asynchronous ReadFitnessData operation.
|
|
|
Cancel the asynchronous ReadFitnessDirectory operation.
|
|
|
Cancel the asynchronous ReadFitnessDirectory operation.
|
|
|
Cancels the current read from the device.
|
|
|
Cancel the asynchrous Download Data operation
|
|
|
Cancel the asynchronous ReadFitnessData operation.
|
|
|
Cancels the current write operation to the gps device.
|
|
|
checkPluginVersionSupport(reqVersionArray)
Used to check if the user's installed plugin version meets the required version for feature support purposes.
|
|
|
Indicates success of StartDownloadData operation.
|
|
|
This is used to indicate the status of the download process.
|
|
|
Poll - with this function to determine completion of startFindDevices.
|
|
|
Poll for completion of the asynchronous ReadableFileListing operation.
|
|
|
Poll for completion of the asynchronous startReadFitDirectory operation.
|
|
|
Poll for completion of the asynchronous ReadFitnessData operation.
|
|
|
Poll for completion of the asynchronous ReadFitnessDetail operation.
|
|
|
Poll for completion of the asynchronous ReadFitnessDirectory operation.
|
|
|
Indicates the status of the read process.
|
|
|
Poll for completion of the asynchronous Unit Software Update operation.
|
|
|
This is used to indicate the status of the write process for fitness data.
|
|
|
This is used to indicate the status of the write process.
|
|
|
Indicates success of ReadFitnessData or WriteFitnessData operation.
|
|
|
getBinaryFile(relativeFilePath, relativeFilePath, compressed)
Return the specified file as a UU-Encoded string
Minimum version 2.6.3.1 If the file is known to be compressed, compressed should be set to false. |
|
|
getDeviceDescriptionXml(deviceNumber)
Returns information about the specified Device indicated by the device Number.
|
|
|
Returns information about the number of devices connected to this machine as
well as the names of those devices.
|
|
|
Returns last read directory xml data.
|
|
|
This is the GpsXml information from the device.
|
|
|
Returns the xml describing the message when the plug-in is waiting for input from the user.
|
|
|
getParentDevice(deviceNumber)
Returns the number, assigned by plugin, of the parent device.
|
|
|
Gets the version number for the plugin the user has currently installed.
|
|
|
Gets a string of the version number for the plugin the user has currently installed.
|
|
|
Get the status/progress of the current state or transfer.
|
|
|
Lazy-logic accessor to FIT read support var.
|
|
|
Lazy-logic accessor to fitness write support var.
|
|
|
Lazy-logic accessor to fitness read compressed support var.
|
|
|
Lazy-logic accessor to fitness write support var.
|
|
|
This is used to detect whether the user's installed plugin supports readable file listing.
|
|
|
This is the fitness data Xml information from the device.
|
|
|
Returns last read fitness xml data in compressed format.
|
|
|
Returns metadata information about the plugin version.
|
|
|
Indicates success of WriteToGps operation.
|
|
|
isDeviceFileBased(deviceNumber)
Determine if device is file-based.
|
|
|
Determines if the Garmin plugin is at least the required version for the application.
|
|
|
Returns true if the plug-in is unlocked.
|
|
|
Checks if plugin is the most recent version released, for those that want the latest and greatest.
|
|
|
respondToMessageBox(response)
Responds to a message box on the device.
|
|
|
setPluginLatestVersion(reqVersionArray)
Sets the latest plugin version number.
|
|
|
setPluginRequiredVersion(reqVersionArray)
Sets the required plugin version number for the application.
|
|
|
startDownloadData(xmlDownloadDescription, deviceNumber)
Downloads and writes files asynchronously to the specified device.
|
|
|
Initiates a find Gps devices action on the plugin.
|
|
|
startReadableFileListing(deviceNumber, dataTypeName, fileTypeName, computeMD5)
Starts an asynchronous file listing operation for a Mass Storage mode device.
|
|
|
startReadFitDirectory(deviceNumber)
List all of the FIT files on the device.
|
|
|
startReadFitnessData(deviceNumber, dataTypeName)
Start the asynchronous ReadFitnessData operation.
|
|
|
startReadFitnessDetail(deviceNumber, dataTypeName, dataId)
Start the asynchronous ReadFitnessDetail operation.
|
|
|
startReadFitnessDirectory(deviceNumber, dataTypeName)
Start the asynchronous ReadFitnessDirectory operation.
|
|
|
startReadFromGps(deviceNumber)
Initiates the read from the gps device conneted.
|
|
|
startUnitSoftwareUpdate(updateResponsesXml, deviceNumber)
Download and install a list of unit software updates.
|
|
|
startWriteFitnessData(tcdXml, deviceNumber, filename, dataTypeName)
Start the asynchronous StartWriteFitnessData operation.
|
|
|
startWriteToGps(gpsXml, filename, deviceNumber)
Initates writing the gpsXml to the device specified by deviceNumber with a filename set by filename.
|
|
|
unlock(pathKeyPairsArray)
Unlocks the GpsControl object to be used at the given web address.
|
Class Detail
Garmin.DevicePlugin(pluginElement)
Wraps the ActiveX/Netscape plugin that should be installed on your machine in order to talk to a Garmin Device.
The Garmin Communicator Plugin is available for download here
More information is available about the plugin here
This api provides a set of functions to accomplish the following tasks with a Garmin Device:
1) Unlocking devices allowing them to be found and accessed.
2) Finding avaliable devices plugged into this machine.
3) Reading from the device.
4) Writing to the device.
5) Getting messages, getting transfer status/progress and version information from the device.
Note that XML schemas GarminPluginAPIV1 and DeviceDownloadV1 define XML input and output throughout this API.
More information is available about the plugin here
This api provides a set of functions to accomplish the following tasks with a Garmin Device:
1) Unlocking devices allowing them to be found and accessed.
2) Finding avaliable devices plugged into this machine.
3) Reading from the device.
4) Writing to the device.
5) Getting messages, getting transfer status/progress and version information from the device.
Note that XML schemas GarminPluginAPIV1 and DeviceDownloadV1 define XML input and output throughout this API.
- Parameters:
- pluginElement
- element that references the Garmin GPS Control Web Plugin that should be installed.
- Returns:
- a new Garmin.DevicePlugin
- Requires:
- Prototype
Field Detail
<static>
Garmin.DevicePlugin.LATEST_VERSION
Latest version (not required) of the Garmin Communicator Plugin, and a complementary toString function to print it out with
<static>
Garmin.DevicePlugin.REQUIRED_VERSION
Latest required version of the Garmin Communicator Plugin, and a complementary toString function to print it out with.
Method Detail
bytesAvailable(deviceNumber, relativeFilePath)
Determine the amount of space available on a Mass Storage Mode Device Volume.
- Parameters:
- {Number} deviceNumber
- - the device number assigned by the plugin.
- {String} relativeFilePath
- - if a file is being replaced, set to relative path on device, otherwise set to empty string.
- Returns:
- -1 for non-mass storage mode devices.
- See:
- #getDevicesXml for device number assignment
cancelDownloadData()
Cancel the asynchronous Download Data operation.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.0.0.4
cancelFindDevices()
Cancels the current find devices interaction.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.0.0.4
cancelReadableFileListing()
Cancel the asynchronous ReadableFileListing operation
Minimum version 2.8.1.0
Minimum version 2.8.1.0
cancelReadFitDirectory()
Cancel the asynchronous ReadFitDirectory operation.
Minimum plugin version 2.7.2.0
Minimum plugin version 2.7.2.0
cancelReadFitnessData()
Cancel the asynchronous ReadFitnessData operation.
Minimum plugin version 2.1.0.3 for FitnessHistory type
Minimum plugin version 2.2.0.1 for FitnessWorkouts, FitnessUserProfile, FitnessCourses
Minimum plugin version 2.1.0.3 for FitnessHistory type
Minimum plugin version 2.2.0.1 for FitnessWorkouts, FitnessUserProfile, FitnessCourses
cancelReadFitnessDetail()
Cancel the asynchronous ReadFitnessDirectory operation.
Minimum version 2.2.0.2
Minimum version 2.2.0.2
cancelReadFitnessDirectory()
Cancel the asynchronous ReadFitnessDirectory operation.
Minimum plugin version 2.2.0.2
Minimum plugin version 2.2.0.2
cancelReadFromGps()
Cancels the current read from the device.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.0.0.4
cancelUnitSoftwareUpdate()
Cancel the asynchrous Download Data operation
cancelWriteFitnessData()
Cancel the asynchronous ReadFitnessData operation.
Minimum plugin version 2.2.0.1
Minimum plugin version 2.2.0.1
cancelWriteToGps()
Cancels the current write operation to the gps device.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.2.0.1 for writes of GPX to SD Card
Minimum plugin version 2.0.0.4
Minimum plugin version 2.2.0.1 for writes of GPX to SD Card
{boolean}
checkPluginVersionSupport(reqVersionArray)
Used to check if the user's installed plugin version meets the required version for feature support purposes.
- Parameters:
- {Array} reqVersionArray
- An array representing the required version, in the format: [versionMajor, versionMinor, buildMajor, buildMinor].
- Returns:
- {boolean} true if the passed in required version is met by the user's plugin version (user's version is equal to or greater), false otherwise.
- See:
- setPluginRequiredVersion
{Boolean}
downloadDataSucceeded()
Indicates success of StartDownloadData operation.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.0.0.4
- Returns:
- True if the last StartDownloadData operation was successful
{Number}
finishDownloadData()
This is used to indicate the status of the download process. It will return an integer
know as the completion state. The purpose is to show the
user information about what is happening to the plugin while it
is servicing your request.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.0.0.4
- Returns:
- Completion state - The completion state can be one of the following:
0 = idle
1 = working
2 = waiting
3 = finished
{Boolean}
finishFindDevices()
Poll - with this function to determine completion of startFindDevices. Used after
the call to startFindDevices().
Minimum plugin version 2.0.0.4
Minimum plugin version 2.0.0.4
- Returns:
- Returns true if completed finding devices otherwise false.
{Number}
finishReadableFileListing()
Poll for completion of the asynchronous ReadableFileListing operation.
If the CompletionState is eMessageWaiting, call MessageBoxXml to get a description of the message box to be displayed to the user, and then call RespondToMessageBox with the value of the selected button to resume operation.
Minimum version 2.8.1.0
If the CompletionState is eMessageWaiting, call MessageBoxXml to get a description of the message box to be displayed to the user, and then call RespondToMessageBox with the value of the selected button to resume operation.
Minimum version 2.8.1.0
- Returns:
- Completion state - The completion state can be one of the following:
0 = idle
1 = working
2 = waiting
3 = finished
{Number}
finishReadFitDirectory()
Poll for completion of the asynchronous startReadFitDirectory operation.
Minimum plugin version 2.7.2.0
Minimum plugin version 2.7.2.0
- Returns:
- Completion state - The completion state can be one of the following:
0 = idle
1 = working
2 = waiting
3 = finished
{Number}
finishReadFitnessData()
Poll for completion of the asynchronous ReadFitnessData operation.
If the CompletionState is eMessageWaiting, call MessageBoxXml to get a description of the message box to be displayed to the user, and then call RespondToMessageBox with the value of the selected button to resume operation.
Minimum plugin version 2.1.0.3 for FitnessHistory type
Minimum plugin version 2.2.0.1 for FitnessWorkouts, FitnessUserProfile, FitnessCourses
If the CompletionState is eMessageWaiting, call MessageBoxXml to get a description of the message box to be displayed to the user, and then call RespondToMessageBox with the value of the selected button to resume operation.
Minimum plugin version 2.1.0.3 for FitnessHistory type
Minimum plugin version 2.2.0.1 for FitnessWorkouts, FitnessUserProfile, FitnessCourses
- Returns:
- Completion state - The completion state can be one of the following:
0 = idle
1 = working
2 = waiting
3 = finished
{Number}
finishReadFitnessDetail()
Poll for completion of the asynchronous ReadFitnessDetail operation.
If the CompletionState is eMessageWaiting, call MessageBoxXml to get a description of the message box to be displayed to the user, and then call RespondToMessageBox with the value of the selected button to resume operation.
Minimum plugin version 2.2.0.2
If the CompletionState is eMessageWaiting, call MessageBoxXml to get a description of the message box to be displayed to the user, and then call RespondToMessageBox with the value of the selected button to resume operation.
Minimum plugin version 2.2.0.2
- Returns:
- Completion state - The completion state can be one of the following:
0 = idle
1 = working
2 = waiting
3 = finished
{Number}
finishReadFitnessDirectory()
Poll for completion of the asynchronous ReadFitnessDirectory operation.
If the CompletionState is eMessageWaiting, call getMessageBoxXml to get a description of the message box to be displayed to the user, and then call respondToMessageBox with the value of the selected button to resume operation.
Minimum plugin version 2.2.0.2
If the CompletionState is eMessageWaiting, call getMessageBoxXml to get a description of the message box to be displayed to the user, and then call respondToMessageBox with the value of the selected button to resume operation.
Minimum plugin version 2.2.0.2
- Returns:
- Completion state - The completion state can be one of the following:
0 = idle
1 = working
2 = waiting
3 = finished
{Number}
finishReadFromGps()
Indicates the status of the read process. It will return an integer
know as the completion state. The purpose is to show the
user information about what is happening to the plugin while it
is servicing your request. Used after startReadFromGps().
Minimum plugin version 2.0.0.4
Minimum plugin version 2.0.0.4
- Returns:
- Completion state - The completion state can be one of the following:
0 = idle
1 = working
2 = waiting
3 = finished
{Number}
finishUnitSoftwareUpdate()
Poll for completion of the asynchronous Unit Software Update operation. It will return an integer
know as the completion state. The purpose is to show the
user information about what is happening to the plugin while it
is servicing your request.
- Returns:
- Completion state - The completion state can be one of the following:
0 = idle
1 = working
2 = waiting
3 = finished
- See:
- Garmin.DevicePlugin.startUnitSoftwareUpdate
- Garmin.DevicePlugin.cancelUnitSoftwareUpdate
{Number}
finishWriteFitnessData()
This is used to indicate the status of the write process for fitness data. It will return an integer
know as the completion state. The purpose is to show the
user information about what is happening to the plugin while it
is servicing your request.
Minimum plugin version 2.2.0.1
Minimum plugin version 2.2.0.1
- Returns:
- Completion state - The completion state can be one of the following:
0 = idle
1 = working
2 = waiting
3 = finished
{Number}
finishWriteToGps()
This is used to indicate the status of the write process. It will return an integer
know as the completion state. The purpose is to show the
user information about what is happening to the plugin while it
is servicing your request.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.2.0.1 for writes of GPX to SD Card
Minimum plugin version 2.0.0.4
Minimum plugin version 2.2.0.1 for writes of GPX to SD Card
- Returns:
- Completion state - The completion state can be one of the following:
0 = idle
1 = working
2 = waiting
3 = finished
{Boolean}
fitnessTransferSucceeded()
Indicates success of ReadFitnessData or WriteFitnessData operation.
Minimum plugin version 2.1.0.3
Minimum plugin version 2.1.0.3
- Returns:
- True if the last ReadFitnessData or WriteFitnessData operation succeeded
getBinaryFile(relativeFilePath, relativeFilePath, compressed)
Return the specified file as a UU-Encoded string
Minimum version 2.6.3.1 If the file is known to be compressed, compressed should be set to false. Otherwise, set compressed to true to retrieve a gzipped and uuencoded file.
Minimum version 2.6.3.1 If the file is known to be compressed, compressed should be set to false. Otherwise, set compressed to true to retrieve a gzipped and uuencoded file.
- Parameters:
- relativeFilePath
- {String} path relative to the Garmin folder on the device
- relativeFilePath
- compressed
{String}
getDeviceDescriptionXml(deviceNumber)
Returns information about the specified Device indicated by the device Number.
See the getDevicesXml function to get the actual deviceNumber assigned.
Refer to the
Devices_t
element in the Device XML schema for what is included in the XML.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.0.0.4
- Parameters:
- deviceNumber
- {Number} Assigned by the plugin, see getDevicesXml for assignment of that number.
- Returns:
- Xml string with detailed device info
- See:
- #getDevicesXml for device number assignment
{String}
getDevicesXml()
Returns information about the number of devices connected to this machine as
well as the names of those devices. Refer to the Devices_t element in the
GarminPluginAPIV1 schema
for what is included.
The xml returned should contain a 'Device' element with 'DisplayName' and 'Number'
if there is a device actually connected.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.0.0.4
- Returns:
- Xml string with detailed device info
getDirectoryXml()
Returns last read directory xml data.
- Returns:
- The directory xml data
getGpsXml()
This is the GpsXml information from the device. Typically called after a read operation.
- See:
- #finishReadFromGps
{String}
getMessageBoxXml()
Returns the xml describing the message when the plug-in is waiting for input from the user.
- Returns:
- The xml describing the message when the plug-in is waiting for input from the user.
{Number}
getParentDevice(deviceNumber)
Returns the number, assigned by plugin, of the parent device.
If the device has no parent, -1 is returned.
Minimum plugin version 2.9.2.5
If the device has no parent, -1 is returned.
Minimum plugin version 2.9.2.5
- Parameters:
- deviceNumber
- {Number} Assigned by the plugin
- Returns:
- {Number} Parent device's assigned number. -1 if the device has no parent.
- See:
- #getDevicesXml for device number assignment
{Array}
getPluginVersion()
Gets the version number for the plugin the user has currently installed.
- Returns:
- An array of the format: [versionMajor, versionMinor, buildMajor, buildMinor].
{String}
getPluginVersionString()
Gets a string of the version number for the plugin the user has currently installed.
- Returns:
- A string of the format "versionMajor.versionMinor.buildMajor.buildMinor", ex: "2.0.0.4"
{String}
getProgressXml()
Get the status/progress of the current state or transfer.
- Returns:
- The xml describing the current progress state of the plug-in.
getSupportsFitDirectoryRead()
Lazy-logic accessor to FIT read support var.
This is used to detect whether the user's installed plugin supports FIT directory reading,
which has a minimum requirement of plugin version 2.8.1.0.
This should NOT be called until the plug-in has been unlocked.
getSupportsFitnessDirectoryRead()
Lazy-logic accessor to fitness write support var.
This is used to detect whether the user's installed plugin supports fitness directory reading,
which has a minimum requirement of plugin version 2.2.0.2.
This should NOT be called until the plug-in has been unlocked.
getSupportsFitnessReadCompressed()
Lazy-logic accessor to fitness read compressed support var.
This is used to detect whether the user's installed plugin supports fitness reading in compressed format,
which has a minimum requirement of plugin version 2.2.0.2.
This should NOT be called until the plug-in has been unlocked.
getSupportsFitnessWrite()
Lazy-logic accessor to fitness write support var.
This is used to detect whether the user's installed plugin supports fitness writing.
Fitness writing capability has a minimum requirement of plugin version 2.2.0.1.
This should NOT be called until the plug-in has been unlocked.
getSupportsReadableFileListing()
This is used to detect whether the user's installed plugin supports readable file listing.
Readable file listing has a minimum requirement of plugin version 2.8.1.0.
This should NOT be called until the plug-in has been unlocked.
getTcdXml()
This is the fitness data Xml information from the device. Typically called after a ReadFitnessData operation.
Schemas for the TrainingCenterDatabase format are available at http://developer.garmin.com/schemas/tcx/v2/
Minimum plugin version 2.1.0.3
Schemas for the TrainingCenterDatabase format are available at http://developer.garmin.com/schemas/tcx/v2/
Minimum plugin version 2.1.0.3
getTcdXmlz()
Returns last read fitness xml data in compressed format. The xml is compressed as gzp and base64 expanded.
Minimum plugin version 2.2.0.2
Minimum plugin version 2.2.0.2
- Returns:
- The read xml data in compressed gzp and base64 expanded format.
{String}
getVersionXml()
Returns metadata information about the plugin version.
- Returns:
- The xml describing the user's version of the plug-in.
{Boolean}
gpsTransferSucceeded()
Indicates success of WriteToGps operation.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.0.0.4
- Returns:
- True if the last ReadFromGps or WriteToGps operation was successful
{Boolean}
isDeviceFileBased(deviceNumber)
Determine if device is file-based.
File-based devices include Mass Storage Mode Devices such as Nuvi, Oregon, Edge 705, as well as ANT Proxy Devices.
Minimum plugin version 2.8.1.0
File-based devices include Mass Storage Mode Devices such as Nuvi, Oregon, Edge 705, as well as ANT Proxy Devices.
Minimum plugin version 2.8.1.0
- Parameters:
- {Number} deviceNumber
- the device number assigned by the plugin.
- Returns:
- {Boolean} true for file based devices, false otherwise
- See:
- #getDevicesXml for device number assignment
{Boolean}
isPluginOutOfDate()
Determines if the Garmin plugin is at least the required version for the application.
- See:
- setPluginRequiredVersion
isUnlocked()
Returns true if the plug-in is unlocked.
isUpdateAvailable()
Checks if plugin is the most recent version released, for those that want the latest and greatest.
respondToMessageBox(response)
Responds to a message box on the device.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.0.0.4
- Parameters:
- response
- should be an int which corresponds to a button value from this.plugin.MessageBoxXml
setPluginLatestVersion(reqVersionArray)
Sets the latest plugin version number. This represents the latest version available for download at Garmin.
We will attempt to keep the default value of this up to date with each API release, but this is not guaranteed,
so set this to be safe or if you don't want to upgrade to the latest API.
- Parameters:
- reqVersionArray
- {Array} The latest version to set to. In the format [versionMajor, versionMinor, buildMajor, buildMinor] i.e. [2,2,0,1]
setPluginRequiredVersion(reqVersionArray)
Sets the required plugin version number for the application.
- Parameters:
- reqVersionArray
- {Array} The required version to set to. In the format [versionMajor, versionMinor, buildMajor, buildMinor] i.e. [2,2,0,1]
startDownloadData(xmlDownloadDescription, deviceNumber)
Downloads and writes files asynchronously to the specified device.
Use #finishDownloadData to poll when the write operation/plugin is complete.
Minimum plugin version 2.0.0.4
Use #finishDownloadData to poll when the write operation/plugin is complete.
Minimum plugin version 2.0.0.4
- Parameters:
- xmlDownloadDescription
- {String} XML string containing information about the files to be downloaded onto the device.
This xml must conform to one of two schemas:
GarminPluginAPIV1
DeviceDownloadV1 Recommended - deviceNumber
- {Number} the device number assigned by the plugin.
startFindDevices()
Initiates a find Gps devices action on the plugin.
Poll with finishFindDevices to determine when the plugin has completed this action.
Use getDeviceXmlString to inspect xml contents for and array of Device nodes.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.0.0.4
startReadableFileListing(deviceNumber, dataTypeName, fileTypeName, computeMD5)
Starts an asynchronous file listing operation for a Mass Storage mode device.
Only files that are output from the device are listed. The result can be retrieved with #getDirectoryXml. Minimum plugin version 2.8.1.0
Only files that are output from the device are listed. The result can be retrieved with #getDirectoryXml. Minimum plugin version 2.8.1.0
- Parameters:
- {Number} deviceNumber
- assigned by the plugin
- {String} dataTypeName
- a DataType from GarminDevice.xml retrieved with DeviceDescription
- {String} fileTypeName
- a Specification Identifier for a File in dataTypeName from GarminDevice.xml
- {Boolean} computeMD5
- If true, the plug-in will generate an MD5 checksum for each readable file.
- See:
- #finishReadableFileListing
- #cancelReadableFileListing
- #getDevicesXml for device number assignment
- Garmin.DeviceControl.FILE_TYPES
startReadFitDirectory(deviceNumber)
List all of the FIT files on the device. Starts an asynchronous directory listing operation for the device.
Poll for finished with FinishReadFitDirectory. The result can be retrieved with #getDirectoryXml.
Minimum plugin version 2.7.2.0
- Parameters:
- deviceNumber
startReadFitnessData(deviceNumber, dataTypeName)
Start the asynchronous ReadFitnessData operation.
Minimum plugin version 2.1.0.3 for FitnessHistory type
Minimum plugin version 2.2.0.1 for FitnessWorkouts, FitnessUserProfile, FitnessCourses
Minimum plugin version 2.1.0.3 for FitnessHistory type
Minimum plugin version 2.2.0.1 for FitnessWorkouts, FitnessUserProfile, FitnessCourses
- Parameters:
- deviceNumber
- {Number} assigned by the plugin.
- dataTypeName
- {String} a fitness datatype from the Garmin Device XML retrieved with getDeviceDescriptionXml
- See:
- #finishReadFitnessData
- #cancelReadFitnessData
- #getDeviceDescriptionXml
- #getDevicesXml for device number assignment
- Garmin.DeviceControl#FILE_TYPES
startReadFitnessDetail(deviceNumber, dataTypeName, dataId)
Start the asynchronous ReadFitnessDetail operation.
Minimum plugin version 2.2.0.2
Minimum plugin version 2.2.0.2
- Parameters:
- deviceNumber
- assigned by the plugin
- dataTypeName
- a Fitness DataType from the GarminDevice.xml retrieved with DeviceDescription
- dataId
- See:
- #finishReadFitnessDetail
- #cancelReadFitnessDetail
- #getDevicesXml for device number assignment
- Garmin.DeviceControl#FILE_TYPES
startReadFitnessDirectory(deviceNumber, dataTypeName)
Start the asynchronous ReadFitnessDirectory operation.
Minimum plugin version 2.2.0.2
Minimum plugin version 2.2.0.2
- Parameters:
- deviceNumber
- {Number} assigned by the plugin
- dataTypeName
- a Fitness DataType from the GarminDevice.xml retrieved with DeviceDescription
- See:
- #finishReadFitnessDirectory
- #cancelReadFitnessDirectory
- #getDevicesXml for device number assignment
- Garmin.DeviceControl#FILE_TYPES
startReadFromGps(deviceNumber)
Initiates the read from the gps device conneted. Use finishReadFromGps and getGpsProgressXml to
determine when the plugin is done with this operation. Also, use getGpsXml to extract the
actual data from the device.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.0.0.4
- Parameters:
- deviceNumber
- {Number} assigned by the plugin, see getDevicesXml for assignment of that number.
- See:
- #finishReadFromGps
- #cancelReadFromGps
- #getDevicesXml for device number assignment
startUnitSoftwareUpdate(updateResponsesXml, deviceNumber)
Download and install a list of unit software updates. Start the asynchronous
StartUnitSoftwareUpdate operation.
Check for completion with the FinishUnitSoftwareUpdate() method. After
completion check the DownloadDataSucceeded property to make sure that all of the downloads
were successfully placed on the device.
See the Schema UnitSoftwareUpdatev3.xsd for the format of the UpdateResponsesXml description
- Parameters:
- updateResponsesXml
- deviceNumber
- See:
- Garmin.DevicePlugin.finishUnitSoftwareUpdate
- Garmin.DevicePlugin.cancelUnitSoftwareUpdate
- Garmin.DevicePlugin.downloadDataSucceeded
startWriteFitnessData(tcdXml, deviceNumber, filename, dataTypeName)
Start the asynchronous StartWriteFitnessData operation.
For binary files such as FIT, use #startDownloadData
Minimum plugin version 2.2.0.1
For binary files such as FIT, use #startDownloadData
Minimum plugin version 2.2.0.1
- Parameters:
- tcdXml
- {String} XML of TCD data
- deviceNumber
- {Number} the device number, assigned by the plugin.
- filename
- {String} the filename to write to on the device.
- dataTypeName
- {String} a Fitness DataType from the GarminDevice.xml retrieved with DeviceDescription
- See:
- #finishWriteFitnessData
- #cancelWriteFitnessData
- #getDevicesXml for device number assignment
- Garmin.DeviceControl#FILE_TYPES
startWriteToGps(gpsXml, filename, deviceNumber)
Initates writing the gpsXml to the device specified by deviceNumber with a filename set by filename.
The gpsXml is typically in GPX fomat and the filename is only the name without the extension. The
plugin will append the .gpx extension automatically.
Use finishWriteToGps to poll when the write operation/plugin is complete.
Uses the helper functions to set the xml info and the filename.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.2.0.1 for writes of GPX to SD Card
Use finishWriteToGps to poll when the write operation/plugin is complete.
Uses the helper functions to set the xml info and the filename.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.2.0.1 for writes of GPX to SD Card
- Parameters:
- gpsXml
- {String} the gps/gpx information that should be transferred to the device.
- filename
- {String} the desired filename for the gpsXml that shall end up on the device.
- deviceNumber
- {Number} the device number assigned by the plugin.
{Boolean}
unlock(pathKeyPairsArray)
Unlocks the GpsControl object to be used at the given web address.
More than one set of path-key pairs my be passed in, for example:
['http://myDomain.com/', 'xxx','http://www.myDomain.com/', 'yyy']
See documentation site for more info on getting a key.
Minimum plugin version 2.0.0.4
Minimum plugin version 2.0.0.4
- Parameters:
- pathKeyPairsArray
- {Array}- baseURL and key pairs.
- Returns:
- true if successfully unlocked or undefined otherwise