$search
00001 """autogenerated by genmsg_py from RebootPortRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class RebootPortRequest(roslib.message.Message): 00007 _md5sum = "777f001c8d1dced67dc763e855890ac2" 00008 _type = "remote_power_manager/RebootPortRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """int64 power_port 00011 00012 """ 00013 __slots__ = ['power_port'] 00014 _slot_types = ['int64'] 00015 00016 def __init__(self, *args, **kwds): 00017 """ 00018 Constructor. Any message fields that are implicitly/explicitly 00019 set to None will be assigned a default value. The recommend 00020 use is keyword arguments as this is more robust to future message 00021 changes. You cannot mix in-order arguments and keyword arguments. 00022 00023 The available fields are: 00024 power_port 00025 00026 @param args: complete set of field values, in .msg order 00027 @param kwds: use keyword arguments corresponding to message field names 00028 to set specific fields. 00029 """ 00030 if args or kwds: 00031 super(RebootPortRequest, self).__init__(*args, **kwds) 00032 #message fields cannot be None, assign default values for those that are 00033 if self.power_port is None: 00034 self.power_port = 0 00035 else: 00036 self.power_port = 0 00037 00038 def _get_types(self): 00039 """ 00040 internal API method 00041 """ 00042 return self._slot_types 00043 00044 def serialize(self, buff): 00045 """ 00046 serialize message into buffer 00047 @param buff: buffer 00048 @type buff: StringIO 00049 """ 00050 try: 00051 buff.write(_struct_q.pack(self.power_port)) 00052 except struct.error as se: self._check_types(se) 00053 except TypeError as te: self._check_types(te) 00054 00055 def deserialize(self, str): 00056 """ 00057 unpack serialized message in str into this message instance 00058 @param str: byte array of serialized message 00059 @type str: str 00060 """ 00061 try: 00062 end = 0 00063 start = end 00064 end += 8 00065 (self.power_port,) = _struct_q.unpack(str[start:end]) 00066 return self 00067 except struct.error as e: 00068 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00069 00070 00071 def serialize_numpy(self, buff, numpy): 00072 """ 00073 serialize message with numpy array types into buffer 00074 @param buff: buffer 00075 @type buff: StringIO 00076 @param numpy: numpy python module 00077 @type numpy module 00078 """ 00079 try: 00080 buff.write(_struct_q.pack(self.power_port)) 00081 except struct.error as se: self._check_types(se) 00082 except TypeError as te: self._check_types(te) 00083 00084 def deserialize_numpy(self, str, numpy): 00085 """ 00086 unpack serialized message in str into this message instance using numpy for array types 00087 @param str: byte array of serialized message 00088 @type str: str 00089 @param numpy: numpy python module 00090 @type numpy: module 00091 """ 00092 try: 00093 end = 0 00094 start = end 00095 end += 8 00096 (self.power_port,) = _struct_q.unpack(str[start:end]) 00097 return self 00098 except struct.error as e: 00099 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00100 00101 _struct_I = roslib.message.struct_I 00102 _struct_q = struct.Struct("<q") 00103 """autogenerated by genmsg_py from RebootPortResponse.msg. Do not edit.""" 00104 import roslib.message 00105 import struct 00106 00107 00108 class RebootPortResponse(roslib.message.Message): 00109 _md5sum = "77a016100646233c1d9b68369761856b" 00110 _type = "remote_power_manager/RebootPortResponse" 00111 _has_header = False #flag to mark the presence of a Header object 00112 _full_text = """bool return_code 00113 00114 """ 00115 __slots__ = ['return_code'] 00116 _slot_types = ['bool'] 00117 00118 def __init__(self, *args, **kwds): 00119 """ 00120 Constructor. Any message fields that are implicitly/explicitly 00121 set to None will be assigned a default value. The recommend 00122 use is keyword arguments as this is more robust to future message 00123 changes. You cannot mix in-order arguments and keyword arguments. 00124 00125 The available fields are: 00126 return_code 00127 00128 @param args: complete set of field values, in .msg order 00129 @param kwds: use keyword arguments corresponding to message field names 00130 to set specific fields. 00131 """ 00132 if args or kwds: 00133 super(RebootPortResponse, self).__init__(*args, **kwds) 00134 #message fields cannot be None, assign default values for those that are 00135 if self.return_code is None: 00136 self.return_code = False 00137 else: 00138 self.return_code = False 00139 00140 def _get_types(self): 00141 """ 00142 internal API method 00143 """ 00144 return self._slot_types 00145 00146 def serialize(self, buff): 00147 """ 00148 serialize message into buffer 00149 @param buff: buffer 00150 @type buff: StringIO 00151 """ 00152 try: 00153 buff.write(_struct_B.pack(self.return_code)) 00154 except struct.error as se: self._check_types(se) 00155 except TypeError as te: self._check_types(te) 00156 00157 def deserialize(self, str): 00158 """ 00159 unpack serialized message in str into this message instance 00160 @param str: byte array of serialized message 00161 @type str: str 00162 """ 00163 try: 00164 end = 0 00165 start = end 00166 end += 1 00167 (self.return_code,) = _struct_B.unpack(str[start:end]) 00168 self.return_code = bool(self.return_code) 00169 return self 00170 except struct.error as e: 00171 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00172 00173 00174 def serialize_numpy(self, buff, numpy): 00175 """ 00176 serialize message with numpy array types into buffer 00177 @param buff: buffer 00178 @type buff: StringIO 00179 @param numpy: numpy python module 00180 @type numpy module 00181 """ 00182 try: 00183 buff.write(_struct_B.pack(self.return_code)) 00184 except struct.error as se: self._check_types(se) 00185 except TypeError as te: self._check_types(te) 00186 00187 def deserialize_numpy(self, str, numpy): 00188 """ 00189 unpack serialized message in str into this message instance using numpy for array types 00190 @param str: byte array of serialized message 00191 @type str: str 00192 @param numpy: numpy python module 00193 @type numpy: module 00194 """ 00195 try: 00196 end = 0 00197 start = end 00198 end += 1 00199 (self.return_code,) = _struct_B.unpack(str[start:end]) 00200 self.return_code = bool(self.return_code) 00201 return self 00202 except struct.error as e: 00203 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00204 00205 _struct_I = roslib.message.struct_I 00206 _struct_B = struct.Struct("<B") 00207 class RebootPort(roslib.message.ServiceDefinition): 00208 _type = 'remote_power_manager/RebootPort' 00209 _md5sum = 'e361bba0083db7163fc589f4c8cfed1a' 00210 _request_class = RebootPortRequest 00211 _response_class = RebootPortResponse