|
@@ -51,7 +51,6 @@ Client example::
|
|
|
client = OpenADRClient(ven_name="Device001",
|
|
|
vtn_url="http://localhost:8080/OpenADR2/Simple/2.0b")
|
|
|
client.on_event = handle_event
|
|
|
- client.on_report = handle_report
|
|
|
await client.run()
|
|
|
|
|
|
async def handle_event(event):
|
|
@@ -64,14 +63,6 @@ Client example::
|
|
|
# Do something to determine whether to Opt In or Opt Out
|
|
|
return 'optIn'
|
|
|
|
|
|
- async def handle_report(report):
|
|
|
- """
|
|
|
- This coroutine will be called
|
|
|
- when there is a report from the VTN.
|
|
|
- """
|
|
|
- print("There is a report!")
|
|
|
- print(report)
|
|
|
-
|
|
|
loop = asyncio.get_event_loop()
|
|
|
loop.create_task(main())
|
|
|
loop.run_forever()
|