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