Commit a7978e7a authored by Mathias Haage's avatar Mathias Haage
Browse files

Update README

parent da93ba08
......@@ -271,7 +271,7 @@ Response initial_result_1=yes
A dispatch function signature takes one parameter, a python dictionary called *context* as input and returns another dictionary called *reply*.
The *context* contains the data from the statemachine comma-separated action string as key-value pairs. An important key is *xml_file* which if present contains the absolute path to a keyframe xml file. If the *xml_file* is present, the dispatcher has automatically loaded the contents of the file into a XML DOM object available as key *xml_dom*. The DOM object can be queried using xpath as shown below. Another important keys are *result_name* and *result_values* which contains the name of the expected (from a statemachine perspective) return value and the allowed return values as a semicolon-separated list of values. In the example below the reply dictionary is populated with one entry containing the result variable as key and the first of the allowed return values as value.
The *context* contains the data from the statemachine comma-separated action string as key-value pairs. An important key is *xml_file* which if present contains the absolute path to a keyframe xml file. If the *xml_file* is present, the dispatcher has automatically loaded the contents of the file into a XML DOM object available as key *xml_dom*. The DOM object can be queried using xpath as shown below. Other important keys are *result_name* and *result_values* which contains the name of the expected (from a statemachine perspective) return value and the allowed return values as a semicolon-separated list of values. In the example below the reply dictionary is populated with one entry containing the result variable as key and the first of the allowed return values as value.
```
def identifyobjects(context):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment