_MKValueInputOutput.py
Go to the documentation of this file.
00001 """autogenerated by genpy from telekyb_srvs/MKValueInputOutputRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import genpy
00008 import telekyb_msgs.msg
00009 
00010 class MKValueInputOutputRequest(genpy.Message):
00011   _md5sum = "e33a1633b9933342278c1173610d67b3"
00012   _type = "telekyb_srvs/MKValueInputOutputRequest"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 telekyb_msgs/MKValue value
00033 
00034 ================================================================================
00035 MSG: telekyb_msgs/MKValue
00036 #
00037 # Copyright 2011  Antonio Franchi and Martin Riedel    
00038 #
00039 # This file is part of TeleKyb.
00040 #
00041 # TeleKyb is free software: you can redistribute it and/or modify
00042 # it under the terms of the GNU General Public License as published by
00043 # the Free Software Foundation, either version 3 of the License, or
00044 # (at your option) any later version.
00045 #
00046 # TeleKyb is distributed in the hope that it will be useful,
00047 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00048 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00049 # GNU General Public License for more details.
00050 #
00051 # You should have received a copy of the GNU General Public License
00052 # along with TeleKyb. If not, see <http://www.gnu.org/licenses/>.
00053 
00054 string name
00055 time stamp
00056 int16 id
00057 int16 value
00058 
00059 #
00060 #
00061 """
00062   __slots__ = ['value']
00063   _slot_types = ['telekyb_msgs/MKValue']
00064 
00065   def __init__(self, *args, **kwds):
00066     """
00067     Constructor. Any message fields that are implicitly/explicitly
00068     set to None will be assigned a default value. The recommend
00069     use is keyword arguments as this is more robust to future message
00070     changes.  You cannot mix in-order arguments and keyword arguments.
00071 
00072     The available fields are:
00073        value
00074 
00075     :param args: complete set of field values, in .msg order
00076     :param kwds: use keyword arguments corresponding to message field names
00077     to set specific fields.
00078     """
00079     if args or kwds:
00080       super(MKValueInputOutputRequest, self).__init__(*args, **kwds)
00081       #message fields cannot be None, assign default values for those that are
00082       if self.value is None:
00083         self.value = telekyb_msgs.msg.MKValue()
00084     else:
00085       self.value = telekyb_msgs.msg.MKValue()
00086 
00087   def _get_types(self):
00088     """
00089     internal API method
00090     """
00091     return self._slot_types
00092 
00093   def serialize(self, buff):
00094     """
00095     serialize message into buffer
00096     :param buff: buffer, ``StringIO``
00097     """
00098     try:
00099       _x = self.value.name
00100       length = len(_x)
00101       if python3 or type(_x) == unicode:
00102         _x = _x.encode('utf-8')
00103         length = len(_x)
00104       buff.write(struct.pack('<I%ss'%length, length, _x))
00105       _x = self
00106       buff.write(_struct_2I2h.pack(_x.value.stamp.secs, _x.value.stamp.nsecs, _x.value.id, _x.value.value))
00107     except struct.error as se: self._check_types(se)
00108     except TypeError as te: self._check_types(te)
00109 
00110   def deserialize(self, str):
00111     """
00112     unpack serialized message in str into this message instance
00113     :param str: byte array of serialized message, ``str``
00114     """
00115     try:
00116       if self.value is None:
00117         self.value = telekyb_msgs.msg.MKValue()
00118       end = 0
00119       start = end
00120       end += 4
00121       (length,) = _struct_I.unpack(str[start:end])
00122       start = end
00123       end += length
00124       if python3:
00125         self.value.name = str[start:end].decode('utf-8')
00126       else:
00127         self.value.name = str[start:end]
00128       _x = self
00129       start = end
00130       end += 12
00131       (_x.value.stamp.secs, _x.value.stamp.nsecs, _x.value.id, _x.value.value,) = _struct_2I2h.unpack(str[start:end])
00132       return self
00133     except struct.error as e:
00134       raise genpy.DeserializationError(e) #most likely buffer underfill
00135 
00136 
00137   def serialize_numpy(self, buff, numpy):
00138     """
00139     serialize message with numpy array types into buffer
00140     :param buff: buffer, ``StringIO``
00141     :param numpy: numpy python module
00142     """
00143     try:
00144       _x = self.value.name
00145       length = len(_x)
00146       if python3 or type(_x) == unicode:
00147         _x = _x.encode('utf-8')
00148         length = len(_x)
00149       buff.write(struct.pack('<I%ss'%length, length, _x))
00150       _x = self
00151       buff.write(_struct_2I2h.pack(_x.value.stamp.secs, _x.value.stamp.nsecs, _x.value.id, _x.value.value))
00152     except struct.error as se: self._check_types(se)
00153     except TypeError as te: self._check_types(te)
00154 
00155   def deserialize_numpy(self, str, numpy):
00156     """
00157     unpack serialized message in str into this message instance using numpy for array types
00158     :param str: byte array of serialized message, ``str``
00159     :param numpy: numpy python module
00160     """
00161     try:
00162       if self.value is None:
00163         self.value = telekyb_msgs.msg.MKValue()
00164       end = 0
00165       start = end
00166       end += 4
00167       (length,) = _struct_I.unpack(str[start:end])
00168       start = end
00169       end += length
00170       if python3:
00171         self.value.name = str[start:end].decode('utf-8')
00172       else:
00173         self.value.name = str[start:end]
00174       _x = self
00175       start = end
00176       end += 12
00177       (_x.value.stamp.secs, _x.value.stamp.nsecs, _x.value.id, _x.value.value,) = _struct_2I2h.unpack(str[start:end])
00178       return self
00179     except struct.error as e:
00180       raise genpy.DeserializationError(e) #most likely buffer underfill
00181 
00182 _struct_I = genpy.struct_I
00183 _struct_2I2h = struct.Struct("<2I2h")
00184 """autogenerated by genpy from telekyb_srvs/MKValueInputOutputResponse.msg. Do not edit."""
00185 import sys
00186 python3 = True if sys.hexversion > 0x03000000 else False
00187 import genpy
00188 import struct
00189 
00190 import genpy
00191 import telekyb_msgs.msg
00192 
00193 class MKValueInputOutputResponse(genpy.Message):
00194   _md5sum = "e33a1633b9933342278c1173610d67b3"
00195   _type = "telekyb_srvs/MKValueInputOutputResponse"
00196   _has_header = False #flag to mark the presence of a Header object
00197   _full_text = """telekyb_msgs/MKValue value
00198 
00199 
00200 ================================================================================
00201 MSG: telekyb_msgs/MKValue
00202 #
00203 # Copyright 2011  Antonio Franchi and Martin Riedel    
00204 #
00205 # This file is part of TeleKyb.
00206 #
00207 # TeleKyb is free software: you can redistribute it and/or modify
00208 # it under the terms of the GNU General Public License as published by
00209 # the Free Software Foundation, either version 3 of the License, or
00210 # (at your option) any later version.
00211 #
00212 # TeleKyb is distributed in the hope that it will be useful,
00213 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00214 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00215 # GNU General Public License for more details.
00216 #
00217 # You should have received a copy of the GNU General Public License
00218 # along with TeleKyb. If not, see <http://www.gnu.org/licenses/>.
00219 
00220 string name
00221 time stamp
00222 int16 id
00223 int16 value
00224 
00225 #
00226 #
00227 """
00228   __slots__ = ['value']
00229   _slot_types = ['telekyb_msgs/MKValue']
00230 
00231   def __init__(self, *args, **kwds):
00232     """
00233     Constructor. Any message fields that are implicitly/explicitly
00234     set to None will be assigned a default value. The recommend
00235     use is keyword arguments as this is more robust to future message
00236     changes.  You cannot mix in-order arguments and keyword arguments.
00237 
00238     The available fields are:
00239        value
00240 
00241     :param args: complete set of field values, in .msg order
00242     :param kwds: use keyword arguments corresponding to message field names
00243     to set specific fields.
00244     """
00245     if args or kwds:
00246       super(MKValueInputOutputResponse, self).__init__(*args, **kwds)
00247       #message fields cannot be None, assign default values for those that are
00248       if self.value is None:
00249         self.value = telekyb_msgs.msg.MKValue()
00250     else:
00251       self.value = telekyb_msgs.msg.MKValue()
00252 
00253   def _get_types(self):
00254     """
00255     internal API method
00256     """
00257     return self._slot_types
00258 
00259   def serialize(self, buff):
00260     """
00261     serialize message into buffer
00262     :param buff: buffer, ``StringIO``
00263     """
00264     try:
00265       _x = self.value.name
00266       length = len(_x)
00267       if python3 or type(_x) == unicode:
00268         _x = _x.encode('utf-8')
00269         length = len(_x)
00270       buff.write(struct.pack('<I%ss'%length, length, _x))
00271       _x = self
00272       buff.write(_struct_2I2h.pack(_x.value.stamp.secs, _x.value.stamp.nsecs, _x.value.id, _x.value.value))
00273     except struct.error as se: self._check_types(se)
00274     except TypeError as te: self._check_types(te)
00275 
00276   def deserialize(self, str):
00277     """
00278     unpack serialized message in str into this message instance
00279     :param str: byte array of serialized message, ``str``
00280     """
00281     try:
00282       if self.value is None:
00283         self.value = telekyb_msgs.msg.MKValue()
00284       end = 0
00285       start = end
00286       end += 4
00287       (length,) = _struct_I.unpack(str[start:end])
00288       start = end
00289       end += length
00290       if python3:
00291         self.value.name = str[start:end].decode('utf-8')
00292       else:
00293         self.value.name = str[start:end]
00294       _x = self
00295       start = end
00296       end += 12
00297       (_x.value.stamp.secs, _x.value.stamp.nsecs, _x.value.id, _x.value.value,) = _struct_2I2h.unpack(str[start:end])
00298       return self
00299     except struct.error as e:
00300       raise genpy.DeserializationError(e) #most likely buffer underfill
00301 
00302 
00303   def serialize_numpy(self, buff, numpy):
00304     """
00305     serialize message with numpy array types into buffer
00306     :param buff: buffer, ``StringIO``
00307     :param numpy: numpy python module
00308     """
00309     try:
00310       _x = self.value.name
00311       length = len(_x)
00312       if python3 or type(_x) == unicode:
00313         _x = _x.encode('utf-8')
00314         length = len(_x)
00315       buff.write(struct.pack('<I%ss'%length, length, _x))
00316       _x = self
00317       buff.write(_struct_2I2h.pack(_x.value.stamp.secs, _x.value.stamp.nsecs, _x.value.id, _x.value.value))
00318     except struct.error as se: self._check_types(se)
00319     except TypeError as te: self._check_types(te)
00320 
00321   def deserialize_numpy(self, str, numpy):
00322     """
00323     unpack serialized message in str into this message instance using numpy for array types
00324     :param str: byte array of serialized message, ``str``
00325     :param numpy: numpy python module
00326     """
00327     try:
00328       if self.value is None:
00329         self.value = telekyb_msgs.msg.MKValue()
00330       end = 0
00331       start = end
00332       end += 4
00333       (length,) = _struct_I.unpack(str[start:end])
00334       start = end
00335       end += length
00336       if python3:
00337         self.value.name = str[start:end].decode('utf-8')
00338       else:
00339         self.value.name = str[start:end]
00340       _x = self
00341       start = end
00342       end += 12
00343       (_x.value.stamp.secs, _x.value.stamp.nsecs, _x.value.id, _x.value.value,) = _struct_2I2h.unpack(str[start:end])
00344       return self
00345     except struct.error as e:
00346       raise genpy.DeserializationError(e) #most likely buffer underfill
00347 
00348 _struct_I = genpy.struct_I
00349 _struct_2I2h = struct.Struct("<2I2h")
00350 class MKValueInputOutput(object):
00351   _type          = 'telekyb_srvs/MKValueInputOutput'
00352   _md5sum = 'dfd0eecae4dc79ca5e21ac87b83858b6'
00353   _request_class  = MKValueInputOutputRequest
00354   _response_class = MKValueInputOutputResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


telekyb_srvs
Author(s): Dr. Antonio Franchi and Martin Riedel
autogenerated on Mon Nov 11 2013 11:12:21