1
2 """autogenerated by genpy from create_node/SetTurtlebotModeRequest.msg. Do not edit."""
3 import sys
4 python3 = True if sys.hexversion > 0x03000000 else False
5 import genpy
6 import struct
7
8
10 _md5sum = "89b81386720be1cd0ce7a3953fcd1b19"
11 _type = "create_node/SetTurtlebotModeRequest"
12 _has_header = False
13 _full_text = """uint8 mode
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(_get_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(locals().get('_x', self)))))
54 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
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,) = _get_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(_get_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(locals().get('_x', self)))))
80 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
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,) = _get_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
101 _struct_B = None
107
108 """autogenerated by genpy from create_node/SetTurtlebotModeResponse.msg. Do not edit."""
109 import sys
110 python3 = True if sys.hexversion > 0x03000000 else False
111 import genpy
112 import struct
113
114
116 _md5sum = "ef9db56bf4a60ce42049595d58c32b54"
117 _type = "create_node/SetTurtlebotModeResponse"
118 _has_header = False
119 _full_text = """bool valid_mode
120 """
121 __slots__ = ['valid_mode']
122 _slot_types = ['bool']
123
125 """
126 Constructor. Any message fields that are implicitly/explicitly
127 set to None will be assigned a default value. The recommend
128 use is keyword arguments as this is more robust to future message
129 changes. You cannot mix in-order arguments and keyword arguments.
130
131 The available fields are:
132 valid_mode
133
134 :param args: complete set of field values, in .msg order
135 :param kwds: use keyword arguments corresponding to message field names
136 to set specific fields.
137 """
138 if args or kwds:
139 super(SetTurtlebotModeResponse, self).__init__(*args, **kwds)
140
141 if self.valid_mode is None:
142 self.valid_mode = False
143 else:
144 self.valid_mode = False
145
147 """
148 internal API method
149 """
150 return self._slot_types
151
153 """
154 serialize message into buffer
155 :param buff: buffer, ``StringIO``
156 """
157 try:
158 buff.write(_get_struct_B().pack(self.valid_mode))
159 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
160 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
161
163 """
164 unpack serialized message in str into this message instance
165 :param str: byte array of serialized message, ``str``
166 """
167 try:
168 end = 0
169 start = end
170 end += 1
171 (self.valid_mode,) = _get_struct_B().unpack(str[start:end])
172 self.valid_mode = bool(self.valid_mode)
173 return self
174 except struct.error as e:
175 raise genpy.DeserializationError(e)
176
177
179 """
180 serialize message with numpy array types into buffer
181 :param buff: buffer, ``StringIO``
182 :param numpy: numpy python module
183 """
184 try:
185 buff.write(_get_struct_B().pack(self.valid_mode))
186 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
187 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
188
190 """
191 unpack serialized message in str into this message instance using numpy for array types
192 :param str: byte array of serialized message, ``str``
193 :param numpy: numpy python module
194 """
195 try:
196 end = 0
197 start = end
198 end += 1
199 (self.valid_mode,) = _get_struct_B().unpack(str[start:end])
200 self.valid_mode = bool(self.valid_mode)
201 return self
202 except struct.error as e:
203 raise genpy.DeserializationError(e)
204
205 _struct_I = genpy.struct_I
209 _struct_B = None
220