_SetRemoteLoggerLevel.py
Go to the documentation of this file.
00001 """autogenerated by genpy from industrial_msgs/SetRemoteLoggerLevelRequest.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 industrial_msgs.msg
00008 
00009 class SetRemoteLoggerLevelRequest(genpy.Message):
00010   _md5sum = "3a0089a136293a269fa1a44788ce9777"
00011   _type = "industrial_msgs/SetRemoteLoggerLevelRequest"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """
00014 
00015 
00016 
00017 
00018 industrial_msgs/DebugLevel level
00019 
00020 ================================================================================
00021 MSG: industrial_msgs/DebugLevel
00022 # Debug level message enumeration.  This may replicate some functionality that
00023 # alreay exists in the ROS logger.
00024 # TODO: Get more information on the ROS Logger.
00025 uint8 val
00026 
00027 uint8 DEBUG = 5
00028 uint8 INFO = 4
00029 uint8 WARN = 3
00030 uint8 ERROR = 2
00031 uint8 FATAL = 1
00032 uint8 NONE = 0 
00033 
00034 """
00035   __slots__ = ['level']
00036   _slot_types = ['industrial_msgs/DebugLevel']
00037 
00038   def __init__(self, *args, **kwds):
00039     """
00040     Constructor. Any message fields that are implicitly/explicitly
00041     set to None will be assigned a default value. The recommend
00042     use is keyword arguments as this is more robust to future message
00043     changes.  You cannot mix in-order arguments and keyword arguments.
00044 
00045     The available fields are:
00046        level
00047 
00048     :param args: complete set of field values, in .msg order
00049     :param kwds: use keyword arguments corresponding to message field names
00050     to set specific fields.
00051     """
00052     if args or kwds:
00053       super(SetRemoteLoggerLevelRequest, self).__init__(*args, **kwds)
00054       #message fields cannot be None, assign default values for those that are
00055       if self.level is None:
00056         self.level = industrial_msgs.msg.DebugLevel()
00057     else:
00058       self.level = industrial_msgs.msg.DebugLevel()
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, ``StringIO``
00070     """
00071     try:
00072       buff.write(_struct_B.pack(self.level.val))
00073     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00074     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00075 
00076   def deserialize(self, str):
00077     """
00078     unpack serialized message in str into this message instance
00079     :param str: byte array of serialized message, ``str``
00080     """
00081     try:
00082       if self.level is None:
00083         self.level = industrial_msgs.msg.DebugLevel()
00084       end = 0
00085       start = end
00086       end += 1
00087       (self.level.val,) = _struct_B.unpack(str[start:end])
00088       return self
00089     except struct.error as e:
00090       raise genpy.DeserializationError(e) #most likely buffer underfill
00091 
00092 
00093   def serialize_numpy(self, buff, numpy):
00094     """
00095     serialize message with numpy array types into buffer
00096     :param buff: buffer, ``StringIO``
00097     :param numpy: numpy python module
00098     """
00099     try:
00100       buff.write(_struct_B.pack(self.level.val))
00101     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00102     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00103 
00104   def deserialize_numpy(self, str, numpy):
00105     """
00106     unpack serialized message in str into this message instance using numpy for array types
00107     :param str: byte array of serialized message, ``str``
00108     :param numpy: numpy python module
00109     """
00110     try:
00111       if self.level is None:
00112         self.level = industrial_msgs.msg.DebugLevel()
00113       end = 0
00114       start = end
00115       end += 1
00116       (self.level.val,) = _struct_B.unpack(str[start:end])
00117       return self
00118     except struct.error as e:
00119       raise genpy.DeserializationError(e) #most likely buffer underfill
00120 
00121 _struct_I = genpy.struct_I
00122 _struct_B = struct.Struct("<B")
00123 """autogenerated by genpy from industrial_msgs/SetRemoteLoggerLevelResponse.msg. Do not edit."""
00124 import sys
00125 python3 = True if sys.hexversion > 0x03000000 else False
00126 import genpy
00127 import struct
00128 
00129 import industrial_msgs.msg
00130 
00131 class SetRemoteLoggerLevelResponse(genpy.Message):
00132   _md5sum = "50b1f38f75f5677e5692f3b3e7e1ea48"
00133   _type = "industrial_msgs/SetRemoteLoggerLevelResponse"
00134   _has_header = False #flag to mark the presence of a Header object
00135   _full_text = """industrial_msgs/ServiceReturnCode code
00136 
00137 
00138 ================================================================================
00139 MSG: industrial_msgs/ServiceReturnCode
00140 # Service return codes for simple requests.  All ROS-Industrial service
00141 # replies are required to have a return code indicating success or failure
00142 # Specific return codes for different failure should be negative.
00143 int8 val
00144 
00145 int8 SUCCESS = 1
00146 int8 FAILURE = -1
00147 
00148 
00149 """
00150   __slots__ = ['code']
00151   _slot_types = ['industrial_msgs/ServiceReturnCode']
00152 
00153   def __init__(self, *args, **kwds):
00154     """
00155     Constructor. Any message fields that are implicitly/explicitly
00156     set to None will be assigned a default value. The recommend
00157     use is keyword arguments as this is more robust to future message
00158     changes.  You cannot mix in-order arguments and keyword arguments.
00159 
00160     The available fields are:
00161        code
00162 
00163     :param args: complete set of field values, in .msg order
00164     :param kwds: use keyword arguments corresponding to message field names
00165     to set specific fields.
00166     """
00167     if args or kwds:
00168       super(SetRemoteLoggerLevelResponse, self).__init__(*args, **kwds)
00169       #message fields cannot be None, assign default values for those that are
00170       if self.code is None:
00171         self.code = industrial_msgs.msg.ServiceReturnCode()
00172     else:
00173       self.code = industrial_msgs.msg.ServiceReturnCode()
00174 
00175   def _get_types(self):
00176     """
00177     internal API method
00178     """
00179     return self._slot_types
00180 
00181   def serialize(self, buff):
00182     """
00183     serialize message into buffer
00184     :param buff: buffer, ``StringIO``
00185     """
00186     try:
00187       buff.write(_struct_b.pack(self.code.val))
00188     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00189     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00190 
00191   def deserialize(self, str):
00192     """
00193     unpack serialized message in str into this message instance
00194     :param str: byte array of serialized message, ``str``
00195     """
00196     try:
00197       if self.code is None:
00198         self.code = industrial_msgs.msg.ServiceReturnCode()
00199       end = 0
00200       start = end
00201       end += 1
00202       (self.code.val,) = _struct_b.unpack(str[start:end])
00203       return self
00204     except struct.error as e:
00205       raise genpy.DeserializationError(e) #most likely buffer underfill
00206 
00207 
00208   def serialize_numpy(self, buff, numpy):
00209     """
00210     serialize message with numpy array types into buffer
00211     :param buff: buffer, ``StringIO``
00212     :param numpy: numpy python module
00213     """
00214     try:
00215       buff.write(_struct_b.pack(self.code.val))
00216     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00217     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00218 
00219   def deserialize_numpy(self, str, numpy):
00220     """
00221     unpack serialized message in str into this message instance using numpy for array types
00222     :param str: byte array of serialized message, ``str``
00223     :param numpy: numpy python module
00224     """
00225     try:
00226       if self.code is None:
00227         self.code = industrial_msgs.msg.ServiceReturnCode()
00228       end = 0
00229       start = end
00230       end += 1
00231       (self.code.val,) = _struct_b.unpack(str[start:end])
00232       return self
00233     except struct.error as e:
00234       raise genpy.DeserializationError(e) #most likely buffer underfill
00235 
00236 _struct_I = genpy.struct_I
00237 _struct_b = struct.Struct("<b")
00238 class SetRemoteLoggerLevel(object):
00239   _type          = 'industrial_msgs/SetRemoteLoggerLevel'
00240   _md5sum = '4ae8385cb830c0d46129570c3394af54'
00241   _request_class  = SetRemoteLoggerLevelRequest
00242   _response_class = SetRemoteLoggerLevelResponse


industrial_msgs
Author(s): Shaun M. Edwards
autogenerated on Mon Oct 6 2014 00:53:40