RAPP Platform API
 All Classes Namespaces Files Functions Variables Typedefs
PathPlanningUploadMap.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 PathPlanningUploadMap(CloudMsg):
12  """ Path Planning Upload Map Cloud Message object"""
13 
14  class Request(CloudRequest):
15  """ Path Planning Upload Map Cloud Request object.
16 
17  PathPlanningUploadMap.Request
18  """
19  def __init__(self, **kwargs):
20  """!
21  Constructor
22 
23  @param **kwargs - Keyword arguments. Apply values to the request attributes.
24  - @ref map_name
25  - @ref png_file
26  - @ref yaml_file
27  """
28 
29  ## The map name.
30  self.map_name = ''
31  ## Path to the map image png file.
32  self.png_file = ''
33  ## Path to the map description yaml file.
34  self.yaml_file = ''
35  super(PathPlanningUploadMap.Request, self).__init__(**kwargs)
36 
37 
38  def make_payload(self):
39  """ Create and return the Payload of the Request. """
40  return Payload(map_name=self.map_name)
41 
42 
43  def make_files(self):
44  """ Create and return Array of File objects of the Request. """
45  return [
46  File(self.png_file, 'png_file'),
47  File(self.yaml_file, 'yaml_file')]
48 
49 
50  class Response(CloudResponse):
51  """ Path Planning Upload Map Cloud Response object.
52 
53  PathPlanningUploadMap.Response
54  """
55  def __init__(self, **kwargs):
56  """!
57  Constructor
58 
59  @param **kwargs - Keyword arguments. Apply values to the request attributes.
60  - @ref error
61  """
62 
63  ## Error message
64  self.error = ''
65  super(PathPlanningUploadMap.Response, self).__init__(**kwargs)
66 
67 
68  def __init__(self, **kwargs):
69  """!
70  Constructor
71 
72  @param **kwargs - Keyword arguments. Apply values to the request attributes.
73  - @ref Request.map_name
74  - @ref Request.png_file
75  - @ref Request.yaml_file
76  """
77 
78  # Create and hold the Request object for this CloudMsg
80  # Create and hold the Response object for this CloudMsg
82  super(PathPlanningUploadMap, self).__init__(
83  svcname='path_planning_upload_map', **kwargs)
84 
85