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