_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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00067     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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       self.mac = str[start:end]
00085       return self
00086     except struct.error as e:
00087       raise genpy.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, ``StringIO``
00094     :param numpy: numpy python module
00095     """
00096     try:
00097       buff.write(_struct_I.pack(self.serial))
00098       _x = self.mac
00099       length = len(_x)
00100       # - if encoded as a list instead, serialize as bytes instead of string
00101       if type(_x) in [list, tuple]:
00102         buff.write(struct.pack('<I%sB'%length, length, *_x))
00103       else:
00104         buff.write(struct.pack('<I%ss'%length, length, _x))
00105     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00106     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00107 
00108   def deserialize_numpy(self, str, numpy):
00109     """
00110     unpack serialized message in str into this message instance using numpy for array types
00111     :param str: byte array of serialized message, ``str``
00112     :param numpy: numpy python module
00113     """
00114     try:
00115       end = 0
00116       start = end
00117       end += 4
00118       (self.serial,) = _struct_I.unpack(str[start:end])
00119       start = end
00120       end += 4
00121       (length,) = _struct_I.unpack(str[start:end])
00122       start = end
00123       end += length
00124       self.mac = str[start:end]
00125       return self
00126     except struct.error as e:
00127       raise genpy.DeserializationError(e) #most likely buffer underfill
00128 
00129 _struct_I = genpy.struct_I
00130 """autogenerated by genpy from wge100_camera/BoardConfigResponse.msg. Do not edit."""
00131 import sys
00132 python3 = True if sys.hexversion > 0x03000000 else False
00133 import genpy
00134 import struct
00135 
00136 
00137 class BoardConfigResponse(genpy.Message):
00138   _md5sum = "6cca7c80398b8b31af04b80534923f16"
00139   _type = "wge100_camera/BoardConfigResponse"
00140   _has_header = False #flag to mark the presence of a Header object
00141   _full_text = """uint8 success
00142 
00143 
00144 """
00145   __slots__ = ['success']
00146   _slot_types = ['uint8']
00147 
00148   def __init__(self, *args, **kwds):
00149     """
00150     Constructor. Any message fields that are implicitly/explicitly
00151     set to None will be assigned a default value. The recommend
00152     use is keyword arguments as this is more robust to future message
00153     changes.  You cannot mix in-order arguments and keyword arguments.
00154 
00155     The available fields are:
00156        success
00157 
00158     :param args: complete set of field values, in .msg order
00159     :param kwds: use keyword arguments corresponding to message field names
00160     to set specific fields.
00161     """
00162     if args or kwds:
00163       super(BoardConfigResponse, self).__init__(*args, **kwds)
00164       #message fields cannot be None, assign default values for those that are
00165       if self.success is None:
00166         self.success = 0
00167     else:
00168       self.success = 0
00169 
00170   def _get_types(self):
00171     """
00172     internal API method
00173     """
00174     return self._slot_types
00175 
00176   def serialize(self, buff):
00177     """
00178     serialize message into buffer
00179     :param buff: buffer, ``StringIO``
00180     """
00181     try:
00182       buff.write(_struct_B.pack(self.success))
00183     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00184     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00185 
00186   def deserialize(self, str):
00187     """
00188     unpack serialized message in str into this message instance
00189     :param str: byte array of serialized message, ``str``
00190     """
00191     try:
00192       end = 0
00193       start = end
00194       end += 1
00195       (self.success,) = _struct_B.unpack(str[start:end])
00196       return self
00197     except struct.error as e:
00198       raise genpy.DeserializationError(e) #most likely buffer underfill
00199 
00200 
00201   def serialize_numpy(self, buff, numpy):
00202     """
00203     serialize message with numpy array types into buffer
00204     :param buff: buffer, ``StringIO``
00205     :param numpy: numpy python module
00206     """
00207     try:
00208       buff.write(_struct_B.pack(self.success))
00209     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00210     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00211 
00212   def deserialize_numpy(self, str, numpy):
00213     """
00214     unpack serialized message in str into this message instance using numpy for array types
00215     :param str: byte array of serialized message, ``str``
00216     :param numpy: numpy python module
00217     """
00218     try:
00219       end = 0
00220       start = end
00221       end += 1
00222       (self.success,) = _struct_B.unpack(str[start:end])
00223       return self
00224     except struct.error as e:
00225       raise genpy.DeserializationError(e) #most likely buffer underfill
00226 
00227 _struct_I = genpy.struct_I
00228 _struct_B = struct.Struct("<B")
00229 class BoardConfig(object):
00230   _type          = 'wge100_camera/BoardConfig'
00231   _md5sum = '785c6974990d2659ed40a68807b3f3bd'
00232   _request_class  = BoardConfigRequest
00233   _response_class = BoardConfigResponse


wge100_camera
Author(s): Blaise Gassend, Patrick Mihelich, Eric MacIntosh, David Palchak
autogenerated on Mon Oct 6 2014 08:59:04