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


ublox_msgs
Author(s): Johannes Meyer
autogenerated on Mon Jul 15 2013 16:55:23