$search
00001 """autogenerated by genmsg_py from GNSSDGPSStationDatabase.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import applanix_msgs.msg 00006 00007 class GNSSDGPSStationDatabase(roslib.message.Message): 00008 _md5sum = "c954eb8ef0a53b8f04965106e84e8a92" 00009 _type = "applanix_msgs/GNSSDGPSStationDatabase" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """# Group 26 00012 TimeDistance td 00013 00014 GNSSDGPSStation[] stations 00015 00016 ================================================================================ 00017 MSG: applanix_msgs/TimeDistance 00018 float64 time1 00019 float64 time2 00020 float64 distance 00021 uint8 time_types 00022 uint8 distance_type 00023 00024 ================================================================================ 00025 MSG: applanix_msgs/GNSSDGPSStation 00026 # Part of Group 26 00027 00028 uint8 FLAGS_SATELLITE=1 00029 uint8 FLAGS_STATION_PROVIDING_CORRECTIONS=2 00030 uint8 FLAGS_STATION_USED_AS_RTCM_SOURCE=4 00031 uint8 FLAGS_OMNISTAR_STATIONS=8 00032 uint8 flags 00033 00034 uint16 id 00035 uint16 frequency 00036 00037 uint8 HEALTH_NORMAL=0 00038 uint8 HEALTH_NOT_MONITORED=1 00039 uint8 HEALTH_NO_INFO_AVAILABLE=2 00040 uint8 HEALTH_DO_NOT_USE=3 00041 uint8 health 00042 00043 float32 distance 00044 float32 range 00045 uint8 uscg_index 00046 uint32 seconds 00047 00048 uint8 RATE_25BPS=0 00049 uint8 RATE_50BPS=1 00050 uint8 RATE_100BPS=2 00051 uint8 RATE_200BPS=3 00052 uint8 RATE_600BPS=4 00053 uint8 RATE_1200BPS=5 00054 uint8 RATE_2400BPS=6 00055 uint8 RATE_4800BPS=7 00056 uint8 modulation_rate 00057 00058 """ 00059 __slots__ = ['td','stations'] 00060 _slot_types = ['applanix_msgs/TimeDistance','applanix_msgs/GNSSDGPSStation[]'] 00061 00062 def __init__(self, *args, **kwds): 00063 """ 00064 Constructor. Any message fields that are implicitly/explicitly 00065 set to None will be assigned a default value. The recommend 00066 use is keyword arguments as this is more robust to future message 00067 changes. You cannot mix in-order arguments and keyword arguments. 00068 00069 The available fields are: 00070 td,stations 00071 00072 @param args: complete set of field values, in .msg order 00073 @param kwds: use keyword arguments corresponding to message field names 00074 to set specific fields. 00075 """ 00076 if args or kwds: 00077 super(GNSSDGPSStationDatabase, self).__init__(*args, **kwds) 00078 #message fields cannot be None, assign default values for those that are 00079 if self.td is None: 00080 self.td = applanix_msgs.msg.TimeDistance() 00081 if self.stations is None: 00082 self.stations = [] 00083 else: 00084 self.td = applanix_msgs.msg.TimeDistance() 00085 self.stations = [] 00086 00087 def _get_types(self): 00088 """ 00089 internal API method 00090 """ 00091 return self._slot_types 00092 00093 def serialize(self, buff): 00094 """ 00095 serialize message into buffer 00096 @param buff: buffer 00097 @type buff: StringIO 00098 """ 00099 try: 00100 _x = self 00101 buff.write(_struct_3d2B.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type)) 00102 length = len(self.stations) 00103 buff.write(_struct_I.pack(length)) 00104 for val1 in self.stations: 00105 _x = val1 00106 buff.write(_struct_B2HB2fBIB.pack(_x.flags, _x.id, _x.frequency, _x.health, _x.distance, _x.range, _x.uscg_index, _x.seconds, _x.modulation_rate)) 00107 except struct.error as se: self._check_types(se) 00108 except TypeError as te: self._check_types(te) 00109 00110 def deserialize(self, str): 00111 """ 00112 unpack serialized message in str into this message instance 00113 @param str: byte array of serialized message 00114 @type str: str 00115 """ 00116 try: 00117 if self.td is None: 00118 self.td = applanix_msgs.msg.TimeDistance() 00119 end = 0 00120 _x = self 00121 start = end 00122 end += 26 00123 (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type,) = _struct_3d2B.unpack(str[start:end]) 00124 start = end 00125 end += 4 00126 (length,) = _struct_I.unpack(str[start:end]) 00127 self.stations = [] 00128 for i in range(0, length): 00129 val1 = applanix_msgs.msg.GNSSDGPSStation() 00130 _x = val1 00131 start = end 00132 end += 20 00133 (_x.flags, _x.id, _x.frequency, _x.health, _x.distance, _x.range, _x.uscg_index, _x.seconds, _x.modulation_rate,) = _struct_B2HB2fBIB.unpack(str[start:end]) 00134 self.stations.append(val1) 00135 return self 00136 except struct.error as e: 00137 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00138 00139 00140 def serialize_numpy(self, buff, numpy): 00141 """ 00142 serialize message with numpy array types into buffer 00143 @param buff: buffer 00144 @type buff: StringIO 00145 @param numpy: numpy python module 00146 @type numpy module 00147 """ 00148 try: 00149 _x = self 00150 buff.write(_struct_3d2B.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type)) 00151 length = len(self.stations) 00152 buff.write(_struct_I.pack(length)) 00153 for val1 in self.stations: 00154 _x = val1 00155 buff.write(_struct_B2HB2fBIB.pack(_x.flags, _x.id, _x.frequency, _x.health, _x.distance, _x.range, _x.uscg_index, _x.seconds, _x.modulation_rate)) 00156 except struct.error as se: self._check_types(se) 00157 except TypeError as te: self._check_types(te) 00158 00159 def deserialize_numpy(self, str, numpy): 00160 """ 00161 unpack serialized message in str into this message instance using numpy for array types 00162 @param str: byte array of serialized message 00163 @type str: str 00164 @param numpy: numpy python module 00165 @type numpy: module 00166 """ 00167 try: 00168 if self.td is None: 00169 self.td = applanix_msgs.msg.TimeDistance() 00170 end = 0 00171 _x = self 00172 start = end 00173 end += 26 00174 (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type,) = _struct_3d2B.unpack(str[start:end]) 00175 start = end 00176 end += 4 00177 (length,) = _struct_I.unpack(str[start:end]) 00178 self.stations = [] 00179 for i in range(0, length): 00180 val1 = applanix_msgs.msg.GNSSDGPSStation() 00181 _x = val1 00182 start = end 00183 end += 20 00184 (_x.flags, _x.id, _x.frequency, _x.health, _x.distance, _x.range, _x.uscg_index, _x.seconds, _x.modulation_rate,) = _struct_B2HB2fBIB.unpack(str[start:end]) 00185 self.stations.append(val1) 00186 return self 00187 except struct.error as e: 00188 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00189 00190 _struct_I = roslib.message.struct_I 00191 _struct_B2HB2fBIB = struct.Struct("<B2HB2fBIB") 00192 _struct_3d2B = struct.Struct("<3d2B")