class documentation
class CoAPServer:
CoAPServer Server implementation.
| Method | configure |
Configure the CoAP server. |
| Method | init |
Initialization of the CoAP Server. |
| Method | pause |
Stop handling requests. |
| Method | run |
Initialize and run the CoAP server as a BackgroundWorker/Actor. |
| Method | send |
Send a CoAP request to a URL. |
| Method | shutdown |
Shutdown the CoAP server. |
| Method | unpause |
Continue handling requests. |
| Method | validate |
Validate the CoAP server configuration. |
| Class Variable | __slots__ |
Define slots for instance variables. |
| Instance Variable | actor |
The actor for running the synchronous CoAP server in the background. |
| Instance Variable | coap |
The CoAP server object. |
| Instance Variable | is |
Flag whether the server is currently paused. Requests are not handled when the server is paused. |
| Instance Variable | operation |
Events for the different operations. |
| Method | _config |
Callback for the configUpdate event. |
| Method | _run |
CoAP server main loop. |
| Method | _stop |
Stop the CoAP server. |
Configure the CoAP server.
| Parameters | |
config:Configuration | The configuration object to read the configuration from. |
Initialize and run the CoAP server as a BackgroundWorker/Actor.
| Returns | |
| True if the server has been started successfully. |
Send a CoAP request to a URL.
| Parameters | |
request:CSERequest | The request to send. |
url:str | The URL to send the request to. |
isbool | Flag whether the URL is a direct URL. |
| Returns | |
Result | The result of the request. |
Validate the CoAP server configuration.
| Parameters | |
config:Configuration | The configuration object to validate. |
Callback for the configUpdate event.
| Parameters | |
eventEventData | The event data, containing the key and value of the updated configuration. |