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