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