1
2 """autogenerated by genpy from create_node/SetDigitalOutputsRequest.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 = "95ef1ce60d04abfe27bea339a6261f29"
11 _type = "create_node/SetDigitalOutputsRequest"
12 _has_header = False
13 _full_text = """uint8 digital_out_0
14 uint8 digital_out_1
15 uint8 digital_out_2
16 """
17 __slots__ = ['digital_out_0','digital_out_1','digital_out_2']
18 _slot_types = ['uint8','uint8','uint8']
19
21 """
22 Constructor. Any message fields that are implicitly/explicitly
23 set to None will be assigned a default value. The recommend
24 use is keyword arguments as this is more robust to future message
25 changes. You cannot mix in-order arguments and keyword arguments.
26
27 The available fields are:
28 digital_out_0,digital_out_1,digital_out_2
29
30 :param args: complete set of field values, in .msg order
31 :param kwds: use keyword arguments corresponding to message field names
32 to set specific fields.
33 """
34 if args or kwds:
35 super(SetDigitalOutputsRequest, self).__init__(*args, **kwds)
36
37 if self.digital_out_0 is None:
38 self.digital_out_0 = 0
39 if self.digital_out_1 is None:
40 self.digital_out_1 = 0
41 if self.digital_out_2 is None:
42 self.digital_out_2 = 0
43 else:
44 self.digital_out_0 = 0
45 self.digital_out_1 = 0
46 self.digital_out_2 = 0
47
49 """
50 internal API method
51 """
52 return self._slot_types
53
55 """
56 serialize message into buffer
57 :param buff: buffer, ``StringIO``
58 """
59 try:
60 _x = self
61 buff.write(_get_struct_3B().pack(_x.digital_out_0, _x.digital_out_1, _x.digital_out_2))
62 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
63 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
64
66 """
67 unpack serialized message in str into this message instance
68 :param str: byte array of serialized message, ``str``
69 """
70 try:
71 end = 0
72 _x = self
73 start = end
74 end += 3
75 (_x.digital_out_0, _x.digital_out_1, _x.digital_out_2,) = _get_struct_3B().unpack(str[start:end])
76 return self
77 except struct.error as e:
78 raise genpy.DeserializationError(e)
79
80
82 """
83 serialize message with numpy array types into buffer
84 :param buff: buffer, ``StringIO``
85 :param numpy: numpy python module
86 """
87 try:
88 _x = self
89 buff.write(_get_struct_3B().pack(_x.digital_out_0, _x.digital_out_1, _x.digital_out_2))
90 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
91 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
92
94 """
95 unpack serialized message in str into this message instance using numpy for array types
96 :param str: byte array of serialized message, ``str``
97 :param numpy: numpy python module
98 """
99 try:
100 end = 0
101 _x = self
102 start = end
103 end += 3
104 (_x.digital_out_0, _x.digital_out_1, _x.digital_out_2,) = _get_struct_3B().unpack(str[start:end])
105 return self
106 except struct.error as e:
107 raise genpy.DeserializationError(e)
108
109 _struct_I = genpy.struct_I
113 _struct_3B = None
119
120 """autogenerated by genpy from create_node/SetDigitalOutputsResponse.msg. Do not edit."""
121 import sys
122 python3 = True if sys.hexversion > 0x03000000 else False
123 import genpy
124 import struct
125
126
128 _md5sum = "89bb254424e4cffedbf494e7b0ddbfea"
129 _type = "create_node/SetDigitalOutputsResponse"
130 _has_header = False
131 _full_text = """bool done
132 """
133 __slots__ = ['done']
134 _slot_types = ['bool']
135
137 """
138 Constructor. Any message fields that are implicitly/explicitly
139 set to None will be assigned a default value. The recommend
140 use is keyword arguments as this is more robust to future message
141 changes. You cannot mix in-order arguments and keyword arguments.
142
143 The available fields are:
144 done
145
146 :param args: complete set of field values, in .msg order
147 :param kwds: use keyword arguments corresponding to message field names
148 to set specific fields.
149 """
150 if args or kwds:
151 super(SetDigitalOutputsResponse, self).__init__(*args, **kwds)
152
153 if self.done is None:
154 self.done = False
155 else:
156 self.done = False
157
159 """
160 internal API method
161 """
162 return self._slot_types
163
165 """
166 serialize message into buffer
167 :param buff: buffer, ``StringIO``
168 """
169 try:
170 buff.write(_get_struct_B().pack(self.done))
171 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
172 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
173
175 """
176 unpack serialized message in str into this message instance
177 :param str: byte array of serialized message, ``str``
178 """
179 try:
180 end = 0
181 start = end
182 end += 1
183 (self.done,) = _get_struct_B().unpack(str[start:end])
184 self.done = bool(self.done)
185 return self
186 except struct.error as e:
187 raise genpy.DeserializationError(e)
188
189
191 """
192 serialize message with numpy array types into buffer
193 :param buff: buffer, ``StringIO``
194 :param numpy: numpy python module
195 """
196 try:
197 buff.write(_get_struct_B().pack(self.done))
198 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
199 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
200
202 """
203 unpack serialized message in str into this message instance using numpy for array types
204 :param str: byte array of serialized message, ``str``
205 :param numpy: numpy python module
206 """
207 try:
208 end = 0
209 start = end
210 end += 1
211 (self.done,) = _get_struct_B().unpack(str[start:end])
212 self.done = bool(self.done)
213 return self
214 except struct.error as e:
215 raise genpy.DeserializationError(e)
216
217 _struct_I = genpy.struct_I
221 _struct_B = None
232