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