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