_IINSolutionStatus.py
Go to the documentation of this file.
00001 """autogenerated by genpy from applanix_msgs/IINSolutionStatus.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import applanix_msgs.msg
00008 
00009 class IINSolutionStatus(genpy.Message):
00010   _md5sum = "421e809231149ab046729933cacbd490"
00011   _type = "applanix_msgs/IINSolutionStatus"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """# Group 20
00014 TimeDistance td
00015 
00016 uint16 num_satellites
00017 float32 a_priori_pdop
00018 float32 baseline_length
00019 
00020 uint16 STATUS_FIXED_NARROW_LANE_RTK=1
00021 uint16 STATUS_FIXED_WIDE_LANE_RTK=2
00022 uint16 STATUS_FLOAT_RTK=3
00023 uint16 STATUS_CODE_DGPS=4
00024 uint16 STATUS_RTCM_DGPS=5
00025 uint16 STATUS_AUTONOMOUS_CA=6
00026 uint16 STATUS_GNSS_NAV_SOLUTION=7
00027 uint16 STATUS_NO_SOLUTION=8
00028 uint16 status
00029 
00030 uint8[12] prn_assignment
00031 
00032 uint16 l1_cycle_slip_flag 
00033 uint16 l2_cycle_slip_flag 
00034 
00035 ================================================================================
00036 MSG: applanix_msgs/TimeDistance
00037 float64 time1
00038 float64 time2
00039 float64 distance
00040 uint8 time_types
00041 uint8 distance_type
00042 
00043 """
00044   # Pseudo-constants
00045   STATUS_FIXED_NARROW_LANE_RTK = 1
00046   STATUS_FIXED_WIDE_LANE_RTK = 2
00047   STATUS_FLOAT_RTK = 3
00048   STATUS_CODE_DGPS = 4
00049   STATUS_RTCM_DGPS = 5
00050   STATUS_AUTONOMOUS_CA = 6
00051   STATUS_GNSS_NAV_SOLUTION = 7
00052   STATUS_NO_SOLUTION = 8
00053 
00054   __slots__ = ['td','num_satellites','a_priori_pdop','baseline_length','status','prn_assignment','l1_cycle_slip_flag','l2_cycle_slip_flag']
00055   _slot_types = ['applanix_msgs/TimeDistance','uint16','float32','float32','uint16','uint8[12]','uint16','uint16']
00056 
00057   def __init__(self, *args, **kwds):
00058     """
00059     Constructor. Any message fields that are implicitly/explicitly
00060     set to None will be assigned a default value. The recommend
00061     use is keyword arguments as this is more robust to future message
00062     changes.  You cannot mix in-order arguments and keyword arguments.
00063 
00064     The available fields are:
00065        td,num_satellites,a_priori_pdop,baseline_length,status,prn_assignment,l1_cycle_slip_flag,l2_cycle_slip_flag
00066 
00067     :param args: complete set of field values, in .msg order
00068     :param kwds: use keyword arguments corresponding to message field names
00069     to set specific fields.
00070     """
00071     if args or kwds:
00072       super(IINSolutionStatus, self).__init__(*args, **kwds)
00073       #message fields cannot be None, assign default values for those that are
00074       if self.td is None:
00075         self.td = applanix_msgs.msg.TimeDistance()
00076       if self.num_satellites is None:
00077         self.num_satellites = 0
00078       if self.a_priori_pdop is None:
00079         self.a_priori_pdop = 0.
00080       if self.baseline_length is None:
00081         self.baseline_length = 0.
00082       if self.status is None:
00083         self.status = 0
00084       if self.prn_assignment is None:
00085         self.prn_assignment = chr(0)*12
00086       if self.l1_cycle_slip_flag is None:
00087         self.l1_cycle_slip_flag = 0
00088       if self.l2_cycle_slip_flag is None:
00089         self.l2_cycle_slip_flag = 0
00090     else:
00091       self.td = applanix_msgs.msg.TimeDistance()
00092       self.num_satellites = 0
00093       self.a_priori_pdop = 0.
00094       self.baseline_length = 0.
00095       self.status = 0
00096       self.prn_assignment = chr(0)*12
00097       self.l1_cycle_slip_flag = 0
00098       self.l2_cycle_slip_flag = 0
00099 
00100   def _get_types(self):
00101     """
00102     internal API method
00103     """
00104     return self._slot_types
00105 
00106   def serialize(self, buff):
00107     """
00108     serialize message into buffer
00109     :param buff: buffer, ``StringIO``
00110     """
00111     try:
00112       _x = self
00113       buff.write(_struct_3d2BH2fH.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.num_satellites, _x.a_priori_pdop, _x.baseline_length, _x.status))
00114       _x = self.prn_assignment
00115       # - if encoded as a list instead, serialize as bytes instead of string
00116       if type(_x) in [list, tuple]:
00117         buff.write(_struct_12B.pack(*_x))
00118       else:
00119         buff.write(_struct_12s.pack(_x))
00120       _x = self
00121       buff.write(_struct_2H.pack(_x.l1_cycle_slip_flag, _x.l2_cycle_slip_flag))
00122     except struct.error as se: self._check_types(se)
00123     except TypeError as te: self._check_types(te)
00124 
00125   def deserialize(self, str):
00126     """
00127     unpack serialized message in str into this message instance
00128     :param str: byte array of serialized message, ``str``
00129     """
00130     try:
00131       if self.td is None:
00132         self.td = applanix_msgs.msg.TimeDistance()
00133       end = 0
00134       _x = self
00135       start = end
00136       end += 38
00137       (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.num_satellites, _x.a_priori_pdop, _x.baseline_length, _x.status,) = _struct_3d2BH2fH.unpack(str[start:end])
00138       start = end
00139       end += 12
00140       self.prn_assignment = str[start:end]
00141       _x = self
00142       start = end
00143       end += 4
00144       (_x.l1_cycle_slip_flag, _x.l2_cycle_slip_flag,) = _struct_2H.unpack(str[start:end])
00145       return self
00146     except struct.error as e:
00147       raise genpy.DeserializationError(e) #most likely buffer underfill
00148 
00149 
00150   def serialize_numpy(self, buff, numpy):
00151     """
00152     serialize message with numpy array types into buffer
00153     :param buff: buffer, ``StringIO``
00154     :param numpy: numpy python module
00155     """
00156     try:
00157       _x = self
00158       buff.write(_struct_3d2BH2fH.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.num_satellites, _x.a_priori_pdop, _x.baseline_length, _x.status))
00159       _x = self.prn_assignment
00160       # - if encoded as a list instead, serialize as bytes instead of string
00161       if type(_x) in [list, tuple]:
00162         buff.write(_struct_12B.pack(*_x))
00163       else:
00164         buff.write(_struct_12s.pack(_x))
00165       _x = self
00166       buff.write(_struct_2H.pack(_x.l1_cycle_slip_flag, _x.l2_cycle_slip_flag))
00167     except struct.error as se: self._check_types(se)
00168     except TypeError as te: self._check_types(te)
00169 
00170   def deserialize_numpy(self, str, numpy):
00171     """
00172     unpack serialized message in str into this message instance using numpy for array types
00173     :param str: byte array of serialized message, ``str``
00174     :param numpy: numpy python module
00175     """
00176     try:
00177       if self.td is None:
00178         self.td = applanix_msgs.msg.TimeDistance()
00179       end = 0
00180       _x = self
00181       start = end
00182       end += 38
00183       (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.num_satellites, _x.a_priori_pdop, _x.baseline_length, _x.status,) = _struct_3d2BH2fH.unpack(str[start:end])
00184       start = end
00185       end += 12
00186       self.prn_assignment = str[start:end]
00187       _x = self
00188       start = end
00189       end += 4
00190       (_x.l1_cycle_slip_flag, _x.l2_cycle_slip_flag,) = _struct_2H.unpack(str[start:end])
00191       return self
00192     except struct.error as e:
00193       raise genpy.DeserializationError(e) #most likely buffer underfill
00194 
00195 _struct_I = genpy.struct_I
00196 _struct_3d2BH2fH = struct.Struct("<3d2BH2fH")
00197 _struct_12B = struct.Struct("<12B")
00198 _struct_12s = struct.Struct("<12s")
00199 _struct_2H = struct.Struct("<2H")


applanix_msgs
Author(s): Mike Purvis
autogenerated on Thu Jan 2 2014 11:04:51