You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,26 @@ Holds _DirectMethodNodes_ associated with its parent _LocalDeviceNode_.
98
98
99
99
### DirectMethodNode
100
100
101
-
This node represents a direct method of a local device. The IoT Hub that the device is registered in can invoke this method. Whenever this happens, details of the invocation will be stored by this node. If this node has an associated path to a DSA action, then this will also cause that action to be invoked.
101
+
This node represents a direct method of a local device. The IoT Hub that the device is registered in can invoke this method, with an optional map of invocation parameters as the payload. Whenever this happens, details of the invocation will be stored by this node. It can also be set up to trigger DSA behavior when this happens, by specifying the `Path` and `DSA Method`.
102
+
- The `Path` specifies a DSA path, and can optionally contain placeholders. A placeholder can be any word surrounded by `%` symbols. When an invocation is recieved, all placeholders will be replaced by corresponding values from the parameters of the invocation, and the resulting resolved path will then be used.
103
+
- If the `DSA Method` is `INVOKE`, the action at the resolved path will be passed the remaining invocation parameters and invoked. The return value of the DSA action will then be sent back to IoT Hub as the direct method response.
104
+
- If the `DSA Method` is `GET`, the value at the resolved path will be sent back to IoT Hub as the direct method response.
105
+
- If the `DSA Method` is `SET`, the value at the resolved path will be set to whatever is in the `Value` parameter in the invocation parameters.
106
+
107
+
- Some examples of ways to set up direct methods, and example payloads to invoke them with:
0 commit comments