$search
00001 """autogenerated by genmsg_py from UserTimeStatus.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import applanix_msgs.msg 00006 00007 class UserTimeStatus(roslib.message.Message): 00008 _md5sum = "3d0128542d920da1a88ece6cf34151c4" 00009 _type = "applanix_msgs/UserTimeStatus" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """# Group 17 00012 TimeDistance td 00013 00014 uint32 time_synch_rejections 00015 uint32 user_time_resynchs 00016 00017 uint8 user_time_valid 00018 uint8 time_synch_message_received 00019 00020 ================================================================================ 00021 MSG: applanix_msgs/TimeDistance 00022 float64 time1 00023 float64 time2 00024 float64 distance 00025 uint8 time_types 00026 uint8 distance_type 00027 00028 """ 00029 __slots__ = ['td','time_synch_rejections','user_time_resynchs','user_time_valid','time_synch_message_received'] 00030 _slot_types = ['applanix_msgs/TimeDistance','uint32','uint32','uint8','uint8'] 00031 00032 def __init__(self, *args, **kwds): 00033 """ 00034 Constructor. Any message fields that are implicitly/explicitly 00035 set to None will be assigned a default value. The recommend 00036 use is keyword arguments as this is more robust to future message 00037 changes. You cannot mix in-order arguments and keyword arguments. 00038 00039 The available fields are: 00040 td,time_synch_rejections,user_time_resynchs,user_time_valid,time_synch_message_received 00041 00042 @param args: complete set of field values, in .msg order 00043 @param kwds: use keyword arguments corresponding to message field names 00044 to set specific fields. 00045 """ 00046 if args or kwds: 00047 super(UserTimeStatus, self).__init__(*args, **kwds) 00048 #message fields cannot be None, assign default values for those that are 00049 if self.td is None: 00050 self.td = applanix_msgs.msg.TimeDistance() 00051 if self.time_synch_rejections is None: 00052 self.time_synch_rejections = 0 00053 if self.user_time_resynchs is None: 00054 self.user_time_resynchs = 0 00055 if self.user_time_valid is None: 00056 self.user_time_valid = 0 00057 if self.time_synch_message_received is None: 00058 self.time_synch_message_received = 0 00059 else: 00060 self.td = applanix_msgs.msg.TimeDistance() 00061 self.time_synch_rejections = 0 00062 self.user_time_resynchs = 0 00063 self.user_time_valid = 0 00064 self.time_synch_message_received = 0 00065 00066 def _get_types(self): 00067 """ 00068 internal API method 00069 """ 00070 return self._slot_types 00071 00072 def serialize(self, buff): 00073 """ 00074 serialize message into buffer 00075 @param buff: buffer 00076 @type buff: StringIO 00077 """ 00078 try: 00079 _x = self 00080 buff.write(_struct_3d2B2I2B.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.time_synch_rejections, _x.user_time_resynchs, _x.user_time_valid, _x.time_synch_message_received)) 00081 except struct.error as se: self._check_types(se) 00082 except TypeError as te: self._check_types(te) 00083 00084 def deserialize(self, str): 00085 """ 00086 unpack serialized message in str into this message instance 00087 @param str: byte array of serialized message 00088 @type str: str 00089 """ 00090 try: 00091 if self.td is None: 00092 self.td = applanix_msgs.msg.TimeDistance() 00093 end = 0 00094 _x = self 00095 start = end 00096 end += 36 00097 (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.time_synch_rejections, _x.user_time_resynchs, _x.user_time_valid, _x.time_synch_message_received,) = _struct_3d2B2I2B.unpack(str[start:end]) 00098 return self 00099 except struct.error as e: 00100 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00101 00102 00103 def serialize_numpy(self, buff, numpy): 00104 """ 00105 serialize message with numpy array types into buffer 00106 @param buff: buffer 00107 @type buff: StringIO 00108 @param numpy: numpy python module 00109 @type numpy module 00110 """ 00111 try: 00112 _x = self 00113 buff.write(_struct_3d2B2I2B.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.time_synch_rejections, _x.user_time_resynchs, _x.user_time_valid, _x.time_synch_message_received)) 00114 except struct.error as se: self._check_types(se) 00115 except TypeError as te: self._check_types(te) 00116 00117 def deserialize_numpy(self, str, numpy): 00118 """ 00119 unpack serialized message in str into this message instance using numpy for array types 00120 @param str: byte array of serialized message 00121 @type str: str 00122 @param numpy: numpy python module 00123 @type numpy: module 00124 """ 00125 try: 00126 if self.td is None: 00127 self.td = applanix_msgs.msg.TimeDistance() 00128 end = 0 00129 _x = self 00130 start = end 00131 end += 36 00132 (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.time_synch_rejections, _x.user_time_resynchs, _x.user_time_valid, _x.time_synch_message_received,) = _struct_3d2B2I2B.unpack(str[start:end]) 00133 return self 00134 except struct.error as e: 00135 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00136 00137 _struct_I = roslib.message.struct_I 00138 _struct_3d2B2I2B = struct.Struct("<3d2B2I2B")