00001 """autogenerated by genmsg_py from ConstantsMultiplexRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class ConstantsMultiplexRequest(roslib.message.Message):
00007 _md5sum = "3e3b2ecf5f3e7d25830bd97a7fd13b17"
00008 _type = "test_rospy/ConstantsMultiplexRequest"
00009 _has_header = False
00010 _full_text = """byte BYTE_X=0
00011 byte BYTE_Y=15
00012 byte BYTE_Z=5
00013 int32 INT32_X=0
00014 int32 INT32_Y=-12345678
00015 int32 INT32_Z=12345678
00016 uint32 UINT32_X=0
00017 uint32 UINT32_Y=12345678
00018 uint32 UINT32_Z=1
00019 float32 FLOAT32_X=0.0
00020 float32 FLOAT32_Y=-3.14159
00021 float32 FLOAT32_Z=12345.78
00022 byte SELECT_X=1
00023 byte SELECT_Y=2
00024 byte SELECT_Z=3
00025 byte selection
00026
00027 """
00028
00029 BYTE_X = 0
00030 BYTE_Y = 15
00031 BYTE_Z = 5
00032 INT32_X = 0
00033 INT32_Y = -12345678
00034 INT32_Z = 12345678
00035 UINT32_X = 0
00036 UINT32_Y = 12345678
00037 UINT32_Z = 1
00038 FLOAT32_X = 0.0
00039 FLOAT32_Y = -3.14159
00040 FLOAT32_Z = 12345.78
00041 SELECT_X = 1
00042 SELECT_Y = 2
00043 SELECT_Z = 3
00044
00045 __slots__ = ['selection']
00046 _slot_types = ['byte']
00047
00048 def __init__(self, *args, **kwds):
00049 """
00050 Constructor. Any message fields that are implicitly/explicitly
00051 set to None will be assigned a default value. The recommend
00052 use is keyword arguments as this is more robust to future message
00053 changes. You cannot mix in-order arguments and keyword arguments.
00054
00055 The available fields are:
00056 selection
00057
00058 @param args: complete set of field values, in .msg order
00059 @param kwds: use keyword arguments corresponding to message field names
00060 to set specific fields.
00061 """
00062 if args or kwds:
00063 super(ConstantsMultiplexRequest, self).__init__(*args, **kwds)
00064
00065 if self.selection is None:
00066 self.selection = 0
00067 else:
00068 self.selection = 0
00069
00070 def _get_types(self):
00071 """
00072 internal API method
00073 """
00074 return self._slot_types
00075
00076 def serialize(self, buff):
00077 """
00078 serialize message into buffer
00079 @param buff: buffer
00080 @type buff: StringIO
00081 """
00082 try:
00083 buff.write(_struct_b.pack(self.selection))
00084 except struct.error, se: self._check_types(se)
00085 except TypeError, te: self._check_types(te)
00086
00087 def deserialize(self, str):
00088 """
00089 unpack serialized message in str into this message instance
00090 @param str: byte array of serialized message
00091 @type str: str
00092 """
00093 try:
00094 end = 0
00095 start = end
00096 end += 1
00097 (self.selection,) = _struct_b.unpack(str[start:end])
00098 return self
00099 except struct.error, e:
00100 raise roslib.message.DeserializationError(e)
00101
00102
00103 def serialize_numpy(self, buff, numpy):
00104 """
00105 serialize message with numpy array types into buffer
00106 @param buff: buffer
00107 @type buff: StringIO
00108 @param numpy: numpy python module
00109 @type numpy module
00110 """
00111 try:
00112 buff.write(_struct_b.pack(self.selection))
00113 except struct.error, se: self._check_types(se)
00114 except TypeError, te: self._check_types(te)
00115
00116 def deserialize_numpy(self, str, numpy):
00117 """
00118 unpack serialized message in str into this message instance using numpy for array types
00119 @param str: byte array of serialized message
00120 @type str: str
00121 @param numpy: numpy python module
00122 @type numpy: module
00123 """
00124 try:
00125 end = 0
00126 start = end
00127 end += 1
00128 (self.selection,) = _struct_b.unpack(str[start:end])
00129 return self
00130 except struct.error, e:
00131 raise roslib.message.DeserializationError(e)
00132
00133 _struct_I = roslib.message.struct_I
00134 _struct_b = struct.Struct("<b")
00135 """autogenerated by genmsg_py from ConstantsMultiplexResponse.msg. Do not edit."""
00136 import roslib.message
00137 import struct
00138
00139
00140 class ConstantsMultiplexResponse(roslib.message.Message):
00141 _md5sum = "012320975f41b58dcffb5b0e7a154691"
00142 _type = "test_rospy/ConstantsMultiplexResponse"
00143 _has_header = False
00144 _full_text = """
00145 byte CONFIRM_X=1
00146 byte CONFIRM_Y=2
00147 byte CONFIRM_Z=3
00148 byte select_confirm
00149 byte ret_byte
00150 int32 ret_int32
00151 uint32 ret_uint32
00152 float32 ret_float32
00153
00154 """
00155
00156 CONFIRM_X = 1
00157 CONFIRM_Y = 2
00158 CONFIRM_Z = 3
00159
00160 __slots__ = ['select_confirm','ret_byte','ret_int32','ret_uint32','ret_float32']
00161 _slot_types = ['byte','byte','int32','uint32','float32']
00162
00163 def __init__(self, *args, **kwds):
00164 """
00165 Constructor. Any message fields that are implicitly/explicitly
00166 set to None will be assigned a default value. The recommend
00167 use is keyword arguments as this is more robust to future message
00168 changes. You cannot mix in-order arguments and keyword arguments.
00169
00170 The available fields are:
00171 select_confirm,ret_byte,ret_int32,ret_uint32,ret_float32
00172
00173 @param args: complete set of field values, in .msg order
00174 @param kwds: use keyword arguments corresponding to message field names
00175 to set specific fields.
00176 """
00177 if args or kwds:
00178 super(ConstantsMultiplexResponse, self).__init__(*args, **kwds)
00179
00180 if self.select_confirm is None:
00181 self.select_confirm = 0
00182 if self.ret_byte is None:
00183 self.ret_byte = 0
00184 if self.ret_int32 is None:
00185 self.ret_int32 = 0
00186 if self.ret_uint32 is None:
00187 self.ret_uint32 = 0
00188 if self.ret_float32 is None:
00189 self.ret_float32 = 0.
00190 else:
00191 self.select_confirm = 0
00192 self.ret_byte = 0
00193 self.ret_int32 = 0
00194 self.ret_uint32 = 0
00195 self.ret_float32 = 0.
00196
00197 def _get_types(self):
00198 """
00199 internal API method
00200 """
00201 return self._slot_types
00202
00203 def serialize(self, buff):
00204 """
00205 serialize message into buffer
00206 @param buff: buffer
00207 @type buff: StringIO
00208 """
00209 try:
00210 _x = self
00211 buff.write(_struct_2biIf.pack(_x.select_confirm, _x.ret_byte, _x.ret_int32, _x.ret_uint32, _x.ret_float32))
00212 except struct.error, se: self._check_types(se)
00213 except TypeError, te: self._check_types(te)
00214
00215 def deserialize(self, str):
00216 """
00217 unpack serialized message in str into this message instance
00218 @param str: byte array of serialized message
00219 @type str: str
00220 """
00221 try:
00222 end = 0
00223 _x = self
00224 start = end
00225 end += 14
00226 (_x.select_confirm, _x.ret_byte, _x.ret_int32, _x.ret_uint32, _x.ret_float32,) = _struct_2biIf.unpack(str[start:end])
00227 return self
00228 except struct.error, e:
00229 raise roslib.message.DeserializationError(e)
00230
00231
00232 def serialize_numpy(self, buff, numpy):
00233 """
00234 serialize message with numpy array types into buffer
00235 @param buff: buffer
00236 @type buff: StringIO
00237 @param numpy: numpy python module
00238 @type numpy module
00239 """
00240 try:
00241 _x = self
00242 buff.write(_struct_2biIf.pack(_x.select_confirm, _x.ret_byte, _x.ret_int32, _x.ret_uint32, _x.ret_float32))
00243 except struct.error, se: self._check_types(se)
00244 except TypeError, te: self._check_types(te)
00245
00246 def deserialize_numpy(self, str, numpy):
00247 """
00248 unpack serialized message in str into this message instance using numpy for array types
00249 @param str: byte array of serialized message
00250 @type str: str
00251 @param numpy: numpy python module
00252 @type numpy: module
00253 """
00254 try:
00255 end = 0
00256 _x = self
00257 start = end
00258 end += 14
00259 (_x.select_confirm, _x.ret_byte, _x.ret_int32, _x.ret_uint32, _x.ret_float32,) = _struct_2biIf.unpack(str[start:end])
00260 return self
00261 except struct.error, e:
00262 raise roslib.message.DeserializationError(e)
00263
00264 _struct_I = roslib.message.struct_I
00265 _struct_2biIf = struct.Struct("<2biIf")
00266 class ConstantsMultiplex(roslib.message.ServiceDefinition):
00267 _type = 'test_rospy/ConstantsMultiplex'
00268 _md5sum = 'bab86066b3f7801cb25df3932f644396'
00269 _request_class = ConstantsMultiplexRequest
00270 _response_class = ConstantsMultiplexResponse