$search
00001 """autogenerated by genmsg_py from IntegrationDiagnosticsControl.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class IntegrationDiagnosticsControl(roslib.message.Message): 00007 _md5sum = "c9348736c3ef1fae7afe188eacd6d167" 00008 _type = "applanix_msgs/IntegrationDiagnosticsControl" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# Msg 92 00011 uint16 transaction 00012 00013 uint8 OUTPUT_IMU_FRAME=0 00014 uint8 OUTPUT_USER_PARAM=1 00015 uint8 output_data 00016 00017 float32 user_roll 00018 float32 user_pitch 00019 float32 user_heading 00020 uint8[4] reserved 00021 00022 """ 00023 # Pseudo-constants 00024 OUTPUT_IMU_FRAME = 0 00025 OUTPUT_USER_PARAM = 1 00026 00027 __slots__ = ['transaction','output_data','user_roll','user_pitch','user_heading','reserved'] 00028 _slot_types = ['uint16','uint8','float32','float32','float32','uint8[4]'] 00029 00030 def __init__(self, *args, **kwds): 00031 """ 00032 Constructor. Any message fields that are implicitly/explicitly 00033 set to None will be assigned a default value. The recommend 00034 use is keyword arguments as this is more robust to future message 00035 changes. You cannot mix in-order arguments and keyword arguments. 00036 00037 The available fields are: 00038 transaction,output_data,user_roll,user_pitch,user_heading,reserved 00039 00040 @param args: complete set of field values, in .msg order 00041 @param kwds: use keyword arguments corresponding to message field names 00042 to set specific fields. 00043 """ 00044 if args or kwds: 00045 super(IntegrationDiagnosticsControl, self).__init__(*args, **kwds) 00046 #message fields cannot be None, assign default values for those that are 00047 if self.transaction is None: 00048 self.transaction = 0 00049 if self.output_data is None: 00050 self.output_data = 0 00051 if self.user_roll is None: 00052 self.user_roll = 0. 00053 if self.user_pitch is None: 00054 self.user_pitch = 0. 00055 if self.user_heading is None: 00056 self.user_heading = 0. 00057 if self.reserved is None: 00058 self.reserved = chr(0)*4 00059 else: 00060 self.transaction = 0 00061 self.output_data = 0 00062 self.user_roll = 0. 00063 self.user_pitch = 0. 00064 self.user_heading = 0. 00065 self.reserved = chr(0)*4 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_HB3f.pack(_x.transaction, _x.output_data, _x.user_roll, _x.user_pitch, _x.user_heading)) 00082 _x = self.reserved 00083 # - if encoded as a list instead, serialize as bytes instead of string 00084 if type(_x) in [list, tuple]: 00085 buff.write(_struct_4B.pack(*_x)) 00086 else: 00087 buff.write(_struct_4s.pack(_x)) 00088 except struct.error as se: self._check_types(se) 00089 except TypeError as te: self._check_types(te) 00090 00091 def deserialize(self, str): 00092 """ 00093 unpack serialized message in str into this message instance 00094 @param str: byte array of serialized message 00095 @type str: str 00096 """ 00097 try: 00098 end = 0 00099 _x = self 00100 start = end 00101 end += 15 00102 (_x.transaction, _x.output_data, _x.user_roll, _x.user_pitch, _x.user_heading,) = _struct_HB3f.unpack(str[start:end]) 00103 start = end 00104 end += 4 00105 self.reserved = str[start:end] 00106 return self 00107 except struct.error as e: 00108 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00109 00110 00111 def serialize_numpy(self, buff, numpy): 00112 """ 00113 serialize message with numpy array types into buffer 00114 @param buff: buffer 00115 @type buff: StringIO 00116 @param numpy: numpy python module 00117 @type numpy module 00118 """ 00119 try: 00120 _x = self 00121 buff.write(_struct_HB3f.pack(_x.transaction, _x.output_data, _x.user_roll, _x.user_pitch, _x.user_heading)) 00122 _x = self.reserved 00123 # - if encoded as a list instead, serialize as bytes instead of string 00124 if type(_x) in [list, tuple]: 00125 buff.write(_struct_4B.pack(*_x)) 00126 else: 00127 buff.write(_struct_4s.pack(_x)) 00128 except struct.error as se: self._check_types(se) 00129 except TypeError as te: self._check_types(te) 00130 00131 def deserialize_numpy(self, str, numpy): 00132 """ 00133 unpack serialized message in str into this message instance using numpy for array types 00134 @param str: byte array of serialized message 00135 @type str: str 00136 @param numpy: numpy python module 00137 @type numpy: module 00138 """ 00139 try: 00140 end = 0 00141 _x = self 00142 start = end 00143 end += 15 00144 (_x.transaction, _x.output_data, _x.user_roll, _x.user_pitch, _x.user_heading,) = _struct_HB3f.unpack(str[start:end]) 00145 start = end 00146 end += 4 00147 self.reserved = str[start:end] 00148 return self 00149 except struct.error as e: 00150 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00151 00152 _struct_I = roslib.message.struct_I 00153 _struct_4B = struct.Struct("<4B") 00154 _struct_HB3f = struct.Struct("<HB3f") 00155 _struct_4s = struct.Struct("<4s")