$search
00001 """autogenerated by genmsg_py from DGPSSourceControl.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class DGPSSourceControl(roslib.message.Message): 00007 _md5sum = "647a618f1252a3c18cb54ba603253af8" 00008 _type = "applanix_msgs/DGPSSourceControl" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# Msg 41 00011 uint16 transaction 00012 00013 # TODO: enums 00014 uint8 dgps_source_mode 00015 uint8 beacon_acquisition_mode 00016 uint16 beacon_channel_0_frequency 00017 uint16 beacon_channel_1_frequency 00018 00019 uint8 satellite_id 00020 00021 uint16 satellite_bitrate 00022 float64 satellite_frequency 00023 00024 uint8 request_database_source 00025 uint8 landstar_correction_source 00026 uint8[26] omnistar_activation_code 00027 00028 """ 00029 __slots__ = ['transaction','dgps_source_mode','beacon_acquisition_mode','beacon_channel_0_frequency','beacon_channel_1_frequency','satellite_id','satellite_bitrate','satellite_frequency','request_database_source','landstar_correction_source','omnistar_activation_code'] 00030 _slot_types = ['uint16','uint8','uint8','uint16','uint16','uint8','uint16','float64','uint8','uint8','uint8[26]'] 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,dgps_source_mode,beacon_acquisition_mode,beacon_channel_0_frequency,beacon_channel_1_frequency,satellite_id,satellite_bitrate,satellite_frequency,request_database_source,landstar_correction_source,omnistar_activation_code 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(DGPSSourceControl, 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.dgps_source_mode is None: 00052 self.dgps_source_mode = 0 00053 if self.beacon_acquisition_mode is None: 00054 self.beacon_acquisition_mode = 0 00055 if self.beacon_channel_0_frequency is None: 00056 self.beacon_channel_0_frequency = 0 00057 if self.beacon_channel_1_frequency is None: 00058 self.beacon_channel_1_frequency = 0 00059 if self.satellite_id is None: 00060 self.satellite_id = 0 00061 if self.satellite_bitrate is None: 00062 self.satellite_bitrate = 0 00063 if self.satellite_frequency is None: 00064 self.satellite_frequency = 0. 00065 if self.request_database_source is None: 00066 self.request_database_source = 0 00067 if self.landstar_correction_source is None: 00068 self.landstar_correction_source = 0 00069 if self.omnistar_activation_code is None: 00070 self.omnistar_activation_code = chr(0)*26 00071 else: 00072 self.transaction = 0 00073 self.dgps_source_mode = 0 00074 self.beacon_acquisition_mode = 0 00075 self.beacon_channel_0_frequency = 0 00076 self.beacon_channel_1_frequency = 0 00077 self.satellite_id = 0 00078 self.satellite_bitrate = 0 00079 self.satellite_frequency = 0. 00080 self.request_database_source = 0 00081 self.landstar_correction_source = 0 00082 self.omnistar_activation_code = chr(0)*26 00083 00084 def _get_types(self): 00085 """ 00086 internal API method 00087 """ 00088 return self._slot_types 00089 00090 def serialize(self, buff): 00091 """ 00092 serialize message into buffer 00093 @param buff: buffer 00094 @type buff: StringIO 00095 """ 00096 try: 00097 _x = self 00098 buff.write(_struct_H2B2HBHd2B.pack(_x.transaction, _x.dgps_source_mode, _x.beacon_acquisition_mode, _x.beacon_channel_0_frequency, _x.beacon_channel_1_frequency, _x.satellite_id, _x.satellite_bitrate, _x.satellite_frequency, _x.request_database_source, _x.landstar_correction_source)) 00099 _x = self.omnistar_activation_code 00100 # - if encoded as a list instead, serialize as bytes instead of string 00101 if type(_x) in [list, tuple]: 00102 buff.write(_struct_26B.pack(*_x)) 00103 else: 00104 buff.write(_struct_26s.pack(_x)) 00105 except struct.error as se: self._check_types(se) 00106 except TypeError as te: self._check_types(te) 00107 00108 def deserialize(self, str): 00109 """ 00110 unpack serialized message in str into this message instance 00111 @param str: byte array of serialized message 00112 @type str: str 00113 """ 00114 try: 00115 end = 0 00116 _x = self 00117 start = end 00118 end += 21 00119 (_x.transaction, _x.dgps_source_mode, _x.beacon_acquisition_mode, _x.beacon_channel_0_frequency, _x.beacon_channel_1_frequency, _x.satellite_id, _x.satellite_bitrate, _x.satellite_frequency, _x.request_database_source, _x.landstar_correction_source,) = _struct_H2B2HBHd2B.unpack(str[start:end]) 00120 start = end 00121 end += 26 00122 self.omnistar_activation_code = str[start:end] 00123 return self 00124 except struct.error as e: 00125 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00126 00127 00128 def serialize_numpy(self, buff, numpy): 00129 """ 00130 serialize message with numpy array types into buffer 00131 @param buff: buffer 00132 @type buff: StringIO 00133 @param numpy: numpy python module 00134 @type numpy module 00135 """ 00136 try: 00137 _x = self 00138 buff.write(_struct_H2B2HBHd2B.pack(_x.transaction, _x.dgps_source_mode, _x.beacon_acquisition_mode, _x.beacon_channel_0_frequency, _x.beacon_channel_1_frequency, _x.satellite_id, _x.satellite_bitrate, _x.satellite_frequency, _x.request_database_source, _x.landstar_correction_source)) 00139 _x = self.omnistar_activation_code 00140 # - if encoded as a list instead, serialize as bytes instead of string 00141 if type(_x) in [list, tuple]: 00142 buff.write(_struct_26B.pack(*_x)) 00143 else: 00144 buff.write(_struct_26s.pack(_x)) 00145 except struct.error as se: self._check_types(se) 00146 except TypeError as te: self._check_types(te) 00147 00148 def deserialize_numpy(self, str, numpy): 00149 """ 00150 unpack serialized message in str into this message instance using numpy for array types 00151 @param str: byte array of serialized message 00152 @type str: str 00153 @param numpy: numpy python module 00154 @type numpy: module 00155 """ 00156 try: 00157 end = 0 00158 _x = self 00159 start = end 00160 end += 21 00161 (_x.transaction, _x.dgps_source_mode, _x.beacon_acquisition_mode, _x.beacon_channel_0_frequency, _x.beacon_channel_1_frequency, _x.satellite_id, _x.satellite_bitrate, _x.satellite_frequency, _x.request_database_source, _x.landstar_correction_source,) = _struct_H2B2HBHd2B.unpack(str[start:end]) 00162 start = end 00163 end += 26 00164 self.omnistar_activation_code = str[start:end] 00165 return self 00166 except struct.error as e: 00167 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00168 00169 _struct_I = roslib.message.struct_I 00170 _struct_26s = struct.Struct("<26s") 00171 _struct_26B = struct.Struct("<26B") 00172 _struct_H2B2HBHd2B = struct.Struct("<H2B2HBHd2B")