$search
00001 """autogenerated by genmsg_py from AidEPH.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class AidEPH(roslib.message.Message): 00007 _md5sum = "796d86b27ebfe497b3a42695f2e69e13" 00008 _type = "ublox_msgs/AidEPH" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# AID-EPH (0x0B 0x31) 00011 # GPS Aiding Ephemeris Input/Output Message 00012 # 00013 # This message is provided considered obsolete, please use AID-EPH instead! 00014 # - SF1D0 to SF3D7 is only sent if ephemeris is available for this SV. If not, the payload may 00015 # be reduced to 8 Bytes, or all bytes are set to zero, indicating that this SV Number does 00016 # not have valid ephemeris for the moment. This may happen even if NAV-SVINFO and 00017 # RXM-SVSI are indicating ephemeris availability as the internal data may not represent the 00018 # content of an original broadcast ephemeris (or only parts thereof). 00019 # - SF1D0 to SF3D7 contain the 24 words following the Hand-Over Word ( HOW ) from the 00020 # GPS navigation message, subframes 1 to 3. The Truncated TOW Count is not valid and 00021 # cannot be used. See IS-GPS-200 for a full description of the contents of the Subframes. 00022 # - In SF1D0 to SF3D7, the parity bits have been removed, and the 24 bits of data are 00023 # located in Bits 0 to 23. Bits 24 to 31 shall be ignored. 00024 # - When polled, the data contained in this message does not represent the full original 00025 # ephemeris broadcast. Some fields that are irrelevant to u-blox receivers may be missing. 00026 # The week number in Subframe 1 has already been modified to match the Time Of 00027 # Ephemeris (TOE). 00028 00029 uint8 CLASS_ID = 11 00030 uint8 MESSAGE_ID = 49 00031 00032 uint32 svid # SV ID for which this ephemeris data is (Valid Range: 1 .. 32). 00033 uint32 how # Hand-Over Word of first Subframe. This is 00034 # required if data is sent to the receiver. 00035 # 0 indicates that no Ephemeris Data is following. 00036 00037 # Start of optional block 00038 uint32[] sf1d # Subframe 1 Words 3..10 (SF1D0..SF1D7) 00039 uint32[] sf2d # Subframe 2 Words 3..10 (SF2D0..SF2D7) 00040 uint32[] sf3d # Subframe 3 Words 3..10 (SF3D0..SF3D7) 00041 # End of optional block 00042 00043 """ 00044 # Pseudo-constants 00045 CLASS_ID = 11 00046 MESSAGE_ID = 49 00047 00048 __slots__ = ['svid','how','sf1d','sf2d','sf3d'] 00049 _slot_types = ['uint32','uint32','uint32[]','uint32[]','uint32[]'] 00050 00051 def __init__(self, *args, **kwds): 00052 """ 00053 Constructor. Any message fields that are implicitly/explicitly 00054 set to None will be assigned a default value. The recommend 00055 use is keyword arguments as this is more robust to future message 00056 changes. You cannot mix in-order arguments and keyword arguments. 00057 00058 The available fields are: 00059 svid,how,sf1d,sf2d,sf3d 00060 00061 @param args: complete set of field values, in .msg order 00062 @param kwds: use keyword arguments corresponding to message field names 00063 to set specific fields. 00064 """ 00065 if args or kwds: 00066 super(AidEPH, self).__init__(*args, **kwds) 00067 #message fields cannot be None, assign default values for those that are 00068 if self.svid is None: 00069 self.svid = 0 00070 if self.how is None: 00071 self.how = 0 00072 if self.sf1d is None: 00073 self.sf1d = [] 00074 if self.sf2d is None: 00075 self.sf2d = [] 00076 if self.sf3d is None: 00077 self.sf3d = [] 00078 else: 00079 self.svid = 0 00080 self.how = 0 00081 self.sf1d = [] 00082 self.sf2d = [] 00083 self.sf3d = [] 00084 00085 def _get_types(self): 00086 """ 00087 internal API method 00088 """ 00089 return self._slot_types 00090 00091 def serialize(self, buff): 00092 """ 00093 serialize message into buffer 00094 @param buff: buffer 00095 @type buff: StringIO 00096 """ 00097 try: 00098 _x = self 00099 buff.write(_struct_2I.pack(_x.svid, _x.how)) 00100 length = len(self.sf1d) 00101 buff.write(_struct_I.pack(length)) 00102 pattern = '<%sI'%length 00103 buff.write(struct.pack(pattern, *self.sf1d)) 00104 length = len(self.sf2d) 00105 buff.write(_struct_I.pack(length)) 00106 pattern = '<%sI'%length 00107 buff.write(struct.pack(pattern, *self.sf2d)) 00108 length = len(self.sf3d) 00109 buff.write(_struct_I.pack(length)) 00110 pattern = '<%sI'%length 00111 buff.write(struct.pack(pattern, *self.sf3d)) 00112 except struct.error as se: self._check_types(se) 00113 except TypeError as te: self._check_types(te) 00114 00115 def deserialize(self, str): 00116 """ 00117 unpack serialized message in str into this message instance 00118 @param str: byte array of serialized message 00119 @type str: str 00120 """ 00121 try: 00122 end = 0 00123 _x = self 00124 start = end 00125 end += 8 00126 (_x.svid, _x.how,) = _struct_2I.unpack(str[start:end]) 00127 start = end 00128 end += 4 00129 (length,) = _struct_I.unpack(str[start:end]) 00130 pattern = '<%sI'%length 00131 start = end 00132 end += struct.calcsize(pattern) 00133 self.sf1d = struct.unpack(pattern, str[start:end]) 00134 start = end 00135 end += 4 00136 (length,) = _struct_I.unpack(str[start:end]) 00137 pattern = '<%sI'%length 00138 start = end 00139 end += struct.calcsize(pattern) 00140 self.sf2d = struct.unpack(pattern, str[start:end]) 00141 start = end 00142 end += 4 00143 (length,) = _struct_I.unpack(str[start:end]) 00144 pattern = '<%sI'%length 00145 start = end 00146 end += struct.calcsize(pattern) 00147 self.sf3d = struct.unpack(pattern, str[start:end]) 00148 return self 00149 except struct.error as e: 00150 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00151 00152 00153 def serialize_numpy(self, buff, numpy): 00154 """ 00155 serialize message with numpy array types into buffer 00156 @param buff: buffer 00157 @type buff: StringIO 00158 @param numpy: numpy python module 00159 @type numpy module 00160 """ 00161 try: 00162 _x = self 00163 buff.write(_struct_2I.pack(_x.svid, _x.how)) 00164 length = len(self.sf1d) 00165 buff.write(_struct_I.pack(length)) 00166 pattern = '<%sI'%length 00167 buff.write(self.sf1d.tostring()) 00168 length = len(self.sf2d) 00169 buff.write(_struct_I.pack(length)) 00170 pattern = '<%sI'%length 00171 buff.write(self.sf2d.tostring()) 00172 length = len(self.sf3d) 00173 buff.write(_struct_I.pack(length)) 00174 pattern = '<%sI'%length 00175 buff.write(self.sf3d.tostring()) 00176 except struct.error as se: self._check_types(se) 00177 except TypeError as te: self._check_types(te) 00178 00179 def deserialize_numpy(self, str, numpy): 00180 """ 00181 unpack serialized message in str into this message instance using numpy for array types 00182 @param str: byte array of serialized message 00183 @type str: str 00184 @param numpy: numpy python module 00185 @type numpy: module 00186 """ 00187 try: 00188 end = 0 00189 _x = self 00190 start = end 00191 end += 8 00192 (_x.svid, _x.how,) = _struct_2I.unpack(str[start:end]) 00193 start = end 00194 end += 4 00195 (length,) = _struct_I.unpack(str[start:end]) 00196 pattern = '<%sI'%length 00197 start = end 00198 end += struct.calcsize(pattern) 00199 self.sf1d = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=length) 00200 start = end 00201 end += 4 00202 (length,) = _struct_I.unpack(str[start:end]) 00203 pattern = '<%sI'%length 00204 start = end 00205 end += struct.calcsize(pattern) 00206 self.sf2d = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=length) 00207 start = end 00208 end += 4 00209 (length,) = _struct_I.unpack(str[start:end]) 00210 pattern = '<%sI'%length 00211 start = end 00212 end += struct.calcsize(pattern) 00213 self.sf3d = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=length) 00214 return self 00215 except struct.error as e: 00216 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00217 00218 _struct_I = roslib.message.struct_I 00219 _struct_2I = struct.Struct("<2I")