David Smart / NWSWeather
Revision:
2:eae60b64066e
Parent:
1:e077d6502c94
Child:
3:41504de1f387
diff -r e077d6502c94 -r eae60b64066e NWSWeather.h
--- a/NWSWeather.h	Sun Mar 16 16:03:57 2014 +0000
+++ b/NWSWeather.h	Sun Mar 16 20:25:34 2014 +0000
@@ -147,11 +147,12 @@
     /// or when it was modified with the setAlternateURL API.
     ///
     /// @param site is the site/location code of the site of interest.
-    /// @param responseSize hints to this class the size of a buffer it
+    /// @param responseSize is optional but important. It defaults to 2500
+    ///         and is intended to tell this method the size of a buffer it
     ///         should temporarily allocate to receive and process the data.
     /// @param returns success/failure code. @see NWSReturnCode_T.
     ///
-    NWSReturnCode_T get(const char * site, int responseSize = 3000);
+    NWSReturnCode_T get(const char * site, int responseSize = 2500);
     
     /// get the count of the number of weather parameters.
     ///
@@ -167,6 +168,14 @@
     ///
     NWSReturnCode_T isUpdated(uint16_t i);
     
+    /// determines if a specific parameter was updated from the last
+    /// acquisition.
+    ///
+    /// @param name is the item of interest.
+    /// @returns noerror if the parameter is up to date. @see NWSReturnCode_T.
+    ///
+    NWSReturnCode_T isUpdated(const char * name);
+    
     /// get one of the weather parameters.
     ///
     /// This fetches one of the available weather parameters by setting
@@ -185,8 +194,8 @@
     /// @code
     /// // Get the names of the available parameters.
     /// for (i=0; i<wx.count(); i++) {
-    ///     char * name;
-    ///     if (wx.getParam(i, name)) {
+    ///     char *name;
+    ///     if (wx.getParam(i, name) == noerror) {
     ///         // print the names of the parameters
     ///     }
     /// }
@@ -198,7 +207,7 @@
     /// @param typeis is an optional pointer that is set to indicate the type of the value.
     /// @param returns success/failure code. @see NWSReturnCode_T.
     ///
-    NWSReturnCode_T getParam(uint16_t i, char * name, Value_T *value = NULL, TypeOf_T *typeis = NULL);
+    NWSReturnCode_T getParam(uint16_t i, char *name, Value_T *value = NULL, TypeOf_T *typeis = NULL);
     
     /// get one of the weather parameters.
     ///
@@ -207,8 +216,8 @@
     /// for that parameter.
     ///
     /// @code
-    /// TypeOf_T type; char * value;
-    /// if (wx.getParam("temp_f", &type, value)) {
+    /// float value; TypeOf_T type;
+    /// if (wx.getParam("temp_f", &value, &type) == noerror) {
     ///     // print the values
     /// }
     /// @endcode