00001 """autogenerated by genmsg_py from TestRequestResult.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class TestRequestResult(roslib.message.Message):
00007 _md5sum = "61c2364524499c7c5017e2f3fce7ba06"
00008 _type = "actionlib/TestRequestResult"
00009 _has_header = False
00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00011 int32 the_result
00012 bool is_simple_server
00013
00014 """
00015 __slots__ = ['the_result','is_simple_server']
00016 _slot_types = ['int32','bool']
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 the_result,is_simple_server
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(TestRequestResult, self).__init__(*args, **kwds)
00034
00035 if self.the_result is None:
00036 self.the_result = 0
00037 if self.is_simple_server is None:
00038 self.is_simple_server = False
00039 else:
00040 self.the_result = 0
00041 self.is_simple_server = False
00042
00043 def _get_types(self):
00044 """
00045 internal API method
00046 """
00047 return self._slot_types
00048
00049 def serialize(self, buff):
00050 """
00051 serialize message into buffer
00052 @param buff: buffer
00053 @type buff: StringIO
00054 """
00055 try:
00056 _x = self
00057 buff.write(_struct_iB.pack(_x.the_result, _x.is_simple_server))
00058 except struct.error, se: self._check_types(se)
00059 except TypeError, te: self._check_types(te)
00060
00061 def deserialize(self, str):
00062 """
00063 unpack serialized message in str into this message instance
00064 @param str: byte array of serialized message
00065 @type str: str
00066 """
00067 try:
00068 end = 0
00069 _x = self
00070 start = end
00071 end += 5
00072 (_x.the_result, _x.is_simple_server,) = _struct_iB.unpack(str[start:end])
00073 self.is_simple_server = bool(self.is_simple_server)
00074 return self
00075 except struct.error, e:
00076 raise roslib.message.DeserializationError(e)
00077
00078
00079 def serialize_numpy(self, buff, numpy):
00080 """
00081 serialize message with numpy array types into buffer
00082 @param buff: buffer
00083 @type buff: StringIO
00084 @param numpy: numpy python module
00085 @type numpy module
00086 """
00087 try:
00088 _x = self
00089 buff.write(_struct_iB.pack(_x.the_result, _x.is_simple_server))
00090 except struct.error, se: self._check_types(se)
00091 except TypeError, te: self._check_types(te)
00092
00093 def deserialize_numpy(self, str, numpy):
00094 """
00095 unpack serialized message in str into this message instance using numpy for array types
00096 @param str: byte array of serialized message
00097 @type str: str
00098 @param numpy: numpy python module
00099 @type numpy: module
00100 """
00101 try:
00102 end = 0
00103 _x = self
00104 start = end
00105 end += 5
00106 (_x.the_result, _x.is_simple_server,) = _struct_iB.unpack(str[start:end])
00107 self.is_simple_server = bool(self.is_simple_server)
00108 return self
00109 except struct.error, e:
00110 raise roslib.message.DeserializationError(e)
00111
00112 _struct_I = roslib.message.struct_I
00113 _struct_iB = struct.Struct("<iB")