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