Announcement

Collapse
No announcement yet.

UpdateFeatureValueByRef

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    UpdateFeatureValueByRef

    The SDK Docs indicate the following prototype:
    Code:
    Function UpdateFeatureValueByRef( [I]featRef[/I] As Integer, [I]value[/I] As Double) As String
    The HomeSeer.PluginSdk.dll has this function returning a boolean

    In HS3 the equivalent (SetDeviceValue) had a third input parameter and no function return. How do we emulate the third parameter and what should we do with the returned value of UpdateFeatureValueByRef?

    #2
    Same issue of miss-matched doc and code, third parameter, and use of returned valuve for UpdateFeatureValueStringByRef

    Comment


      #3
      The inline documentation is usually the most up to date and should be referenced when in doubt:

      Code:
              /// <summary>
              /// Set the value on a feature and trigger HomeSeer to process the update to update the status accordingly.
              /// <para>
              /// To update the value without triggering HomeSeer to process the update, call
              ///  <see cref="UpdatePropertyByRef"/>
              /// </para>
              /// </summary>
              /// <remarks>
              /// This is the same as the legacy method SetDeviceValueByRef(Integer, Double, True).
              /// </remarks>
              /// <param name="featRef">The unique reference of the feature to control</param>
              /// <param name="value">The new value to set on the feature</param>
              /// <returns>TRUE if the control sent correctly, FALSE if there was a problem</returns>
      https://github.com/HomeSeer/Plugin-S...roller.cs#L354

      Comment


        #4
        You cannot expect us to look in the docs and then double check if the documentation still matches the code...

        Document every function inline, generate the SDK documentation on every build --> INSTANT PROFIT

        Comment

        Working...
        X