1 """autogenerated by genpy from create_node/SetTurtlebotModeRequest.msg. Do not edit."""
2 import sys
3 python3 = True if sys.hexversion > 0x03000000 else False
4 import genpy
5 import struct
6
7
9 _md5sum = "89b81386720be1cd0ce7a3953fcd1b19"
10 _type = "create_node/SetTurtlebotModeRequest"
11 _has_header = False
12 _full_text = """uint8 mode
13
14 """
15 __slots__ = ['mode']
16 _slot_types = ['uint8']
17
19 """
20 Constructor. Any message fields that are implicitly/explicitly
21 set to None will be assigned a default value. The recommend
22 use is keyword arguments as this is more robust to future message
23 changes. You cannot mix in-order arguments and keyword arguments.
24
25 The available fields are:
26 mode
27
28 :param args: complete set of field values, in .msg order
29 :param kwds: use keyword arguments corresponding to message field names
30 to set specific fields.
31 """
32 if args or kwds:
33 super(SetTurtlebotModeRequest, self).__init__(*args, **kwds)
34
35 if self.mode is None:
36 self.mode = 0
37 else:
38 self.mode = 0
39
41 """
42 internal API method
43 """
44 return self._slot_types
45
47 """
48 serialize message into buffer
49 :param buff: buffer, ``StringIO``
50 """
51 try:
52 buff.write(_struct_B.pack(self.mode))
53 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
54 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
55
57 """
58 unpack serialized message in str into this message instance
59 :param str: byte array of serialized message, ``str``
60 """
61 try:
62 end = 0
63 start = end
64 end += 1
65 (self.mode,) = _struct_B.unpack(str[start:end])
66 return self
67 except struct.error as e:
68 raise genpy.DeserializationError(e)
69
70
72 """
73 serialize message with numpy array types into buffer
74 :param buff: buffer, ``StringIO``
75 :param numpy: numpy python module
76 """
77 try:
78 buff.write(_struct_B.pack(self.mode))
79 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
80 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
81
83 """
84 unpack serialized message in str into this message instance using numpy for array types
85 :param str: byte array of serialized message, ``str``
86 :param numpy: numpy python module
87 """
88 try:
89 end = 0
90 start = end
91 end += 1
92 (self.mode,) = _struct_B.unpack(str[start:end])
93 return self
94 except struct.error as e:
95 raise genpy.DeserializationError(e)
96
97 _struct_I = genpy.struct_I
98 _struct_B = struct.Struct("<B")
99 """autogenerated by genpy from create_node/SetTurtlebotModeResponse.msg. Do not edit."""
100 import sys
101 python3 = True if sys.hexversion > 0x03000000 else False
102 import genpy
103 import struct
104
105
107 _md5sum = "ef9db56bf4a60ce42049595d58c32b54"
108 _type = "create_node/SetTurtlebotModeResponse"
109 _has_header = False
110 _full_text = """bool valid_mode
111
112 """
113 __slots__ = ['valid_mode']
114 _slot_types = ['bool']
115
117 """
118 Constructor. Any message fields that are implicitly/explicitly
119 set to None will be assigned a default value. The recommend
120 use is keyword arguments as this is more robust to future message
121 changes. You cannot mix in-order arguments and keyword arguments.
122
123 The available fields are:
124 valid_mode
125
126 :param args: complete set of field values, in .msg order
127 :param kwds: use keyword arguments corresponding to message field names
128 to set specific fields.
129 """
130 if args or kwds:
131 super(SetTurtlebotModeResponse, self).__init__(*args, **kwds)
132
133 if self.valid_mode is None:
134 self.valid_mode = False
135 else:
136 self.valid_mode = False
137
139 """
140 internal API method
141 """
142 return self._slot_types
143
145 """
146 serialize message into buffer
147 :param buff: buffer, ``StringIO``
148 """
149 try:
150 buff.write(_struct_B.pack(self.valid_mode))
151 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
152 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
153
155 """
156 unpack serialized message in str into this message instance
157 :param str: byte array of serialized message, ``str``
158 """
159 try:
160 end = 0
161 start = end
162 end += 1
163 (self.valid_mode,) = _struct_B.unpack(str[start:end])
164 self.valid_mode = bool(self.valid_mode)
165 return self
166 except struct.error as e:
167 raise genpy.DeserializationError(e)
168
169
171 """
172 serialize message with numpy array types into buffer
173 :param buff: buffer, ``StringIO``
174 :param numpy: numpy python module
175 """
176 try:
177 buff.write(_struct_B.pack(self.valid_mode))
178 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
179 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
180
182 """
183 unpack serialized message in str into this message instance using numpy for array types
184 :param str: byte array of serialized message, ``str``
185 :param numpy: numpy python module
186 """
187 try:
188 end = 0
189 start = end
190 end += 1
191 (self.valid_mode,) = _struct_B.unpack(str[start:end])
192 self.valid_mode = bool(self.valid_mode)
193 return self
194 except struct.error as e:
195 raise genpy.DeserializationError(e)
196
197 _struct_I = genpy.struct_I
198 _struct_B = struct.Struct("<B")
204