$search
00001 """autogenerated by genmsg_py from BoardConfigRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class BoardConfigRequest(roslib.message.Message): 00007 _md5sum = "ec9bad54b410ebc79183d761c609dd76" 00008 _type = "wge100_camera/BoardConfigRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 uint32 serial 00013 uint8[] mac 00014 00015 """ 00016 __slots__ = ['serial','mac'] 00017 _slot_types = ['uint32','uint8[]'] 00018 00019 def __init__(self, *args, **kwds): 00020 """ 00021 Constructor. Any message fields that are implicitly/explicitly 00022 set to None will be assigned a default value. The recommend 00023 use is keyword arguments as this is more robust to future message 00024 changes. You cannot mix in-order arguments and keyword arguments. 00025 00026 The available fields are: 00027 serial,mac 00028 00029 @param args: complete set of field values, in .msg order 00030 @param kwds: use keyword arguments corresponding to message field names 00031 to set specific fields. 00032 """ 00033 if args or kwds: 00034 super(BoardConfigRequest, self).__init__(*args, **kwds) 00035 #message fields cannot be None, assign default values for those that are 00036 if self.serial is None: 00037 self.serial = 0 00038 if self.mac is None: 00039 self.mac = '' 00040 else: 00041 self.serial = 0 00042 self.mac = '' 00043 00044 def _get_types(self): 00045 """ 00046 internal API method 00047 """ 00048 return self._slot_types 00049 00050 def serialize(self, buff): 00051 """ 00052 serialize message into buffer 00053 @param buff: buffer 00054 @type buff: StringIO 00055 """ 00056 try: 00057 buff.write(_struct_I.pack(self.serial)) 00058 _x = self.mac 00059 length = len(_x) 00060 # - if encoded as a list instead, serialize as bytes instead of string 00061 if type(_x) in [list, tuple]: 00062 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00063 else: 00064 buff.write(struct.pack('<I%ss'%length, length, _x)) 00065 except struct.error as se: self._check_types(se) 00066 except TypeError as te: self._check_types(te) 00067 00068 def deserialize(self, str): 00069 """ 00070 unpack serialized message in str into this message instance 00071 @param str: byte array of serialized message 00072 @type str: str 00073 """ 00074 try: 00075 end = 0 00076 start = end 00077 end += 4 00078 (self.serial,) = _struct_I.unpack(str[start:end]) 00079 start = end 00080 end += 4 00081 (length,) = _struct_I.unpack(str[start:end]) 00082 start = end 00083 end += length 00084 self.mac = str[start:end] 00085 return self 00086 except struct.error as e: 00087 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00088 00089 00090 def serialize_numpy(self, buff, numpy): 00091 """ 00092 serialize message with numpy array types into buffer 00093 @param buff: buffer 00094 @type buff: StringIO 00095 @param numpy: numpy python module 00096 @type numpy module 00097 """ 00098 try: 00099 buff.write(_struct_I.pack(self.serial)) 00100 _x = self.mac 00101 length = len(_x) 00102 # - if encoded as a list instead, serialize as bytes instead of string 00103 if type(_x) in [list, tuple]: 00104 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00105 else: 00106 buff.write(struct.pack('<I%ss'%length, length, _x)) 00107 except struct.error as se: self._check_types(se) 00108 except TypeError as te: self._check_types(te) 00109 00110 def deserialize_numpy(self, str, numpy): 00111 """ 00112 unpack serialized message in str into this message instance using numpy for array types 00113 @param str: byte array of serialized message 00114 @type str: str 00115 @param numpy: numpy python module 00116 @type numpy: module 00117 """ 00118 try: 00119 end = 0 00120 start = end 00121 end += 4 00122 (self.serial,) = _struct_I.unpack(str[start:end]) 00123 start = end 00124 end += 4 00125 (length,) = _struct_I.unpack(str[start:end]) 00126 start = end 00127 end += length 00128 self.mac = str[start:end] 00129 return self 00130 except struct.error as e: 00131 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00132 00133 _struct_I = roslib.message.struct_I 00134 """autogenerated by genmsg_py from BoardConfigResponse.msg. Do not edit.""" 00135 import roslib.message 00136 import struct 00137 00138 00139 class BoardConfigResponse(roslib.message.Message): 00140 _md5sum = "6cca7c80398b8b31af04b80534923f16" 00141 _type = "wge100_camera/BoardConfigResponse" 00142 _has_header = False #flag to mark the presence of a Header object 00143 _full_text = """uint8 success 00144 00145 00146 """ 00147 __slots__ = ['success'] 00148 _slot_types = ['uint8'] 00149 00150 def __init__(self, *args, **kwds): 00151 """ 00152 Constructor. Any message fields that are implicitly/explicitly 00153 set to None will be assigned a default value. The recommend 00154 use is keyword arguments as this is more robust to future message 00155 changes. You cannot mix in-order arguments and keyword arguments. 00156 00157 The available fields are: 00158 success 00159 00160 @param args: complete set of field values, in .msg order 00161 @param kwds: use keyword arguments corresponding to message field names 00162 to set specific fields. 00163 """ 00164 if args or kwds: 00165 super(BoardConfigResponse, self).__init__(*args, **kwds) 00166 #message fields cannot be None, assign default values for those that are 00167 if self.success is None: 00168 self.success = 0 00169 else: 00170 self.success = 0 00171 00172 def _get_types(self): 00173 """ 00174 internal API method 00175 """ 00176 return self._slot_types 00177 00178 def serialize(self, buff): 00179 """ 00180 serialize message into buffer 00181 @param buff: buffer 00182 @type buff: StringIO 00183 """ 00184 try: 00185 buff.write(_struct_B.pack(self.success)) 00186 except struct.error as se: self._check_types(se) 00187 except TypeError as te: self._check_types(te) 00188 00189 def deserialize(self, str): 00190 """ 00191 unpack serialized message in str into this message instance 00192 @param str: byte array of serialized message 00193 @type str: str 00194 """ 00195 try: 00196 end = 0 00197 start = end 00198 end += 1 00199 (self.success,) = _struct_B.unpack(str[start:end]) 00200 return self 00201 except struct.error as e: 00202 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00203 00204 00205 def serialize_numpy(self, buff, numpy): 00206 """ 00207 serialize message with numpy array types into buffer 00208 @param buff: buffer 00209 @type buff: StringIO 00210 @param numpy: numpy python module 00211 @type numpy module 00212 """ 00213 try: 00214 buff.write(_struct_B.pack(self.success)) 00215 except struct.error as se: self._check_types(se) 00216 except TypeError as te: self._check_types(te) 00217 00218 def deserialize_numpy(self, str, numpy): 00219 """ 00220 unpack serialized message in str into this message instance using numpy for array types 00221 @param str: byte array of serialized message 00222 @type str: str 00223 @param numpy: numpy python module 00224 @type numpy: module 00225 """ 00226 try: 00227 end = 0 00228 start = end 00229 end += 1 00230 (self.success,) = _struct_B.unpack(str[start:end]) 00231 return self 00232 except struct.error as e: 00233 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00234 00235 _struct_I = roslib.message.struct_I 00236 _struct_B = struct.Struct("<B") 00237 class BoardConfig(roslib.message.ServiceDefinition): 00238 _type = 'wge100_camera/BoardConfig' 00239 _md5sum = '785c6974990d2659ed40a68807b3f3bd' 00240 _request_class = BoardConfigRequest 00241 _response_class = BoardConfigResponse