_head_ctrl.py
Go to the documentation of this file.
00001 """autogenerated by genpy from rovio_shared/head_ctrlRequest.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 head_ctrlRequest(genpy.Message):
00009   _md5sum = "522f8591c845ace5ac8c5c5852170802"
00010   _type = "rovio_shared/head_ctrlRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 int8 HEAD_UP=11
00014 int8 HEAD_DOWN=12
00015 int8 HEAD_MIDDLE=13
00016 
00017 int8 head_pos
00018 
00019 """
00020   # Pseudo-constants
00021   HEAD_UP = 11
00022   HEAD_DOWN = 12
00023   HEAD_MIDDLE = 13
00024 
00025   __slots__ = ['head_pos']
00026   _slot_types = ['int8']
00027 
00028   def __init__(self, *args, **kwds):
00029     """
00030     Constructor. Any message fields that are implicitly/explicitly
00031     set to None will be assigned a default value. The recommend
00032     use is keyword arguments as this is more robust to future message
00033     changes.  You cannot mix in-order arguments and keyword arguments.
00034 
00035     The available fields are:
00036        head_pos
00037 
00038     :param args: complete set of field values, in .msg order
00039     :param kwds: use keyword arguments corresponding to message field names
00040     to set specific fields.
00041     """
00042     if args or kwds:
00043       super(head_ctrlRequest, self).__init__(*args, **kwds)
00044       #message fields cannot be None, assign default values for those that are
00045       if self.head_pos is None:
00046         self.head_pos = 0
00047     else:
00048       self.head_pos = 0
00049 
00050   def _get_types(self):
00051     """
00052     internal API method
00053     """
00054     return self._slot_types
00055 
00056   def serialize(self, buff):
00057     """
00058     serialize message into buffer
00059     :param buff: buffer, ``StringIO``
00060     """
00061     try:
00062       buff.write(_struct_b.pack(self.head_pos))
00063     except struct.error as se: self._check_types(se)
00064     except TypeError as te: self._check_types(te)
00065 
00066   def deserialize(self, str):
00067     """
00068     unpack serialized message in str into this message instance
00069     :param str: byte array of serialized message, ``str``
00070     """
00071     try:
00072       end = 0
00073       start = end
00074       end += 1
00075       (self.head_pos,) = _struct_b.unpack(str[start:end])
00076       return self
00077     except struct.error as e:
00078       raise genpy.DeserializationError(e) #most likely buffer underfill
00079 
00080 
00081   def serialize_numpy(self, buff, numpy):
00082     """
00083     serialize message with numpy array types into buffer
00084     :param buff: buffer, ``StringIO``
00085     :param numpy: numpy python module
00086     """
00087     try:
00088       buff.write(_struct_b.pack(self.head_pos))
00089     except struct.error as se: self._check_types(se)
00090     except TypeError as te: self._check_types(te)
00091 
00092   def deserialize_numpy(self, str, numpy):
00093     """
00094     unpack serialized message in str into this message instance using numpy for array types
00095     :param str: byte array of serialized message, ``str``
00096     :param numpy: numpy python module
00097     """
00098     try:
00099       end = 0
00100       start = end
00101       end += 1
00102       (self.head_pos,) = _struct_b.unpack(str[start:end])
00103       return self
00104     except struct.error as e:
00105       raise genpy.DeserializationError(e) #most likely buffer underfill
00106 
00107 _struct_I = genpy.struct_I
00108 _struct_b = struct.Struct("<b")
00109 """autogenerated by genpy from rovio_shared/head_ctrlResponse.msg. Do not edit."""
00110 import sys
00111 python3 = True if sys.hexversion > 0x03000000 else False
00112 import genpy
00113 import struct
00114 
00115 
00116 class head_ctrlResponse(genpy.Message):
00117   _md5sum = "208ac5fdc497ef2f1bd168d28a2b5e05"
00118   _type = "rovio_shared/head_ctrlResponse"
00119   _has_header = False #flag to mark the presence of a Header object
00120   _full_text = """
00121 int8 SUCCESS=0
00122 int8 FAILURE=1
00123 int8 ROBOT_BUSY=2
00124 int8 FEATURE_NOT_IMPLEMENTED=3
00125 int8 UNKNOWN_CGI_ACTION=4
00126 int8 NO_NS_SIGNAL=5
00127 int8 NO_EMPTY_PATH_AVAILABLE=6
00128 int8 FAILED_TO_READ_PATH=7
00129 int8 PATH_BASEADDRESS_NOT_INITIALIZED=8
00130 int8 PATH_NOT_FOUND=9
00131 int8 PATH_NAME_NOT_SPECIFIED=10
00132 int8 NOT_RECORDING_PATH=11
00133 int8 FLASH_NOT_INITIALIZED=12
00134 int8 FAILED_TO_DELETE_PATH=13
00135 int8 FAILED_TO_READ_FROM_FLASH=14
00136 int8 FAILED_TO_WRITE_TO_FLASH=15
00137 int8 FLASH_NOT_READY=16
00138 int8 NO_MEMORY_AVAILABLE=17
00139 int8 NO_MCU_PORT_AVAILABLE=18
00140 int8 NO_NS_PORT_AVAILABLE=19
00141 int8 NS_PACKET_CHECKSUM_ERROR=20
00142 int8 NS_UART_READ_ERROR=21
00143 int8 PARAMETER_OUTOFRANGE=22
00144 int8 NO_PARAMETER=23
00145 
00146 int8 response
00147 
00148 
00149 """
00150   # Pseudo-constants
00151   SUCCESS = 0
00152   FAILURE = 1
00153   ROBOT_BUSY = 2
00154   FEATURE_NOT_IMPLEMENTED = 3
00155   UNKNOWN_CGI_ACTION = 4
00156   NO_NS_SIGNAL = 5
00157   NO_EMPTY_PATH_AVAILABLE = 6
00158   FAILED_TO_READ_PATH = 7
00159   PATH_BASEADDRESS_NOT_INITIALIZED = 8
00160   PATH_NOT_FOUND = 9
00161   PATH_NAME_NOT_SPECIFIED = 10
00162   NOT_RECORDING_PATH = 11
00163   FLASH_NOT_INITIALIZED = 12
00164   FAILED_TO_DELETE_PATH = 13
00165   FAILED_TO_READ_FROM_FLASH = 14
00166   FAILED_TO_WRITE_TO_FLASH = 15
00167   FLASH_NOT_READY = 16
00168   NO_MEMORY_AVAILABLE = 17
00169   NO_MCU_PORT_AVAILABLE = 18
00170   NO_NS_PORT_AVAILABLE = 19
00171   NS_PACKET_CHECKSUM_ERROR = 20
00172   NS_UART_READ_ERROR = 21
00173   PARAMETER_OUTOFRANGE = 22
00174   NO_PARAMETER = 23
00175 
00176   __slots__ = ['response']
00177   _slot_types = ['int8']
00178 
00179   def __init__(self, *args, **kwds):
00180     """
00181     Constructor. Any message fields that are implicitly/explicitly
00182     set to None will be assigned a default value. The recommend
00183     use is keyword arguments as this is more robust to future message
00184     changes.  You cannot mix in-order arguments and keyword arguments.
00185 
00186     The available fields are:
00187        response
00188 
00189     :param args: complete set of field values, in .msg order
00190     :param kwds: use keyword arguments corresponding to message field names
00191     to set specific fields.
00192     """
00193     if args or kwds:
00194       super(head_ctrlResponse, self).__init__(*args, **kwds)
00195       #message fields cannot be None, assign default values for those that are
00196       if self.response is None:
00197         self.response = 0
00198     else:
00199       self.response = 0
00200 
00201   def _get_types(self):
00202     """
00203     internal API method
00204     """
00205     return self._slot_types
00206 
00207   def serialize(self, buff):
00208     """
00209     serialize message into buffer
00210     :param buff: buffer, ``StringIO``
00211     """
00212     try:
00213       buff.write(_struct_b.pack(self.response))
00214     except struct.error as se: self._check_types(se)
00215     except TypeError as te: self._check_types(te)
00216 
00217   def deserialize(self, str):
00218     """
00219     unpack serialized message in str into this message instance
00220     :param str: byte array of serialized message, ``str``
00221     """
00222     try:
00223       end = 0
00224       start = end
00225       end += 1
00226       (self.response,) = _struct_b.unpack(str[start:end])
00227       return self
00228     except struct.error as e:
00229       raise genpy.DeserializationError(e) #most likely buffer underfill
00230 
00231 
00232   def serialize_numpy(self, buff, numpy):
00233     """
00234     serialize message with numpy array types into buffer
00235     :param buff: buffer, ``StringIO``
00236     :param numpy: numpy python module
00237     """
00238     try:
00239       buff.write(_struct_b.pack(self.response))
00240     except struct.error as se: self._check_types(se)
00241     except TypeError as te: self._check_types(te)
00242 
00243   def deserialize_numpy(self, str, numpy):
00244     """
00245     unpack serialized message in str into this message instance using numpy for array types
00246     :param str: byte array of serialized message, ``str``
00247     :param numpy: numpy python module
00248     """
00249     try:
00250       end = 0
00251       start = end
00252       end += 1
00253       (self.response,) = _struct_b.unpack(str[start:end])
00254       return self
00255     except struct.error as e:
00256       raise genpy.DeserializationError(e) #most likely buffer underfill
00257 
00258 _struct_I = genpy.struct_I
00259 _struct_b = struct.Struct("<b")
00260 class head_ctrl(object):
00261   _type          = 'rovio_shared/head_ctrl'
00262   _md5sum = '8fc91ecf3dc7f4ab832a70ed14ec95b7'
00263   _request_class  = head_ctrlRequest
00264   _response_class = head_ctrlResponse


rovio_shared
Author(s): Russell Toris
autogenerated on Sat Dec 28 2013 17:38:45