Go to the documentation of this file.00001 """autogenerated by genpy from motld/Config.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 Config(genpy.Message):
00009 _md5sum = "31fd5f2c3464d3c0ce3fe01307b0b3d3"
00010 _type = "motld/Config"
00011 _has_header = False
00012 _full_text = """int32 learning
00013
00014 int32 IPARAM_NOT_SET = -1
00015 float64 FPARAM_NOT_SET = -1
00016
00017 """
00018
00019 IPARAM_NOT_SET = -1
00020 FPARAM_NOT_SET = -1.0
00021
00022 __slots__ = ['learning']
00023 _slot_types = ['int32']
00024
00025 def __init__(self, *args, **kwds):
00026 """
00027 Constructor. Any message fields that are implicitly/explicitly
00028 set to None will be assigned a default value. The recommend
00029 use is keyword arguments as this is more robust to future message
00030 changes. You cannot mix in-order arguments and keyword arguments.
00031
00032 The available fields are:
00033 learning
00034
00035 :param args: complete set of field values, in .msg order
00036 :param kwds: use keyword arguments corresponding to message field names
00037 to set specific fields.
00038 """
00039 if args or kwds:
00040 super(Config, self).__init__(*args, **kwds)
00041
00042 if self.learning is None:
00043 self.learning = 0
00044 else:
00045 self.learning = 0
00046
00047 def _get_types(self):
00048 """
00049 internal API method
00050 """
00051 return self._slot_types
00052
00053 def serialize(self, buff):
00054 """
00055 serialize message into buffer
00056 :param buff: buffer, ``StringIO``
00057 """
00058 try:
00059 buff.write(_struct_i.pack(self.learning))
00060 except struct.error as se: self._check_types(se)
00061 except TypeError as te: self._check_types(te)
00062
00063 def deserialize(self, str):
00064 """
00065 unpack serialized message in str into this message instance
00066 :param str: byte array of serialized message, ``str``
00067 """
00068 try:
00069 end = 0
00070 start = end
00071 end += 4
00072 (self.learning,) = _struct_i.unpack(str[start:end])
00073 return self
00074 except struct.error as e:
00075 raise genpy.DeserializationError(e)
00076
00077
00078 def serialize_numpy(self, buff, numpy):
00079 """
00080 serialize message with numpy array types into buffer
00081 :param buff: buffer, ``StringIO``
00082 :param numpy: numpy python module
00083 """
00084 try:
00085 buff.write(_struct_i.pack(self.learning))
00086 except struct.error as se: self._check_types(se)
00087 except TypeError as te: self._check_types(te)
00088
00089 def deserialize_numpy(self, str, numpy):
00090 """
00091 unpack serialized message in str into this message instance using numpy for array types
00092 :param str: byte array of serialized message, ``str``
00093 :param numpy: numpy python module
00094 """
00095 try:
00096 end = 0
00097 start = end
00098 end += 4
00099 (self.learning,) = _struct_i.unpack(str[start:end])
00100 return self
00101 except struct.error as e:
00102 raise genpy.DeserializationError(e)
00103
00104 _struct_I = genpy.struct_I
00105 _struct_i = struct.Struct("<i")