Communicator Plugin API Version 1.9

Class Index | File Index

Classes


Class Garmin.PluginUtils

Garmin.PluginUtils
Defined in: GarminPluginUtils.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Plugin-specific utility functions.
Method Summary
Method Attributes Method Name and Description
<static>  
Garmin.PluginUtils.getDeviceErrorMessage(xml)
Best effort to convert XML error message to a String.
<static>  
Garmin.PluginUtils.isDeviceErrorXml(xml)
Is this a device XML error message.
<static>  
Garmin.PluginUtils.parseDeviceXml(garminPlugin, getDetailedDeviceData)
Parse device xml string into device objects.
Class Detail
Garmin.PluginUtils()
Plugin-specific utility functions.
Method Detail
<static> {String} Garmin.PluginUtils.getDeviceErrorMessage(xml)
Best effort to convert XML error message to a String.
Parameters:
{String} xml
string or Error instance with embedded xml
Returns:
Human readable interpretation of XML message

<static> {Boolean} Garmin.PluginUtils.isDeviceErrorXml(xml)
Is this a device XML error message.
Parameters:
{String} xml
string or Error instance with embedded xml
Returns:
true if error is device-generared error

<static> {Array} Garmin.PluginUtils.parseDeviceXml(garminPlugin, getDetailedDeviceData)
Parse device xml string into device objects. Each device object contains the following: 1) device display name 2) device number 3) device XML as an XML document
Parameters:
garminPlugin
- the GarminDevicePlugin object having access to the device XML data.
getDetailedDeviceData
- boolean indicating if you want to get the entire device XML as an XML document (rather than the few essentials)
Returns:
{Array} an array of Garmin.Device objects

Documentation generated by JsDoc Toolkit 2.3.2 on Mon Jul 25 2011 09:36:54 GMT-0700 (MST)