Yet Another WebIOPi+
Main Page
Related Pages
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Macros
Pages
examples
clients
coap-client.py
Go to the documentation of this file.
1
from
webiopi.protocols.coap
import
*
2
from
time
import
sleep
3
4
client =
COAPClient
()
5
client.sendRequest(
COAPPost
(
"coap://224.0.1.123/GPIO/25/function/out"
))
6
state =
True
7
8
while
True
:
9
response = client.sendRequest(
COAPPost
(
"coap://224.0.1.123/GPIO/25/value/%d"
% state))
10
if
response:
11
print(
"Received response:\n%s"
% response)
12
state =
not
state
13
else
:
14
print(
"No response received"
)
15
sleep(0.5)
webiopi.protocols.coap.COAPPost
Definition:
coap.py:338
webiopi.protocols.coap
Definition:
coap.py:1
webiopi.protocols.coap.COAPClient
Definition:
coap.py:407
Generated on Sat Sep 10 2016 09:36:12 for Yet Another WebIOPi+ by
1.8.8