Parcourir la source

Updated examples

Stan Janssen il y a 3 ans
Parent
commit
f8dfcf6118
3 fichiers modifiés avec 1 ajouts et 19 suppressions
  1. 0 9
      docs/examples.rst
  2. 0 9
      docs/index.rst
  3. 1 1
      docs/server.rst

+ 0 - 9
docs/examples.rst

@@ -21,7 +21,6 @@ This example sets up a minimal OpenADR Client (Virtual End Node):
     async def main():
         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):
@@ -33,14 +32,6 @@ This example sets up a minimal OpenADR Client (Virtual End Node):
         print(event)
         return 'optIn'
 
-    async def handle_report(report):
-        """
-        This coroutine will be called
-        whenever 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()

+ 0 - 9
docs/index.rst

@@ -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()

+ 1 - 1
docs/server.rst

@@ -166,7 +166,7 @@ Example implementation:
                            cert='/path/to/cert.pem',
                            key='/path/to/private/key.pem',
                            passphrase='mypassphrase',
-                           validation_handler=fingerprint_lookup)
+                           fingerprint_lookup=fingerprint_lookup)
 
 The VEN's fingerprint should be obtained from the VEN outside of OpenADR.