_ScheduleLeds.py
Go to the documentation of this file.
00001 """autogenerated by genpy from roomba_500_series/ScheduleLeds.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import std_msgs.msg
00008 
00009 class ScheduleLeds(genpy.Message):
00010   _md5sum = "4c552ea7c5b68737285d12a0dee0a839"
00011   _type = "roomba_500_series/ScheduleLeds"
00012   _has_header = True #flag to mark the presence of a Header object
00013   _full_text = """Header header
00014 bool sunday
00015 bool monday
00016 bool tuesday
00017 bool wednesday
00018 bool thursday
00019 bool friday
00020 bool saturday
00021 bool colon
00022 bool pm
00023 bool am
00024 bool clock
00025 bool schedule
00026 
00027 ================================================================================
00028 MSG: std_msgs/Header
00029 # Standard metadata for higher-level stamped data types.
00030 # This is generally used to communicate timestamped data 
00031 # in a particular coordinate frame.
00032 # 
00033 # sequence ID: consecutively increasing ID 
00034 uint32 seq
00035 #Two-integer timestamp that is expressed as:
00036 # * stamp.secs: seconds (stamp_secs) since epoch
00037 # * stamp.nsecs: nanoseconds since stamp_secs
00038 # time-handling sugar is provided by the client library
00039 time stamp
00040 #Frame this data is associated with
00041 # 0: no frame
00042 # 1: global frame
00043 string frame_id
00044 
00045 """
00046   __slots__ = ['header','sunday','monday','tuesday','wednesday','thursday','friday','saturday','colon','pm','am','clock','schedule']
00047   _slot_types = ['std_msgs/Header','bool','bool','bool','bool','bool','bool','bool','bool','bool','bool','bool','bool']
00048 
00049   def __init__(self, *args, **kwds):
00050     """
00051     Constructor. Any message fields that are implicitly/explicitly
00052     set to None will be assigned a default value. The recommend
00053     use is keyword arguments as this is more robust to future message
00054     changes.  You cannot mix in-order arguments and keyword arguments.
00055 
00056     The available fields are:
00057        header,sunday,monday,tuesday,wednesday,thursday,friday,saturday,colon,pm,am,clock,schedule
00058 
00059     :param args: complete set of field values, in .msg order
00060     :param kwds: use keyword arguments corresponding to message field names
00061     to set specific fields.
00062     """
00063     if args or kwds:
00064       super(ScheduleLeds, self).__init__(*args, **kwds)
00065       #message fields cannot be None, assign default values for those that are
00066       if self.header is None:
00067         self.header = std_msgs.msg.Header()
00068       if self.sunday is None:
00069         self.sunday = False
00070       if self.monday is None:
00071         self.monday = False
00072       if self.tuesday is None:
00073         self.tuesday = False
00074       if self.wednesday is None:
00075         self.wednesday = False
00076       if self.thursday is None:
00077         self.thursday = False
00078       if self.friday is None:
00079         self.friday = False
00080       if self.saturday is None:
00081         self.saturday = False
00082       if self.colon is None:
00083         self.colon = False
00084       if self.pm is None:
00085         self.pm = False
00086       if self.am is None:
00087         self.am = False
00088       if self.clock is None:
00089         self.clock = False
00090       if self.schedule is None:
00091         self.schedule = False
00092     else:
00093       self.header = std_msgs.msg.Header()
00094       self.sunday = False
00095       self.monday = False
00096       self.tuesday = False
00097       self.wednesday = False
00098       self.thursday = False
00099       self.friday = False
00100       self.saturday = False
00101       self.colon = False
00102       self.pm = False
00103       self.am = False
00104       self.clock = False
00105       self.schedule = False
00106 
00107   def _get_types(self):
00108     """
00109     internal API method
00110     """
00111     return self._slot_types
00112 
00113   def serialize(self, buff):
00114     """
00115     serialize message into buffer
00116     :param buff: buffer, ``StringIO``
00117     """
00118     try:
00119       _x = self
00120       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00121       _x = self.header.frame_id
00122       length = len(_x)
00123       if python3 or type(_x) == unicode:
00124         _x = _x.encode('utf-8')
00125         length = len(_x)
00126       buff.write(struct.pack('<I%ss'%length, length, _x))
00127       _x = self
00128       buff.write(_struct_12B.pack(_x.sunday, _x.monday, _x.tuesday, _x.wednesday, _x.thursday, _x.friday, _x.saturday, _x.colon, _x.pm, _x.am, _x.clock, _x.schedule))
00129     except struct.error as se: self._check_types(se)
00130     except TypeError as te: self._check_types(te)
00131 
00132   def deserialize(self, str):
00133     """
00134     unpack serialized message in str into this message instance
00135     :param str: byte array of serialized message, ``str``
00136     """
00137     try:
00138       if self.header is None:
00139         self.header = std_msgs.msg.Header()
00140       end = 0
00141       _x = self
00142       start = end
00143       end += 12
00144       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00145       start = end
00146       end += 4
00147       (length,) = _struct_I.unpack(str[start:end])
00148       start = end
00149       end += length
00150       if python3:
00151         self.header.frame_id = str[start:end].decode('utf-8')
00152       else:
00153         self.header.frame_id = str[start:end]
00154       _x = self
00155       start = end
00156       end += 12
00157       (_x.sunday, _x.monday, _x.tuesday, _x.wednesday, _x.thursday, _x.friday, _x.saturday, _x.colon, _x.pm, _x.am, _x.clock, _x.schedule,) = _struct_12B.unpack(str[start:end])
00158       self.sunday = bool(self.sunday)
00159       self.monday = bool(self.monday)
00160       self.tuesday = bool(self.tuesday)
00161       self.wednesday = bool(self.wednesday)
00162       self.thursday = bool(self.thursday)
00163       self.friday = bool(self.friday)
00164       self.saturday = bool(self.saturday)
00165       self.colon = bool(self.colon)
00166       self.pm = bool(self.pm)
00167       self.am = bool(self.am)
00168       self.clock = bool(self.clock)
00169       self.schedule = bool(self.schedule)
00170       return self
00171     except struct.error as e:
00172       raise genpy.DeserializationError(e) #most likely buffer underfill
00173 
00174 
00175   def serialize_numpy(self, buff, numpy):
00176     """
00177     serialize message with numpy array types into buffer
00178     :param buff: buffer, ``StringIO``
00179     :param numpy: numpy python module
00180     """
00181     try:
00182       _x = self
00183       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00184       _x = self.header.frame_id
00185       length = len(_x)
00186       if python3 or type(_x) == unicode:
00187         _x = _x.encode('utf-8')
00188         length = len(_x)
00189       buff.write(struct.pack('<I%ss'%length, length, _x))
00190       _x = self
00191       buff.write(_struct_12B.pack(_x.sunday, _x.monday, _x.tuesday, _x.wednesday, _x.thursday, _x.friday, _x.saturday, _x.colon, _x.pm, _x.am, _x.clock, _x.schedule))
00192     except struct.error as se: self._check_types(se)
00193     except TypeError as te: self._check_types(te)
00194 
00195   def deserialize_numpy(self, str, numpy):
00196     """
00197     unpack serialized message in str into this message instance using numpy for array types
00198     :param str: byte array of serialized message, ``str``
00199     :param numpy: numpy python module
00200     """
00201     try:
00202       if self.header is None:
00203         self.header = std_msgs.msg.Header()
00204       end = 0
00205       _x = self
00206       start = end
00207       end += 12
00208       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00209       start = end
00210       end += 4
00211       (length,) = _struct_I.unpack(str[start:end])
00212       start = end
00213       end += length
00214       if python3:
00215         self.header.frame_id = str[start:end].decode('utf-8')
00216       else:
00217         self.header.frame_id = str[start:end]
00218       _x = self
00219       start = end
00220       end += 12
00221       (_x.sunday, _x.monday, _x.tuesday, _x.wednesday, _x.thursday, _x.friday, _x.saturday, _x.colon, _x.pm, _x.am, _x.clock, _x.schedule,) = _struct_12B.unpack(str[start:end])
00222       self.sunday = bool(self.sunday)
00223       self.monday = bool(self.monday)
00224       self.tuesday = bool(self.tuesday)
00225       self.wednesday = bool(self.wednesday)
00226       self.thursday = bool(self.thursday)
00227       self.friday = bool(self.friday)
00228       self.saturday = bool(self.saturday)
00229       self.colon = bool(self.colon)
00230       self.pm = bool(self.pm)
00231       self.am = bool(self.am)
00232       self.clock = bool(self.clock)
00233       self.schedule = bool(self.schedule)
00234       return self
00235     except struct.error as e:
00236       raise genpy.DeserializationError(e) #most likely buffer underfill
00237 
00238 _struct_I = genpy.struct_I
00239 _struct_3I = struct.Struct("<3I")
00240 _struct_12B = struct.Struct("<12B")


roomba_500_series
Author(s): Gonçalo Cabrita
autogenerated on Mon Jan 6 2014 11:26:40