OpenMTC/doc/training/onem2m-examples/onem2m-example-6a.py

14 lines
278 B
Python
Raw Normal View History

2017-11-07 13:41:38 +00:00
# Example 6a: Notify OneM2MRequest
from openmtc_onem2m.transport import OneM2MRequest
from openmtc_onem2m.model import AE
my_app = AE(App_ID="myApp")
request = OneM2MRequest("notify", to="onem2m", pc=my_app)
2019-01-10 10:10:02 +00:00
print(request.to)
2017-11-07 13:41:38 +00:00
#>>> onem2m
2019-01-10 10:10:02 +00:00
print(request.pc.App_ID)
2017-11-07 13:41:38 +00:00
#>>> myApp