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