_FlipRequest.py
Go to the documentation of this file.
00001 """autogenerated by genpy from appmanager_msgs/FlipRequestRequest.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 FlipRequestRequest(genpy.Message):
00009   _md5sum = "5c17e7312ab02af5214aa5283ca3678d"
00010   _type = "appmanager_msgs/FlipRequestRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """string remotename
00013 bool ok_flag
00014 
00015 """
00016   __slots__ = ['remotename','ok_flag']
00017   _slot_types = ['string','bool']
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        remotename,ok_flag
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(FlipRequestRequest, self).__init__(*args, **kwds)
00035       #message fields cannot be None, assign default values for those that are
00036       if self.remotename is None:
00037         self.remotename = ''
00038       if self.ok_flag is None:
00039         self.ok_flag = False
00040     else:
00041       self.remotename = ''
00042       self.ok_flag = False
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, ``StringIO``
00054     """
00055     try:
00056       _x = self.remotename
00057       length = len(_x)
00058       if python3 or type(_x) == unicode:
00059         _x = _x.encode('utf-8')
00060         length = len(_x)
00061       buff.write(struct.pack('<I%ss'%length, length, _x))
00062       buff.write(_struct_B.pack(self.ok_flag))
00063     except struct.error as se: self._check_types(se)
00064     except TypeError as te: self._check_types(te)
00065 
00066   def deserialize(self, str):
00067     """
00068     unpack serialized message in str into this message instance
00069     :param str: byte array of serialized message, ``str``
00070     """
00071     try:
00072       end = 0
00073       start = end
00074       end += 4
00075       (length,) = _struct_I.unpack(str[start:end])
00076       start = end
00077       end += length
00078       if python3:
00079         self.remotename = str[start:end].decode('utf-8')
00080       else:
00081         self.remotename = str[start:end]
00082       start = end
00083       end += 1
00084       (self.ok_flag,) = _struct_B.unpack(str[start:end])
00085       self.ok_flag = bool(self.ok_flag)
00086       return self
00087     except struct.error as e:
00088       raise genpy.DeserializationError(e) #most likely buffer underfill
00089 
00090 
00091   def serialize_numpy(self, buff, numpy):
00092     """
00093     serialize message with numpy array types into buffer
00094     :param buff: buffer, ``StringIO``
00095     :param numpy: numpy python module
00096     """
00097     try:
00098       _x = self.remotename
00099       length = len(_x)
00100       if python3 or type(_x) == unicode:
00101         _x = _x.encode('utf-8')
00102         length = len(_x)
00103       buff.write(struct.pack('<I%ss'%length, length, _x))
00104       buff.write(_struct_B.pack(self.ok_flag))
00105     except struct.error as se: self._check_types(se)
00106     except TypeError as te: self._check_types(te)
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       (length,) = _struct_I.unpack(str[start:end])
00119       start = end
00120       end += length
00121       if python3:
00122         self.remotename = str[start:end].decode('utf-8')
00123       else:
00124         self.remotename = str[start:end]
00125       start = end
00126       end += 1
00127       (self.ok_flag,) = _struct_B.unpack(str[start:end])
00128       self.ok_flag = bool(self.ok_flag)
00129       return self
00130     except struct.error as e:
00131       raise genpy.DeserializationError(e) #most likely buffer underfill
00132 
00133 _struct_I = genpy.struct_I
00134 _struct_B = struct.Struct("<B")
00135 """autogenerated by genpy from appmanager_msgs/FlipRequestResponse.msg. Do not edit."""
00136 import sys
00137 python3 = True if sys.hexversion > 0x03000000 else False
00138 import genpy
00139 import struct
00140 
00141 
00142 class FlipRequestResponse(genpy.Message):
00143   _md5sum = "eb13ac1f1354ccecb7941ee8fa2192e8"
00144   _type = "appmanager_msgs/FlipRequestResponse"
00145   _has_header = False #flag to mark the presence of a Header object
00146   _full_text = """bool result
00147 
00148 
00149 """
00150   __slots__ = ['result']
00151   _slot_types = ['bool']
00152 
00153   def __init__(self, *args, **kwds):
00154     """
00155     Constructor. Any message fields that are implicitly/explicitly
00156     set to None will be assigned a default value. The recommend
00157     use is keyword arguments as this is more robust to future message
00158     changes.  You cannot mix in-order arguments and keyword arguments.
00159 
00160     The available fields are:
00161        result
00162 
00163     :param args: complete set of field values, in .msg order
00164     :param kwds: use keyword arguments corresponding to message field names
00165     to set specific fields.
00166     """
00167     if args or kwds:
00168       super(FlipRequestResponse, self).__init__(*args, **kwds)
00169       #message fields cannot be None, assign default values for those that are
00170       if self.result is None:
00171         self.result = False
00172     else:
00173       self.result = False
00174 
00175   def _get_types(self):
00176     """
00177     internal API method
00178     """
00179     return self._slot_types
00180 
00181   def serialize(self, buff):
00182     """
00183     serialize message into buffer
00184     :param buff: buffer, ``StringIO``
00185     """
00186     try:
00187       buff.write(_struct_B.pack(self.result))
00188     except struct.error as se: self._check_types(se)
00189     except TypeError as te: self._check_types(te)
00190 
00191   def deserialize(self, str):
00192     """
00193     unpack serialized message in str into this message instance
00194     :param str: byte array of serialized message, ``str``
00195     """
00196     try:
00197       end = 0
00198       start = end
00199       end += 1
00200       (self.result,) = _struct_B.unpack(str[start:end])
00201       self.result = bool(self.result)
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.result))
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.result,) = _struct_B.unpack(str[start:end])
00229       self.result = bool(self.result)
00230       return self
00231     except struct.error as e:
00232       raise genpy.DeserializationError(e) #most likely buffer underfill
00233 
00234 _struct_I = genpy.struct_I
00235 _struct_B = struct.Struct("<B")
00236 class FlipRequest(object):
00237   _type          = 'appmanager_msgs/FlipRequest'
00238   _md5sum = '76e7cc1e80aaa1141eb83ba697719a1e'
00239   _request_class  = FlipRequestRequest
00240   _response_class = FlipRequestResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


appmanager_msgs
Author(s): Jihoon
autogenerated on Tue Jan 15 2013 17:43:30