RAPP Platform API
Main Page
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
HazardDetectionDoor.py
Go to the documentation of this file.
1
from
RappCloud.Objects
import
(
2
File,
3
Payload)
4
5
from
Cloud
import
(
6
CloudMsg,
7
CloudRequest,
8
CloudResponse)
9
10
11
class
HazardDetectionDoor
(CloudMsg):
12
""" Hazard Detection Light Check Cloud Message object"""
13
14
class
Request
(CloudRequest):
15
""" Hazard Detection Door Check Cloud Request object.
16
17
HazardDetectionDoor.Request
18
"""
19
def
__init__
(self, **kwargs):
20
"""!
21
Constructor
22
23
@param **kwargs - Keyword arguments. Apply values to the request attributes.
24
- @ref imageFilepath
25
"""
26
## File path to the image to load. This is the image to perform
27
# qr-detection on.
28
self.
imageFilepath
=
''
29
super(
HazardDetectionDoor.Request
, self).
__init__
(**kwargs)
30
31
32
def
make_payload
(self):
33
""" Create and return the Payload of the Request. """
34
return
Payload()
35
36
37
def
make_files
(self):
38
""" Create and return Array of File objects of the Request. """
39
return
[File(self.
imageFilepath
, postfield=
'file'
)]
40
41
42
class
Response
(CloudResponse):
43
""" Hazard Detection Door Check Cloud Response object.
44
45
HazardDetectionDoor.Response
46
"""
47
def
__init__
(self, **kwargs):
48
"""!
49
Constructor
50
51
@param **kwargs - Keyword arguments. Apply values to the request attributes.
52
- @ref error
53
- @ref door_angle
54
"""
55
56
## Error message.
57
self.
error
=
''
58
## The angle of the detected door.
59
self.
door_angle
= 0.0
60
super(
HazardDetectionDoor.Response
, self).
__init__
(**kwargs)
61
62
63
def
__init__
(self, **kwargs):
64
"""!
65
Constructor
66
67
@param **kwargs - Keyword arguments. Apply values to the request attributes.
68
- @ref Request.imageFilepath
69
"""
70
71
# Create and hold the Request object for this CloudMsg
72
self.
req
=
HazardDetectionDoor.Request
()
73
# Create and hold the Response object for this CloudMsg
74
self.
resp
=
HazardDetectionDoor.Response
()
75
super(HazardDetectionDoor, self).
__init__
(
76
svcname=
'hazard_detection_door_check'
, **kwargs)
77
78
RappCloud.CloudMsgs.HazardDetectionDoor.HazardDetectionDoor.Response
Definition:
HazardDetectionDoor.py:42
RappCloud.CloudMsgs.HazardDetectionDoor.HazardDetectionDoor.Response.door_angle
door_angle
The angle of the detected door.
Definition:
HazardDetectionDoor.py:59
RappCloud.CloudMsgs.HazardDetectionDoor.HazardDetectionDoor.Response.__init__
def __init__
Constructor.
Definition:
HazardDetectionDoor.py:47
RappCloud.CloudMsgs.HazardDetectionDoor.HazardDetectionDoor
Definition:
HazardDetectionDoor.py:11
RappCloud.Objects
Definition:
__init__.py:1
RappCloud.CloudMsgs.HazardDetectionDoor.HazardDetectionDoor.req
req
Definition:
HazardDetectionDoor.py:72
RappCloud.CloudMsgs.HazardDetectionDoor.HazardDetectionDoor.Request.make_payload
def make_payload
Definition:
HazardDetectionDoor.py:32
RappCloud.CloudMsgs.HazardDetectionDoor.HazardDetectionDoor.Request.__init__
def __init__
Constructor.
Definition:
HazardDetectionDoor.py:19
RappCloud.CloudMsgs.HazardDetectionDoor.HazardDetectionDoor.Request.imageFilepath
imageFilepath
File path to the image to load.
Definition:
HazardDetectionDoor.py:28
RappCloud.CloudMsgs.HazardDetectionDoor.HazardDetectionDoor.Request
Definition:
HazardDetectionDoor.py:14
RappCloud.CloudMsgs.HazardDetectionDoor.HazardDetectionDoor.__init__
def __init__
Constructor.
Definition:
HazardDetectionDoor.py:63
RappCloud.CloudMsgs.HazardDetectionDoor.HazardDetectionDoor.resp
resp
Definition:
HazardDetectionDoor.py:74
RappCloud.CloudMsgs.HazardDetectionDoor.HazardDetectionDoor.Response.error
error
Error message.
Definition:
HazardDetectionDoor.py:57
RappCloud.CloudMsgs.HazardDetectionDoor.HazardDetectionDoor.Request.make_files
def make_files
Definition:
HazardDetectionDoor.py:37
python
RappCloud
CloudMsgs
HazardDetectionDoor.py
Generated on Fri Jul 29 2016 18:45:01 for RAPP Platform API by
1.8.6