Go to the documentation of this file.00001 """autogenerated by genpy from openrave_msgs/controller_sessionRequest.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 controller_sessionRequest(genpy.Message):
00009 _md5sum = "ca3d6090c44a4764a020ffda5d1700fb"
00010 _type = "openrave_msgs/controller_sessionRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015
00016
00017
00018
00019 int32 sessionid
00020
00021 uint8 requestaccess
00022 uint8 Access_Read = 0
00023 uint8 Access_Control = 1
00024 uint8 Access_ForceControl = 2
00025
00026 """
00027
00028 Access_Read = 0
00029 Access_Control = 1
00030 Access_ForceControl = 2
00031
00032 __slots__ = ['sessionid','requestaccess']
00033 _slot_types = ['int32','uint8']
00034
00035 def __init__(self, *args, **kwds):
00036 """
00037 Constructor. Any message fields that are implicitly/explicitly
00038 set to None will be assigned a default value. The recommend
00039 use is keyword arguments as this is more robust to future message
00040 changes. You cannot mix in-order arguments and keyword arguments.
00041
00042 The available fields are:
00043 sessionid,requestaccess
00044
00045 :param args: complete set of field values, in .msg order
00046 :param kwds: use keyword arguments corresponding to message field names
00047 to set specific fields.
00048 """
00049 if args or kwds:
00050 super(controller_sessionRequest, self).__init__(*args, **kwds)
00051
00052 if self.sessionid is None:
00053 self.sessionid = 0
00054 if self.requestaccess is None:
00055 self.requestaccess = 0
00056 else:
00057 self.sessionid = 0
00058 self.requestaccess = 0
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 _x = self
00073 buff.write(_struct_iB.pack(_x.sessionid, _x.requestaccess))
00074 except struct.error as se: self._check_types(se)
00075 except TypeError as te: self._check_types(te)
00076
00077 def deserialize(self, str):
00078 """
00079 unpack serialized message in str into this message instance
00080 :param str: byte array of serialized message, ``str``
00081 """
00082 try:
00083 end = 0
00084 _x = self
00085 start = end
00086 end += 5
00087 (_x.sessionid, _x.requestaccess,) = _struct_iB.unpack(str[start:end])
00088 return self
00089 except struct.error as e:
00090 raise genpy.DeserializationError(e)
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 _x = self
00101 buff.write(_struct_iB.pack(_x.sessionid, _x.requestaccess))
00102 except struct.error as se: self._check_types(se)
00103 except TypeError as te: self._check_types(te)
00104
00105 def deserialize_numpy(self, str, numpy):
00106 """
00107 unpack serialized message in str into this message instance using numpy for array types
00108 :param str: byte array of serialized message, ``str``
00109 :param numpy: numpy python module
00110 """
00111 try:
00112 end = 0
00113 _x = self
00114 start = end
00115 end += 5
00116 (_x.sessionid, _x.requestaccess,) = _struct_iB.unpack(str[start:end])
00117 return self
00118 except struct.error as e:
00119 raise genpy.DeserializationError(e)
00120
00121 _struct_I = genpy.struct_I
00122 _struct_iB = struct.Struct("<iB")
00123 """autogenerated by genpy from openrave_msgs/controller_sessionResponse.msg. Do not edit."""
00124 import sys
00125 python3 = True if sys.hexversion > 0x03000000 else False
00126 import genpy
00127 import struct
00128
00129
00130 class controller_sessionResponse(genpy.Message):
00131 _md5sum = "8e5dc427c491661ad151bd29bea23253"
00132 _type = "openrave_msgs/controller_sessionResponse"
00133 _has_header = False
00134 _full_text = """int32 sessionid
00135
00136
00137 """
00138 __slots__ = ['sessionid']
00139 _slot_types = ['int32']
00140
00141 def __init__(self, *args, **kwds):
00142 """
00143 Constructor. Any message fields that are implicitly/explicitly
00144 set to None will be assigned a default value. The recommend
00145 use is keyword arguments as this is more robust to future message
00146 changes. You cannot mix in-order arguments and keyword arguments.
00147
00148 The available fields are:
00149 sessionid
00150
00151 :param args: complete set of field values, in .msg order
00152 :param kwds: use keyword arguments corresponding to message field names
00153 to set specific fields.
00154 """
00155 if args or kwds:
00156 super(controller_sessionResponse, self).__init__(*args, **kwds)
00157
00158 if self.sessionid is None:
00159 self.sessionid = 0
00160 else:
00161 self.sessionid = 0
00162
00163 def _get_types(self):
00164 """
00165 internal API method
00166 """
00167 return self._slot_types
00168
00169 def serialize(self, buff):
00170 """
00171 serialize message into buffer
00172 :param buff: buffer, ``StringIO``
00173 """
00174 try:
00175 buff.write(_struct_i.pack(self.sessionid))
00176 except struct.error as se: self._check_types(se)
00177 except TypeError as te: self._check_types(te)
00178
00179 def deserialize(self, str):
00180 """
00181 unpack serialized message in str into this message instance
00182 :param str: byte array of serialized message, ``str``
00183 """
00184 try:
00185 end = 0
00186 start = end
00187 end += 4
00188 (self.sessionid,) = _struct_i.unpack(str[start:end])
00189 return self
00190 except struct.error as e:
00191 raise genpy.DeserializationError(e)
00192
00193
00194 def serialize_numpy(self, buff, numpy):
00195 """
00196 serialize message with numpy array types into buffer
00197 :param buff: buffer, ``StringIO``
00198 :param numpy: numpy python module
00199 """
00200 try:
00201 buff.write(_struct_i.pack(self.sessionid))
00202 except struct.error as se: self._check_types(se)
00203 except TypeError as te: self._check_types(te)
00204
00205 def deserialize_numpy(self, str, numpy):
00206 """
00207 unpack serialized message in str into this message instance using numpy for array types
00208 :param str: byte array of serialized message, ``str``
00209 :param numpy: numpy python module
00210 """
00211 try:
00212 end = 0
00213 start = end
00214 end += 4
00215 (self.sessionid,) = _struct_i.unpack(str[start:end])
00216 return self
00217 except struct.error as e:
00218 raise genpy.DeserializationError(e)
00219
00220 _struct_I = genpy.struct_I
00221 _struct_i = struct.Struct("<i")
00222 class controller_session(object):
00223 _type = 'openrave_msgs/controller_session'
00224 _md5sum = 'a597146691d9506f2c363ba5c9956ee5'
00225 _request_class = controller_sessionRequest
00226 _response_class = controller_sessionResponse