$search
00001 """autogenerated by genmsg_py from NavVELECEF.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class NavVELECEF(roslib.message.Message): 00007 _md5sum = "97299f597364a39a6c0e96ed2ee4e702" 00008 _type = "ublox_msgs/NavVELECEF" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# NAV-VELECEF (0x01 0x11) 00011 # Velocity Solution in ECEF 00012 # 00013 # See important comments concerning validity of velocity given in section 00014 # Navigation Output Filters. 00015 # 00016 00017 uint8 CLASS_ID = 1 00018 uint8 MESSAGE_ID = 17 00019 00020 uint32 iTOW # GPS Millisecond time of week [ms] 00021 00022 int32 ecefVX # ECEF X velocity [cm/s] 00023 int32 ecefVY # ECEF Y velocity [cm/s] 00024 int32 ecefVZ # ECEF Z velocity [cm/s] 00025 uint32 sAcc # Speed Accuracy Estimate [cm/s] 00026 00027 """ 00028 # Pseudo-constants 00029 CLASS_ID = 1 00030 MESSAGE_ID = 17 00031 00032 __slots__ = ['iTOW','ecefVX','ecefVY','ecefVZ','sAcc'] 00033 _slot_types = ['uint32','int32','int32','int32','uint32'] 00034 00035 def __init__(self, *args, **kwds): 00036 """ 00037 Constructor. Any message fields that are implicitly/explicitly 00038 set to None will be assigned a default value. The recommend 00039 use is keyword arguments as this is more robust to future message 00040 changes. You cannot mix in-order arguments and keyword arguments. 00041 00042 The available fields are: 00043 iTOW,ecefVX,ecefVY,ecefVZ,sAcc 00044 00045 @param args: complete set of field values, in .msg order 00046 @param kwds: use keyword arguments corresponding to message field names 00047 to set specific fields. 00048 """ 00049 if args or kwds: 00050 super(NavVELECEF, self).__init__(*args, **kwds) 00051 #message fields cannot be None, assign default values for those that are 00052 if self.iTOW is None: 00053 self.iTOW = 0 00054 if self.ecefVX is None: 00055 self.ecefVX = 0 00056 if self.ecefVY is None: 00057 self.ecefVY = 0 00058 if self.ecefVZ is None: 00059 self.ecefVZ = 0 00060 if self.sAcc is None: 00061 self.sAcc = 0 00062 else: 00063 self.iTOW = 0 00064 self.ecefVX = 0 00065 self.ecefVY = 0 00066 self.ecefVZ = 0 00067 self.sAcc = 0 00068 00069 def _get_types(self): 00070 """ 00071 internal API method 00072 """ 00073 return self._slot_types 00074 00075 def serialize(self, buff): 00076 """ 00077 serialize message into buffer 00078 @param buff: buffer 00079 @type buff: StringIO 00080 """ 00081 try: 00082 _x = self 00083 buff.write(_struct_I3iI.pack(_x.iTOW, _x.ecefVX, _x.ecefVY, _x.ecefVZ, _x.sAcc)) 00084 except struct.error as se: self._check_types(se) 00085 except TypeError as te: self._check_types(te) 00086 00087 def deserialize(self, str): 00088 """ 00089 unpack serialized message in str into this message instance 00090 @param str: byte array of serialized message 00091 @type str: str 00092 """ 00093 try: 00094 end = 0 00095 _x = self 00096 start = end 00097 end += 20 00098 (_x.iTOW, _x.ecefVX, _x.ecefVY, _x.ecefVZ, _x.sAcc,) = _struct_I3iI.unpack(str[start:end]) 00099 return self 00100 except struct.error as e: 00101 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00102 00103 00104 def serialize_numpy(self, buff, numpy): 00105 """ 00106 serialize message with numpy array types into buffer 00107 @param buff: buffer 00108 @type buff: StringIO 00109 @param numpy: numpy python module 00110 @type numpy module 00111 """ 00112 try: 00113 _x = self 00114 buff.write(_struct_I3iI.pack(_x.iTOW, _x.ecefVX, _x.ecefVY, _x.ecefVZ, _x.sAcc)) 00115 except struct.error as se: self._check_types(se) 00116 except TypeError as te: self._check_types(te) 00117 00118 def deserialize_numpy(self, str, numpy): 00119 """ 00120 unpack serialized message in str into this message instance using numpy for array types 00121 @param str: byte array of serialized message 00122 @type str: str 00123 @param numpy: numpy python module 00124 @type numpy: module 00125 """ 00126 try: 00127 end = 0 00128 _x = self 00129 start = end 00130 end += 20 00131 (_x.iTOW, _x.ecefVX, _x.ecefVY, _x.ecefVZ, _x.sAcc,) = _struct_I3iI.unpack(str[start:end]) 00132 return self 00133 except struct.error as e: 00134 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00135 00136 _struct_I = roslib.message.struct_I 00137 _struct_I3iI = struct.Struct("<I3iI")