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


wge100_camera
Author(s): Blaise Gassend, Patrick Mihelich, Eric MacIntosh, David Palchak
autogenerated on Fri Jan 3 2014 12:16:00