Class Garmin.DevicePlugin
requires Prototype
Defined in: GarminDevicePlugin.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Garmin.DevicePlugin(pluginElement)
This api provides a set of functions to accomplish the following tasks with a Gps Device:
1) Unlocking devices allowing them to be found and accessed. |
| 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 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 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.
|
|
|
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 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.
|
|
|
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(gpsDataString, filename, deviceNumber)
Initates downloading the gpsDataString to the device specified by deviceNumber.
|
|
|
Initiates a find Gps devices action on the plugin.
|
|
|
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)
This api provides a set of functions to accomplish the following tasks with a Gps 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 gpx files to the device.
5) Downloading data to the device.
6) Geting messages, getting transfer status/progress and version information from the device.
Note that the GarminPluginAPIV1.xsd is referenced throughout this API. Please find more information about the GarminPluginAPIV1.xsd from http://
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 gpx files to the device.
5) Downloading data to the device.
6) Geting messages, getting transfer status/progress and version information from the device.
Note that the GarminPluginAPIV1.xsd is referenced throughout this API. Please find more information about the GarminPluginAPIV1.xsd from http://
- Parameters:
- pluginElement
- element that references the Garmin GPS Control Web Plugin that should be installed. constructor
- Returns:
- a new GarminDevicePlugin
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. See getDevicesXmlString for assignment of that number.
- {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.
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
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}
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
{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 Device XML 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.
{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.x.x (TBD)
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.
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}
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(gpsDataString, filename, deviceNumber)
Initates downloading the gpsDataString to the device specified by deviceNumber.
The gpsDataString is typically in GPI 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
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
- Parameters:
- gpsDataString
- {String} the gpi information that should be transferred to the device.
- filename
- {String} the filename to write to on the device.
- 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
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 is stored in ______.
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, see getDevicesXmlString for assignment of that number.
- dataTypeName
- {String} a fitness datatype from the Garmin Device XML retrieved with getDeviceDescriptionXml
- See:
- #finishReadFitnessData
- #cancelReadFitnessData
- #getDeviceDescriptionXml
- 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, see getDevicesXmlString for assignment of that number.
- dataTypeName
- a Fitness DataType from the GarminDevice.xml retrieved with DeviceDescription
- dataId
- See:
- #finishReadFitnessDetail
- #cancelReadFitnessDetail
- 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, see getDevicesXmlString for assignment of that number.
- dataTypeName
- a Fitness DataType from the GarminDevice.xml retrieved with DeviceDescription
- See:
- #finishReadFitnessDirectory
- #cancelReadFitnessDirectory
- 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.
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.
Minimum plugin version 2.2.0.1
Minimum plugin version 2.2.0.1
- Parameters:
- tcdXml
- {String} XML of TCD data
- deviceNumber
- {Number} the device number, assigned by the plugin. See getDevicesXmlString for assignment of that number.
- 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
- 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