$search
00001 """autogenerated by genmsg_py from sub20_ADC_err.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import std_msgs.msg 00006 00007 class sub20_ADC_err(roslib.message.Message): 00008 _md5sum = "e22867bb71c25a46586924f4cb488c56" 00009 _type = "adc_sub20/sub20_ADC_err" 00010 _has_header = True #flag to mark the presence of a Header object 00011 _full_text = """Header header 00012 string strErrMessage 00013 ================================================================================ 00014 MSG: std_msgs/Header 00015 # Standard metadata for higher-level stamped data types. 00016 # This is generally used to communicate timestamped data 00017 # in a particular coordinate frame. 00018 # 00019 # sequence ID: consecutively increasing ID 00020 uint32 seq 00021 #Two-integer timestamp that is expressed as: 00022 # * stamp.secs: seconds (stamp_secs) since epoch 00023 # * stamp.nsecs: nanoseconds since stamp_secs 00024 # time-handling sugar is provided by the client library 00025 time stamp 00026 #Frame this data is associated with 00027 # 0: no frame 00028 # 1: global frame 00029 string frame_id 00030 00031 """ 00032 __slots__ = ['header','strErrMessage'] 00033 _slot_types = ['Header','string'] 00034 00035 def __init__(self, *args, **kwds): 00036 """ 00037 Constructor. Any message fields that are implicitly/explicitly 00038 set to None will be assigned a default value. The recommend 00039 use is keyword arguments as this is more robust to future message 00040 changes. You cannot mix in-order arguments and keyword arguments. 00041 00042 The available fields are: 00043 header,strErrMessage 00044 00045 @param args: complete set of field values, in .msg order 00046 @param kwds: use keyword arguments corresponding to message field names 00047 to set specific fields. 00048 """ 00049 if args or kwds: 00050 super(sub20_ADC_err, self).__init__(*args, **kwds) 00051 #message fields cannot be None, assign default values for those that are 00052 if self.header is None: 00053 self.header = std_msgs.msg._Header.Header() 00054 if self.strErrMessage is None: 00055 self.strErrMessage = '' 00056 else: 00057 self.header = std_msgs.msg._Header.Header() 00058 self.strErrMessage = '' 00059 00060 def _get_types(self): 00061 """ 00062 internal API method 00063 """ 00064 return self._slot_types 00065 00066 def serialize(self, buff): 00067 """ 00068 serialize message into buffer 00069 @param buff: buffer 00070 @type buff: StringIO 00071 """ 00072 try: 00073 _x = self 00074 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00075 _x = self.header.frame_id 00076 length = len(_x) 00077 buff.write(struct.pack('<I%ss'%length, length, _x)) 00078 _x = self.strErrMessage 00079 length = len(_x) 00080 buff.write(struct.pack('<I%ss'%length, length, _x)) 00081 except struct.error as se: self._check_types(se) 00082 except TypeError as te: self._check_types(te) 00083 00084 def deserialize(self, str): 00085 """ 00086 unpack serialized message in str into this message instance 00087 @param str: byte array of serialized message 00088 @type str: str 00089 """ 00090 try: 00091 if self.header is None: 00092 self.header = std_msgs.msg._Header.Header() 00093 end = 0 00094 _x = self 00095 start = end 00096 end += 12 00097 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00098 start = end 00099 end += 4 00100 (length,) = _struct_I.unpack(str[start:end]) 00101 start = end 00102 end += length 00103 self.header.frame_id = str[start:end] 00104 start = end 00105 end += 4 00106 (length,) = _struct_I.unpack(str[start:end]) 00107 start = end 00108 end += length 00109 self.strErrMessage = str[start:end] 00110 return self 00111 except struct.error as e: 00112 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00113 00114 00115 def serialize_numpy(self, buff, numpy): 00116 """ 00117 serialize message with numpy array types into buffer 00118 @param buff: buffer 00119 @type buff: StringIO 00120 @param numpy: numpy python module 00121 @type numpy module 00122 """ 00123 try: 00124 _x = self 00125 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00126 _x = self.header.frame_id 00127 length = len(_x) 00128 buff.write(struct.pack('<I%ss'%length, length, _x)) 00129 _x = self.strErrMessage 00130 length = len(_x) 00131 buff.write(struct.pack('<I%ss'%length, length, _x)) 00132 except struct.error as se: self._check_types(se) 00133 except TypeError as te: self._check_types(te) 00134 00135 def deserialize_numpy(self, str, numpy): 00136 """ 00137 unpack serialized message in str into this message instance using numpy for array types 00138 @param str: byte array of serialized message 00139 @type str: str 00140 @param numpy: numpy python module 00141 @type numpy: module 00142 """ 00143 try: 00144 if self.header is None: 00145 self.header = std_msgs.msg._Header.Header() 00146 end = 0 00147 _x = self 00148 start = end 00149 end += 12 00150 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00151 start = end 00152 end += 4 00153 (length,) = _struct_I.unpack(str[start:end]) 00154 start = end 00155 end += length 00156 self.header.frame_id = str[start:end] 00157 start = end 00158 end += 4 00159 (length,) = _struct_I.unpack(str[start:end]) 00160 start = end 00161 end += length 00162 self.strErrMessage = str[start:end] 00163 return self 00164 except struct.error as e: 00165 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00166 00167 _struct_I = roslib.message.struct_I 00168 _struct_3I = struct.Struct("<3I")