00001 """autogenerated by genpy from cob_phidgets/SetTriggerValueRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class SetTriggerValueRequest(genpy.Message):
00009 _md5sum = "f5eabd2487a9b62214c60cbc4be257ee"
00010 _type = "cob_phidgets/SetTriggerValueRequest"
00011 _has_header = False
00012 _full_text = """int8 index
00013 uint16 trigger_value
00014
00015 """
00016 __slots__ = ['index','trigger_value']
00017 _slot_types = ['int8','uint16']
00018
00019 def __init__(self, *args, **kwds):
00020 """
00021 Constructor. Any message fields that are implicitly/explicitly
00022 set to None will be assigned a default value. The recommend
00023 use is keyword arguments as this is more robust to future message
00024 changes. You cannot mix in-order arguments and keyword arguments.
00025
00026 The available fields are:
00027 index,trigger_value
00028
00029 :param args: complete set of field values, in .msg order
00030 :param kwds: use keyword arguments corresponding to message field names
00031 to set specific fields.
00032 """
00033 if args or kwds:
00034 super(SetTriggerValueRequest, self).__init__(*args, **kwds)
00035
00036 if self.index is None:
00037 self.index = 0
00038 if self.trigger_value is None:
00039 self.trigger_value = 0
00040 else:
00041 self.index = 0
00042 self.trigger_value = 0
00043
00044 def _get_types(self):
00045 """
00046 internal API method
00047 """
00048 return self._slot_types
00049
00050 def serialize(self, buff):
00051 """
00052 serialize message into buffer
00053 :param buff: buffer, ``StringIO``
00054 """
00055 try:
00056 _x = self
00057 buff.write(_struct_bH.pack(_x.index, _x.trigger_value))
00058 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00059 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00060
00061 def deserialize(self, str):
00062 """
00063 unpack serialized message in str into this message instance
00064 :param str: byte array of serialized message, ``str``
00065 """
00066 try:
00067 end = 0
00068 _x = self
00069 start = end
00070 end += 3
00071 (_x.index, _x.trigger_value,) = _struct_bH.unpack(str[start:end])
00072 return self
00073 except struct.error as e:
00074 raise genpy.DeserializationError(e)
00075
00076
00077 def serialize_numpy(self, buff, numpy):
00078 """
00079 serialize message with numpy array types into buffer
00080 :param buff: buffer, ``StringIO``
00081 :param numpy: numpy python module
00082 """
00083 try:
00084 _x = self
00085 buff.write(_struct_bH.pack(_x.index, _x.trigger_value))
00086 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00087 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00088
00089 def deserialize_numpy(self, str, numpy):
00090 """
00091 unpack serialized message in str into this message instance using numpy for array types
00092 :param str: byte array of serialized message, ``str``
00093 :param numpy: numpy python module
00094 """
00095 try:
00096 end = 0
00097 _x = self
00098 start = end
00099 end += 3
00100 (_x.index, _x.trigger_value,) = _struct_bH.unpack(str[start:end])
00101 return self
00102 except struct.error as e:
00103 raise genpy.DeserializationError(e)
00104
00105 _struct_I = genpy.struct_I
00106 _struct_bH = struct.Struct("<bH")
00107 """autogenerated by genpy from cob_phidgets/SetTriggerValueResponse.msg. Do not edit."""
00108 import sys
00109 python3 = True if sys.hexversion > 0x03000000 else False
00110 import genpy
00111 import struct
00112
00113
00114 class SetTriggerValueResponse(genpy.Message):
00115 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00116 _type = "cob_phidgets/SetTriggerValueResponse"
00117 _has_header = False
00118 _full_text = """
00119 """
00120 __slots__ = []
00121 _slot_types = []
00122
00123 def __init__(self, *args, **kwds):
00124 """
00125 Constructor. Any message fields that are implicitly/explicitly
00126 set to None will be assigned a default value. The recommend
00127 use is keyword arguments as this is more robust to future message
00128 changes. You cannot mix in-order arguments and keyword arguments.
00129
00130 The available fields are:
00131
00132
00133 :param args: complete set of field values, in .msg order
00134 :param kwds: use keyword arguments corresponding to message field names
00135 to set specific fields.
00136 """
00137 if args or kwds:
00138 super(SetTriggerValueResponse, self).__init__(*args, **kwds)
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, ``StringIO``
00150 """
00151 try:
00152 pass
00153 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00154 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00155
00156 def deserialize(self, str):
00157 """
00158 unpack serialized message in str into this message instance
00159 :param str: byte array of serialized message, ``str``
00160 """
00161 try:
00162 end = 0
00163 return self
00164 except struct.error as e:
00165 raise genpy.DeserializationError(e)
00166
00167
00168 def serialize_numpy(self, buff, numpy):
00169 """
00170 serialize message with numpy array types into buffer
00171 :param buff: buffer, ``StringIO``
00172 :param numpy: numpy python module
00173 """
00174 try:
00175 pass
00176 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00177 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00178
00179 def deserialize_numpy(self, str, numpy):
00180 """
00181 unpack serialized message in str into this message instance using numpy for array types
00182 :param str: byte array of serialized message, ``str``
00183 :param numpy: numpy python module
00184 """
00185 try:
00186 end = 0
00187 return self
00188 except struct.error as e:
00189 raise genpy.DeserializationError(e)
00190
00191 _struct_I = genpy.struct_I
00192 class SetTriggerValue(object):
00193 _type = 'cob_phidgets/SetTriggerValue'
00194 _md5sum = 'f5eabd2487a9b62214c60cbc4be257ee'
00195 _request_class = SetTriggerValueRequest
00196 _response_class = SetTriggerValueResponse