|
2048 | 2048 | " 'observable': True,\n", |
2049 | 2049 | " 'forms': [{'href': 'mqtt://localhost:8883',\n", |
2050 | 2050 | " 'op': 'observeproperty',\n", |
| 2051 | + " 'mqv:topic': 'example-test/observable_list_prop',\n", |
2051 | 2052 | " 'contentType': 'application/json'}]},\n", |
2052 | 2053 | " 'observable_readonly_prop': {'description': 'An observable readonly property to check observable events on read operations',\n", |
2053 | 2054 | " 'default': 0,\n", |
|
2056 | 2057 | " 'observable': True,\n", |
2057 | 2058 | " 'forms': [{'href': 'mqtt://localhost:8883',\n", |
2058 | 2059 | " 'op': 'observeproperty',\n", |
| 2060 | + " 'mqv:topic': 'example-test/observable_readonly_prop',\n", |
2059 | 2061 | " 'contentType': 'application/json'}]},\n", |
2060 | 2062 | " 'sleeping_prop': {'description': 'A property that sleeps for 10 seconds on read operations',\n", |
2061 | 2063 | " 'default': 0,\n", |
|
2064 | 2066 | " 'observable': True,\n", |
2065 | 2067 | " 'forms': [{'href': 'mqtt://localhost:8883',\n", |
2066 | 2068 | " 'op': 'observeproperty',\n", |
| 2069 | + " 'mqv:topic': 'example-test/sleeping_prop',\n", |
2067 | 2070 | " 'contentType': 'application/json'}]}},\n", |
2068 | 2071 | " 'events': {'data_point_event': {'description': 'Event raised when a new data point is available',\n", |
2069 | 2072 | " 'data': {'type': 'object',\n", |
|
2072 | 2075 | " 'required': ['timestamp', 'energy']},\n", |
2073 | 2076 | " 'forms': [{'href': 'mqtt://localhost:8883',\n", |
2074 | 2077 | " 'op': 'subscribeevent',\n", |
| 2078 | + " 'mqv:topic': 'example-test/data_point_event',\n", |
2075 | 2079 | " 'contentType': 'application/json'}]},\n", |
2076 | 2080 | " 'test_binary_payload_event': {'description': 'test event with binary payload',\n", |
2077 | 2081 | " 'forms': [{'href': 'mqtt://localhost:8883',\n", |
2078 | 2082 | " 'op': 'subscribeevent',\n", |
| 2083 | + " 'mqv:topic': 'example-test/test_binary_payload_event',\n", |
2079 | 2084 | " 'contentType': 'application/json'}]},\n", |
2080 | 2085 | " 'test_event': {'description': 'test event with arbitrary payload',\n", |
2081 | 2086 | " 'forms': [{'href': 'mqtt://localhost:8883',\n", |
2082 | 2087 | " 'op': 'subscribeevent',\n", |
| 2088 | + " 'mqv:topic': 'example-test/test_event',\n", |
2083 | 2089 | " 'contentType': 'application/json'}]},\n", |
2084 | 2090 | " 'test_event_with_json_schema': {'description': 'test event with schema validation',\n", |
2085 | 2091 | " 'forms': [{'href': 'mqtt://localhost:8883',\n", |
2086 | 2092 | " 'op': 'subscribeevent',\n", |
| 2093 | + " 'mqv:topic': 'example-test/test_event_with_json_schema',\n", |
2087 | 2094 | " 'contentType': 'application/json'}]},\n", |
2088 | 2095 | " 'test_event_with_pydantic_schema': {'description': 'test event with pydantic schema validation',\n", |
2089 | 2096 | " 'forms': [{'href': 'mqtt://localhost:8883',\n", |
2090 | 2097 | " 'op': 'subscribeevent',\n", |
| 2098 | + " 'mqv:topic': 'example-test/test_event_with_pydantic_schema',\n", |
2091 | 2099 | " 'contentType': 'application/json'}]},\n", |
2092 | 2100 | " 'test_mixed_content_payload_event': {'description': 'test event with mixed content payload',\n", |
2093 | 2101 | " 'forms': [{'href': 'mqtt://localhost:8883',\n", |
2094 | 2102 | " 'op': 'subscribeevent',\n", |
| 2103 | + " 'mqv:topic': 'example-test/test_mixed_content_payload_event',\n", |
2095 | 2104 | " 'contentType': 'application/json'}]}}}" |
2096 | 2105 | ] |
2097 | 2106 | }, |
|
2119 | 2128 | }, |
2120 | 2129 | { |
2121 | 2130 | "cell_type": "code", |
2122 | | - "execution_count": 3, |
| 2131 | + "execution_count": null, |
2123 | 2132 | "id": "335296e0", |
2124 | 2133 | "metadata": {}, |
2125 | 2134 | "outputs": [], |
|
2141 | 2150 | "\n", |
2142 | 2151 | "# object_proxy.subscribe_event(\"test_event\", cb)\n", |
2143 | 2152 | "# object_proxy.subscribe_event(\"test_event\", [cb1, cb2], concurrent=True)\n", |
2144 | | - "# object_proxy.subscribe_event(\"test_event\", [async_cb1, async_cb2], asynch=True)\n", |
| 2153 | + "object_proxy_mqtt.subscribe_event(\"test_event\", [async_cb1, async_cb2], asynch=True)\n", |
2145 | 2154 | "# object_proxy.subscribe_event(\"test_event\", [async_cb1, async_cb2], asynch=True, concurrent=True)" |
2146 | 2155 | ] |
2147 | 2156 | }, |
|
0 commit comments