$search
00001 """autogenerated by genmsg_py from SmachContainerInitialStatusCmd.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class SmachContainerInitialStatusCmd(roslib.message.Message): 00007 _md5sum = "45f8cf31fc29b829db77f23001f788d6" 00008 _type = "smach_msgs/SmachContainerInitialStatusCmd" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# The path to the node in the server 00011 string path 00012 00013 # The desired initial state(s) 00014 string[] initial_states 00015 00016 # Initial values for the local user data of the state machine 00017 # A pickled user data structure 00018 string local_data 00019 00020 """ 00021 __slots__ = ['path','initial_states','local_data'] 00022 _slot_types = ['string','string[]','string'] 00023 00024 def __init__(self, *args, **kwds): 00025 """ 00026 Constructor. Any message fields that are implicitly/explicitly 00027 set to None will be assigned a default value. The recommend 00028 use is keyword arguments as this is more robust to future message 00029 changes. You cannot mix in-order arguments and keyword arguments. 00030 00031 The available fields are: 00032 path,initial_states,local_data 00033 00034 @param args: complete set of field values, in .msg order 00035 @param kwds: use keyword arguments corresponding to message field names 00036 to set specific fields. 00037 """ 00038 if args or kwds: 00039 super(SmachContainerInitialStatusCmd, self).__init__(*args, **kwds) 00040 #message fields cannot be None, assign default values for those that are 00041 if self.path is None: 00042 self.path = '' 00043 if self.initial_states is None: 00044 self.initial_states = [] 00045 if self.local_data is None: 00046 self.local_data = '' 00047 else: 00048 self.path = '' 00049 self.initial_states = [] 00050 self.local_data = '' 00051 00052 def _get_types(self): 00053 """ 00054 internal API method 00055 """ 00056 return self._slot_types 00057 00058 def serialize(self, buff): 00059 """ 00060 serialize message into buffer 00061 @param buff: buffer 00062 @type buff: StringIO 00063 """ 00064 try: 00065 _x = self.path 00066 length = len(_x) 00067 buff.write(struct.pack('<I%ss'%length, length, _x)) 00068 length = len(self.initial_states) 00069 buff.write(_struct_I.pack(length)) 00070 for val1 in self.initial_states: 00071 length = len(val1) 00072 buff.write(struct.pack('<I%ss'%length, length, val1)) 00073 _x = self.local_data 00074 length = len(_x) 00075 buff.write(struct.pack('<I%ss'%length, length, _x)) 00076 except struct.error as se: self._check_types(se) 00077 except TypeError as te: self._check_types(te) 00078 00079 def deserialize(self, str): 00080 """ 00081 unpack serialized message in str into this message instance 00082 @param str: byte array of serialized message 00083 @type str: str 00084 """ 00085 try: 00086 end = 0 00087 start = end 00088 end += 4 00089 (length,) = _struct_I.unpack(str[start:end]) 00090 start = end 00091 end += length 00092 self.path = str[start:end] 00093 start = end 00094 end += 4 00095 (length,) = _struct_I.unpack(str[start:end]) 00096 self.initial_states = [] 00097 for i in range(0, length): 00098 start = end 00099 end += 4 00100 (length,) = _struct_I.unpack(str[start:end]) 00101 start = end 00102 end += length 00103 val1 = str[start:end] 00104 self.initial_states.append(val1) 00105 start = end 00106 end += 4 00107 (length,) = _struct_I.unpack(str[start:end]) 00108 start = end 00109 end += length 00110 self.local_data = str[start:end] 00111 return self 00112 except struct.error as e: 00113 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00114 00115 00116 def serialize_numpy(self, buff, numpy): 00117 """ 00118 serialize message with numpy array types into buffer 00119 @param buff: buffer 00120 @type buff: StringIO 00121 @param numpy: numpy python module 00122 @type numpy module 00123 """ 00124 try: 00125 _x = self.path 00126 length = len(_x) 00127 buff.write(struct.pack('<I%ss'%length, length, _x)) 00128 length = len(self.initial_states) 00129 buff.write(_struct_I.pack(length)) 00130 for val1 in self.initial_states: 00131 length = len(val1) 00132 buff.write(struct.pack('<I%ss'%length, length, val1)) 00133 _x = self.local_data 00134 length = len(_x) 00135 buff.write(struct.pack('<I%ss'%length, length, _x)) 00136 except struct.error as se: self._check_types(se) 00137 except TypeError as te: self._check_types(te) 00138 00139 def deserialize_numpy(self, str, numpy): 00140 """ 00141 unpack serialized message in str into this message instance using numpy for array types 00142 @param str: byte array of serialized message 00143 @type str: str 00144 @param numpy: numpy python module 00145 @type numpy: module 00146 """ 00147 try: 00148 end = 0 00149 start = end 00150 end += 4 00151 (length,) = _struct_I.unpack(str[start:end]) 00152 start = end 00153 end += length 00154 self.path = str[start:end] 00155 start = end 00156 end += 4 00157 (length,) = _struct_I.unpack(str[start:end]) 00158 self.initial_states = [] 00159 for i in range(0, length): 00160 start = end 00161 end += 4 00162 (length,) = _struct_I.unpack(str[start:end]) 00163 start = end 00164 end += length 00165 val1 = str[start:end] 00166 self.initial_states.append(val1) 00167 start = end 00168 end += 4 00169 (length,) = _struct_I.unpack(str[start:end]) 00170 start = end 00171 end += length 00172 self.local_data = str[start:end] 00173 return self 00174 except struct.error as e: 00175 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00176 00177 _struct_I = roslib.message.struct_I