_SetDebugData.py
Go to the documentation of this file.
00001 """autogenerated by genpy from sr_robot_msgs/SetDebugDataRequest.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 SetDebugDataRequest(genpy.Message):
00009   _md5sum = "9f31db3c8e178b58a93d06e8bde6a17a"
00010   _type = "sr_robot_msgs/SetDebugDataRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 
00016 int16 motor_index
00017 int16 motor_data_type
00018 int16 publisher_index
00019 
00020 """
00021   __slots__ = ['motor_index','motor_data_type','publisher_index']
00022   _slot_types = ['int16','int16','int16']
00023 
00024   def __init__(self, *args, **kwds):
00025     """
00026     Constructor. Any message fields that are implicitly/explicitly
00027     set to None will be assigned a default value. The recommend
00028     use is keyword arguments as this is more robust to future message
00029     changes.  You cannot mix in-order arguments and keyword arguments.
00030 
00031     The available fields are:
00032        motor_index,motor_data_type,publisher_index
00033 
00034     :param args: complete set of field values, in .msg order
00035     :param kwds: use keyword arguments corresponding to message field names
00036     to set specific fields.
00037     """
00038     if args or kwds:
00039       super(SetDebugDataRequest, self).__init__(*args, **kwds)
00040       #message fields cannot be None, assign default values for those that are
00041       if self.motor_index is None:
00042         self.motor_index = 0
00043       if self.motor_data_type is None:
00044         self.motor_data_type = 0
00045       if self.publisher_index is None:
00046         self.publisher_index = 0
00047     else:
00048       self.motor_index = 0
00049       self.motor_data_type = 0
00050       self.publisher_index = 0
00051 
00052   def _get_types(self):
00053     """
00054     internal API method
00055     """
00056     return self._slot_types
00057 
00058   def serialize(self, buff):
00059     """
00060     serialize message into buffer
00061     :param buff: buffer, ``StringIO``
00062     """
00063     try:
00064       _x = self
00065       buff.write(_struct_3h.pack(_x.motor_index, _x.motor_data_type, _x.publisher_index))
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       _x = self
00077       start = end
00078       end += 6
00079       (_x.motor_index, _x.motor_data_type, _x.publisher_index,) = _struct_3h.unpack(str[start:end])
00080       return self
00081     except struct.error as e:
00082       raise genpy.DeserializationError(e) #most likely buffer underfill
00083 
00084 
00085   def serialize_numpy(self, buff, numpy):
00086     """
00087     serialize message with numpy array types into buffer
00088     :param buff: buffer, ``StringIO``
00089     :param numpy: numpy python module
00090     """
00091     try:
00092       _x = self
00093       buff.write(_struct_3h.pack(_x.motor_index, _x.motor_data_type, _x.publisher_index))
00094     except struct.error as se: self._check_types(se)
00095     except TypeError as te: self._check_types(te)
00096 
00097   def deserialize_numpy(self, str, numpy):
00098     """
00099     unpack serialized message in str into this message instance using numpy for array types
00100     :param str: byte array of serialized message, ``str``
00101     :param numpy: numpy python module
00102     """
00103     try:
00104       end = 0
00105       _x = self
00106       start = end
00107       end += 6
00108       (_x.motor_index, _x.motor_data_type, _x.publisher_index,) = _struct_3h.unpack(str[start:end])
00109       return self
00110     except struct.error as e:
00111       raise genpy.DeserializationError(e) #most likely buffer underfill
00112 
00113 _struct_I = genpy.struct_I
00114 _struct_3h = struct.Struct("<3h")
00115 """autogenerated by genpy from sr_robot_msgs/SetDebugDataResponse.msg. Do not edit."""
00116 import sys
00117 python3 = True if sys.hexversion > 0x03000000 else False
00118 import genpy
00119 import struct
00120 
00121 
00122 class SetDebugDataResponse(genpy.Message):
00123   _md5sum = "358e233cde0c8a8bcfea4ce193f8fc15"
00124   _type = "sr_robot_msgs/SetDebugDataResponse"
00125   _has_header = False #flag to mark the presence of a Header object
00126   _full_text = """bool success
00127 
00128 """
00129   __slots__ = ['success']
00130   _slot_types = ['bool']
00131 
00132   def __init__(self, *args, **kwds):
00133     """
00134     Constructor. Any message fields that are implicitly/explicitly
00135     set to None will be assigned a default value. The recommend
00136     use is keyword arguments as this is more robust to future message
00137     changes.  You cannot mix in-order arguments and keyword arguments.
00138 
00139     The available fields are:
00140        success
00141 
00142     :param args: complete set of field values, in .msg order
00143     :param kwds: use keyword arguments corresponding to message field names
00144     to set specific fields.
00145     """
00146     if args or kwds:
00147       super(SetDebugDataResponse, self).__init__(*args, **kwds)
00148       #message fields cannot be None, assign default values for those that are
00149       if self.success is None:
00150         self.success = False
00151     else:
00152       self.success = False
00153 
00154   def _get_types(self):
00155     """
00156     internal API method
00157     """
00158     return self._slot_types
00159 
00160   def serialize(self, buff):
00161     """
00162     serialize message into buffer
00163     :param buff: buffer, ``StringIO``
00164     """
00165     try:
00166       buff.write(_struct_B.pack(self.success))
00167     except struct.error as se: self._check_types(se)
00168     except TypeError as te: self._check_types(te)
00169 
00170   def deserialize(self, str):
00171     """
00172     unpack serialized message in str into this message instance
00173     :param str: byte array of serialized message, ``str``
00174     """
00175     try:
00176       end = 0
00177       start = end
00178       end += 1
00179       (self.success,) = _struct_B.unpack(str[start:end])
00180       self.success = bool(self.success)
00181       return self
00182     except struct.error as e:
00183       raise genpy.DeserializationError(e) #most likely buffer underfill
00184 
00185 
00186   def serialize_numpy(self, buff, numpy):
00187     """
00188     serialize message with numpy array types into buffer
00189     :param buff: buffer, ``StringIO``
00190     :param numpy: numpy python module
00191     """
00192     try:
00193       buff.write(_struct_B.pack(self.success))
00194     except struct.error as se: self._check_types(se)
00195     except TypeError as te: self._check_types(te)
00196 
00197   def deserialize_numpy(self, str, numpy):
00198     """
00199     unpack serialized message in str into this message instance using numpy for array types
00200     :param str: byte array of serialized message, ``str``
00201     :param numpy: numpy python module
00202     """
00203     try:
00204       end = 0
00205       start = end
00206       end += 1
00207       (self.success,) = _struct_B.unpack(str[start:end])
00208       self.success = bool(self.success)
00209       return self
00210     except struct.error as e:
00211       raise genpy.DeserializationError(e) #most likely buffer underfill
00212 
00213 _struct_I = genpy.struct_I
00214 _struct_B = struct.Struct("<B")
00215 class SetDebugData(object):
00216   _type          = 'sr_robot_msgs/SetDebugData'
00217   _md5sum = '7e92428f248882f525037fe3b24dbbf1'
00218   _request_class  = SetDebugDataRequest
00219   _response_class = SetDebugDataResponse


sr_robot_msgs
Author(s): Ugo Cupcic/ugo@shadowrobot.com
autogenerated on Fri Jan 3 2014 12:01:40