_SetProfile.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_mechanism_controllers/SetProfileRequest.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 SetProfileRequest(genpy.Message):
00009   _md5sum = "309001fc196b0094f23b1ae2bd672fb2"
00010   _type = "pr2_mechanism_controllers/SetProfileRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """float64 UpperTurnaround
00013 float64 LowerTurnaround
00014 float64 upperDecelBuffer
00015 float64 lowerDecelBuffer
00016 float64 profile
00017 float64 period
00018 float64 amplitude
00019 float64 offset
00020 
00021 """
00022   __slots__ = ['UpperTurnaround','LowerTurnaround','upperDecelBuffer','lowerDecelBuffer','profile','period','amplitude','offset']
00023   _slot_types = ['float64','float64','float64','float64','float64','float64','float64','float64']
00024 
00025   def __init__(self, *args, **kwds):
00026     """
00027     Constructor. Any message fields that are implicitly/explicitly
00028     set to None will be assigned a default value. The recommend
00029     use is keyword arguments as this is more robust to future message
00030     changes.  You cannot mix in-order arguments and keyword arguments.
00031 
00032     The available fields are:
00033        UpperTurnaround,LowerTurnaround,upperDecelBuffer,lowerDecelBuffer,profile,period,amplitude,offset
00034 
00035     :param args: complete set of field values, in .msg order
00036     :param kwds: use keyword arguments corresponding to message field names
00037     to set specific fields.
00038     """
00039     if args or kwds:
00040       super(SetProfileRequest, self).__init__(*args, **kwds)
00041       #message fields cannot be None, assign default values for those that are
00042       if self.UpperTurnaround is None:
00043         self.UpperTurnaround = 0.
00044       if self.LowerTurnaround is None:
00045         self.LowerTurnaround = 0.
00046       if self.upperDecelBuffer is None:
00047         self.upperDecelBuffer = 0.
00048       if self.lowerDecelBuffer is None:
00049         self.lowerDecelBuffer = 0.
00050       if self.profile is None:
00051         self.profile = 0.
00052       if self.period is None:
00053         self.period = 0.
00054       if self.amplitude is None:
00055         self.amplitude = 0.
00056       if self.offset is None:
00057         self.offset = 0.
00058     else:
00059       self.UpperTurnaround = 0.
00060       self.LowerTurnaround = 0.
00061       self.upperDecelBuffer = 0.
00062       self.lowerDecelBuffer = 0.
00063       self.profile = 0.
00064       self.period = 0.
00065       self.amplitude = 0.
00066       self.offset = 0.
00067 
00068   def _get_types(self):
00069     """
00070     internal API method
00071     """
00072     return self._slot_types
00073 
00074   def serialize(self, buff):
00075     """
00076     serialize message into buffer
00077     :param buff: buffer, ``StringIO``
00078     """
00079     try:
00080       _x = self
00081       buff.write(_struct_8d.pack(_x.UpperTurnaround, _x.LowerTurnaround, _x.upperDecelBuffer, _x.lowerDecelBuffer, _x.profile, _x.period, _x.amplitude, _x.offset))
00082     except struct.error as se: self._check_types(se)
00083     except TypeError as te: self._check_types(te)
00084 
00085   def deserialize(self, str):
00086     """
00087     unpack serialized message in str into this message instance
00088     :param str: byte array of serialized message, ``str``
00089     """
00090     try:
00091       end = 0
00092       _x = self
00093       start = end
00094       end += 64
00095       (_x.UpperTurnaround, _x.LowerTurnaround, _x.upperDecelBuffer, _x.lowerDecelBuffer, _x.profile, _x.period, _x.amplitude, _x.offset,) = _struct_8d.unpack(str[start:end])
00096       return self
00097     except struct.error as e:
00098       raise genpy.DeserializationError(e) #most likely buffer underfill
00099 
00100 
00101   def serialize_numpy(self, buff, numpy):
00102     """
00103     serialize message with numpy array types into buffer
00104     :param buff: buffer, ``StringIO``
00105     :param numpy: numpy python module
00106     """
00107     try:
00108       _x = self
00109       buff.write(_struct_8d.pack(_x.UpperTurnaround, _x.LowerTurnaround, _x.upperDecelBuffer, _x.lowerDecelBuffer, _x.profile, _x.period, _x.amplitude, _x.offset))
00110     except struct.error as se: self._check_types(se)
00111     except TypeError as te: self._check_types(te)
00112 
00113   def deserialize_numpy(self, str, numpy):
00114     """
00115     unpack serialized message in str into this message instance using numpy for array types
00116     :param str: byte array of serialized message, ``str``
00117     :param numpy: numpy python module
00118     """
00119     try:
00120       end = 0
00121       _x = self
00122       start = end
00123       end += 64
00124       (_x.UpperTurnaround, _x.LowerTurnaround, _x.upperDecelBuffer, _x.lowerDecelBuffer, _x.profile, _x.period, _x.amplitude, _x.offset,) = _struct_8d.unpack(str[start:end])
00125       return self
00126     except struct.error as e:
00127       raise genpy.DeserializationError(e) #most likely buffer underfill
00128 
00129 _struct_I = genpy.struct_I
00130 _struct_8d = struct.Struct("<8d")
00131 """autogenerated by genpy from pr2_mechanism_controllers/SetProfileResponse.msg. Do not edit."""
00132 import sys
00133 python3 = True if sys.hexversion > 0x03000000 else False
00134 import genpy
00135 import struct
00136 
00137 
00138 class SetProfileResponse(genpy.Message):
00139   _md5sum = "be5310e7aa4c90cdee120add91648cee"
00140   _type = "pr2_mechanism_controllers/SetProfileResponse"
00141   _has_header = False #flag to mark the presence of a Header object
00142   _full_text = """float64 time
00143 
00144 
00145 
00146 """
00147   __slots__ = ['time']
00148   _slot_types = ['float64']
00149 
00150   def __init__(self, *args, **kwds):
00151     """
00152     Constructor. Any message fields that are implicitly/explicitly
00153     set to None will be assigned a default value. The recommend
00154     use is keyword arguments as this is more robust to future message
00155     changes.  You cannot mix in-order arguments and keyword arguments.
00156 
00157     The available fields are:
00158        time
00159 
00160     :param args: complete set of field values, in .msg order
00161     :param kwds: use keyword arguments corresponding to message field names
00162     to set specific fields.
00163     """
00164     if args or kwds:
00165       super(SetProfileResponse, self).__init__(*args, **kwds)
00166       #message fields cannot be None, assign default values for those that are
00167       if self.time is None:
00168         self.time = 0.
00169     else:
00170       self.time = 0.
00171 
00172   def _get_types(self):
00173     """
00174     internal API method
00175     """
00176     return self._slot_types
00177 
00178   def serialize(self, buff):
00179     """
00180     serialize message into buffer
00181     :param buff: buffer, ``StringIO``
00182     """
00183     try:
00184       buff.write(_struct_d.pack(self.time))
00185     except struct.error as se: self._check_types(se)
00186     except TypeError as te: self._check_types(te)
00187 
00188   def deserialize(self, str):
00189     """
00190     unpack serialized message in str into this message instance
00191     :param str: byte array of serialized message, ``str``
00192     """
00193     try:
00194       end = 0
00195       start = end
00196       end += 8
00197       (self.time,) = _struct_d.unpack(str[start:end])
00198       return self
00199     except struct.error as e:
00200       raise genpy.DeserializationError(e) #most likely buffer underfill
00201 
00202 
00203   def serialize_numpy(self, buff, numpy):
00204     """
00205     serialize message with numpy array types into buffer
00206     :param buff: buffer, ``StringIO``
00207     :param numpy: numpy python module
00208     """
00209     try:
00210       buff.write(_struct_d.pack(self.time))
00211     except struct.error as se: self._check_types(se)
00212     except TypeError as te: self._check_types(te)
00213 
00214   def deserialize_numpy(self, str, numpy):
00215     """
00216     unpack serialized message in str into this message instance using numpy for array types
00217     :param str: byte array of serialized message, ``str``
00218     :param numpy: numpy python module
00219     """
00220     try:
00221       end = 0
00222       start = end
00223       end += 8
00224       (self.time,) = _struct_d.unpack(str[start:end])
00225       return self
00226     except struct.error as e:
00227       raise genpy.DeserializationError(e) #most likely buffer underfill
00228 
00229 _struct_I = genpy.struct_I
00230 _struct_d = struct.Struct("<d")
00231 class SetProfile(object):
00232   _type          = 'pr2_mechanism_controllers/SetProfile'
00233   _md5sum = '2c429583cad60964651aba828d788a9a'
00234   _request_class  = SetProfileRequest
00235   _response_class = SetProfileResponse


pr2_mechanism_controllers
Author(s): Sachin Chita, John Hsu, Melonee Wise
autogenerated on Fri Jan 3 2014 11:41:46