$search
00001 """autogenerated by genmsg_py from GNSSSetup.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GNSSSetup(roslib.message.Message): 00007 _md5sum = "02ec55e95fd85f13541cf9fc7cb12f4e" 00008 _type = "applanix_msgs/GNSSSetup" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# Msg 30, 31 00011 uint16 transaction 00012 00013 uint8 AUTOCONFIG_ENABLE=1 00014 uint8 AUTOCONFIG_DISABLE=0 00015 uint8 autoconfig 00016 00017 # Valid values = 1, 5, 10 (Hz) 00018 uint8 rate 00019 00020 uint8 reserved1 00021 uint32 reserved2 00022 uint8 reserved3 00023 00024 """ 00025 # Pseudo-constants 00026 AUTOCONFIG_ENABLE = 1 00027 AUTOCONFIG_DISABLE = 0 00028 00029 __slots__ = ['transaction','autoconfig','rate','reserved1','reserved2','reserved3'] 00030 _slot_types = ['uint16','uint8','uint8','uint8','uint32','uint8'] 00031 00032 def __init__(self, *args, **kwds): 00033 """ 00034 Constructor. Any message fields that are implicitly/explicitly 00035 set to None will be assigned a default value. The recommend 00036 use is keyword arguments as this is more robust to future message 00037 changes. You cannot mix in-order arguments and keyword arguments. 00038 00039 The available fields are: 00040 transaction,autoconfig,rate,reserved1,reserved2,reserved3 00041 00042 @param args: complete set of field values, in .msg order 00043 @param kwds: use keyword arguments corresponding to message field names 00044 to set specific fields. 00045 """ 00046 if args or kwds: 00047 super(GNSSSetup, self).__init__(*args, **kwds) 00048 #message fields cannot be None, assign default values for those that are 00049 if self.transaction is None: 00050 self.transaction = 0 00051 if self.autoconfig is None: 00052 self.autoconfig = 0 00053 if self.rate is None: 00054 self.rate = 0 00055 if self.reserved1 is None: 00056 self.reserved1 = 0 00057 if self.reserved2 is None: 00058 self.reserved2 = 0 00059 if self.reserved3 is None: 00060 self.reserved3 = 0 00061 else: 00062 self.transaction = 0 00063 self.autoconfig = 0 00064 self.rate = 0 00065 self.reserved1 = 0 00066 self.reserved2 = 0 00067 self.reserved3 = 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_H3BIB.pack(_x.transaction, _x.autoconfig, _x.rate, _x.reserved1, _x.reserved2, _x.reserved3)) 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 += 10 00098 (_x.transaction, _x.autoconfig, _x.rate, _x.reserved1, _x.reserved2, _x.reserved3,) = _struct_H3BIB.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_H3BIB.pack(_x.transaction, _x.autoconfig, _x.rate, _x.reserved1, _x.reserved2, _x.reserved3)) 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 += 10 00131 (_x.transaction, _x.autoconfig, _x.rate, _x.reserved1, _x.reserved2, _x.reserved3,) = _struct_H3BIB.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_H3BIB = struct.Struct("<H3BIB")