$search
00001 """autogenerated by genmsg_py from CfgMSG.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class CfgMSG(roslib.message.Message): 00007 _md5sum = "9f2fcd2333c19c76cbfdf6a57fc64a9d" 00008 _type = "ublox_msgs/CfgMSG" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# CFG-MSG (0x06 0x01) 00011 # Message Rate(s) 00012 # 00013 00014 uint8 CLASS_ID = 6 00015 uint8 MESSAGE_ID = 1 00016 00017 uint8 msgClass # Message Class 00018 uint8 msgID # Message Identifier 00019 uint8 rate # Send rate on current Target 00020 00021 """ 00022 # Pseudo-constants 00023 CLASS_ID = 6 00024 MESSAGE_ID = 1 00025 00026 __slots__ = ['msgClass','msgID','rate'] 00027 _slot_types = ['uint8','uint8','uint8'] 00028 00029 def __init__(self, *args, **kwds): 00030 """ 00031 Constructor. Any message fields that are implicitly/explicitly 00032 set to None will be assigned a default value. The recommend 00033 use is keyword arguments as this is more robust to future message 00034 changes. You cannot mix in-order arguments and keyword arguments. 00035 00036 The available fields are: 00037 msgClass,msgID,rate 00038 00039 @param args: complete set of field values, in .msg order 00040 @param kwds: use keyword arguments corresponding to message field names 00041 to set specific fields. 00042 """ 00043 if args or kwds: 00044 super(CfgMSG, self).__init__(*args, **kwds) 00045 #message fields cannot be None, assign default values for those that are 00046 if self.msgClass is None: 00047 self.msgClass = 0 00048 if self.msgID is None: 00049 self.msgID = 0 00050 if self.rate is None: 00051 self.rate = 0 00052 else: 00053 self.msgClass = 0 00054 self.msgID = 0 00055 self.rate = 0 00056 00057 def _get_types(self): 00058 """ 00059 internal API method 00060 """ 00061 return self._slot_types 00062 00063 def serialize(self, buff): 00064 """ 00065 serialize message into buffer 00066 @param buff: buffer 00067 @type buff: StringIO 00068 """ 00069 try: 00070 _x = self 00071 buff.write(_struct_3B.pack(_x.msgClass, _x.msgID, _x.rate)) 00072 except struct.error as se: self._check_types(se) 00073 except TypeError as te: self._check_types(te) 00074 00075 def deserialize(self, str): 00076 """ 00077 unpack serialized message in str into this message instance 00078 @param str: byte array of serialized message 00079 @type str: str 00080 """ 00081 try: 00082 end = 0 00083 _x = self 00084 start = end 00085 end += 3 00086 (_x.msgClass, _x.msgID, _x.rate,) = _struct_3B.unpack(str[start:end]) 00087 return self 00088 except struct.error as e: 00089 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00090 00091 00092 def serialize_numpy(self, buff, numpy): 00093 """ 00094 serialize message with numpy array types into buffer 00095 @param buff: buffer 00096 @type buff: StringIO 00097 @param numpy: numpy python module 00098 @type numpy module 00099 """ 00100 try: 00101 _x = self 00102 buff.write(_struct_3B.pack(_x.msgClass, _x.msgID, _x.rate)) 00103 except struct.error as se: self._check_types(se) 00104 except TypeError as te: self._check_types(te) 00105 00106 def deserialize_numpy(self, str, numpy): 00107 """ 00108 unpack serialized message in str into this message instance using numpy for array types 00109 @param str: byte array of serialized message 00110 @type str: str 00111 @param numpy: numpy python module 00112 @type numpy: module 00113 """ 00114 try: 00115 end = 0 00116 _x = self 00117 start = end 00118 end += 3 00119 (_x.msgClass, _x.msgID, _x.rate,) = _struct_3B.unpack(str[start:end]) 00120 return self 00121 except struct.error as e: 00122 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00123 00124 _struct_I = roslib.message.struct_I 00125 _struct_3B = struct.Struct("<3B")