00001 """autogenerated by genmsg_py from TransitiveMsg2.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import test_ros.msg
00006
00007 class TransitiveMsg2(roslib.message.Message):
00008 _md5sum = "eb1fa3c8b51b0e31f74e89c2eecc441e"
00009 _type = "test_rospy/TransitiveMsg2"
00010 _has_header = False
00011 _full_text = """test_ros/Composite data
00012
00013 ================================================================================
00014 MSG: test_ros/Composite
00015 # composite message. required for testing import calculation in generators
00016 CompositeA a
00017 CompositeB b
00018
00019 ================================================================================
00020 MSG: test_ros/CompositeA
00021 # This represents an orientation in free space in quaternion form.
00022
00023 float64 x
00024 float64 y
00025 float64 z
00026 float64 w
00027
00028 ================================================================================
00029 MSG: test_ros/CompositeB
00030 # copy of geometry_msgs/Point for testing
00031 float64 x
00032 float64 y
00033 float64 z
00034
00035 """
00036 __slots__ = ['data']
00037 _slot_types = ['test_ros/Composite']
00038
00039 def __init__(self, *args, **kwds):
00040 """
00041 Constructor. Any message fields that are implicitly/explicitly
00042 set to None will be assigned a default value. The recommend
00043 use is keyword arguments as this is more robust to future message
00044 changes. You cannot mix in-order arguments and keyword arguments.
00045
00046 The available fields are:
00047 data
00048
00049 @param args: complete set of field values, in .msg order
00050 @param kwds: use keyword arguments corresponding to message field names
00051 to set specific fields.
00052 """
00053 if args or kwds:
00054 super(TransitiveMsg2, self).__init__(*args, **kwds)
00055
00056 if self.data is None:
00057 self.data = test_ros.msg.Composite()
00058 else:
00059 self.data = test_ros.msg.Composite()
00060
00061 def _get_types(self):
00062 """
00063 internal API method
00064 """
00065 return self._slot_types
00066
00067 def serialize(self, buff):
00068 """
00069 serialize message into buffer
00070 @param buff: buffer
00071 @type buff: StringIO
00072 """
00073 try:
00074 _x = self
00075 buff.write(_struct_7d.pack(_x.data.a.x, _x.data.a.y, _x.data.a.z, _x.data.a.w, _x.data.b.x, _x.data.b.y, _x.data.b.z))
00076 except struct.error, se: self._check_types(se)
00077 except TypeError, te: self._check_types(te)
00078
00079 def deserialize(self, str):
00080 """
00081 unpack serialized message in str into this message instance
00082 @param str: byte array of serialized message
00083 @type str: str
00084 """
00085 try:
00086 if self.data is None:
00087 self.data = test_ros.msg.Composite()
00088 end = 0
00089 _x = self
00090 start = end
00091 end += 56
00092 (_x.data.a.x, _x.data.a.y, _x.data.a.z, _x.data.a.w, _x.data.b.x, _x.data.b.y, _x.data.b.z,) = _struct_7d.unpack(str[start:end])
00093 return self
00094 except struct.error, e:
00095 raise roslib.message.DeserializationError(e)
00096
00097
00098 def serialize_numpy(self, buff, numpy):
00099 """
00100 serialize message with numpy array types into buffer
00101 @param buff: buffer
00102 @type buff: StringIO
00103 @param numpy: numpy python module
00104 @type numpy module
00105 """
00106 try:
00107 _x = self
00108 buff.write(_struct_7d.pack(_x.data.a.x, _x.data.a.y, _x.data.a.z, _x.data.a.w, _x.data.b.x, _x.data.b.y, _x.data.b.z))
00109 except struct.error, se: self._check_types(se)
00110 except TypeError, te: self._check_types(te)
00111
00112 def deserialize_numpy(self, str, numpy):
00113 """
00114 unpack serialized message in str into this message instance using numpy for array types
00115 @param str: byte array of serialized message
00116 @type str: str
00117 @param numpy: numpy python module
00118 @type numpy: module
00119 """
00120 try:
00121 if self.data is None:
00122 self.data = test_ros.msg.Composite()
00123 end = 0
00124 _x = self
00125 start = end
00126 end += 56
00127 (_x.data.a.x, _x.data.a.y, _x.data.a.z, _x.data.a.w, _x.data.b.x, _x.data.b.y, _x.data.b.z,) = _struct_7d.unpack(str[start:end])
00128 return self
00129 except struct.error, e:
00130 raise roslib.message.DeserializationError(e)
00131
00132 _struct_I = roslib.message.struct_I
00133 _struct_7d = struct.Struct("<7d")