$search
00001 """autogenerated by genmsg_py from ProgramControl.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class ProgramControl(roslib.message.Message): 00007 _md5sum = "dab563586b7a82ad1a25ceacdb3b587b" 00008 _type = "applanix_msgs/ProgramControl" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# Msg 90 00011 uint16 transaction 00012 00013 uint16 CONTROL_ALIVE=0 00014 uint16 CONTROL_TERMINATE_TCPIP=1 00015 uint16 CONTROL_RESET_GAMS=100 00016 uint16 CONTROL_RESET_POS=101 00017 uint16 CONTROL_SHUTDOWN_POS=102 00018 uint16 control 00019 00020 """ 00021 # Pseudo-constants 00022 CONTROL_ALIVE = 0 00023 CONTROL_TERMINATE_TCPIP = 1 00024 CONTROL_RESET_GAMS = 100 00025 CONTROL_RESET_POS = 101 00026 CONTROL_SHUTDOWN_POS = 102 00027 00028 __slots__ = ['transaction','control'] 00029 _slot_types = ['uint16','uint16'] 00030 00031 def __init__(self, *args, **kwds): 00032 """ 00033 Constructor. Any message fields that are implicitly/explicitly 00034 set to None will be assigned a default value. The recommend 00035 use is keyword arguments as this is more robust to future message 00036 changes. You cannot mix in-order arguments and keyword arguments. 00037 00038 The available fields are: 00039 transaction,control 00040 00041 @param args: complete set of field values, in .msg order 00042 @param kwds: use keyword arguments corresponding to message field names 00043 to set specific fields. 00044 """ 00045 if args or kwds: 00046 super(ProgramControl, self).__init__(*args, **kwds) 00047 #message fields cannot be None, assign default values for those that are 00048 if self.transaction is None: 00049 self.transaction = 0 00050 if self.control is None: 00051 self.control = 0 00052 else: 00053 self.transaction = 0 00054 self.control = 0 00055 00056 def _get_types(self): 00057 """ 00058 internal API method 00059 """ 00060 return self._slot_types 00061 00062 def serialize(self, buff): 00063 """ 00064 serialize message into buffer 00065 @param buff: buffer 00066 @type buff: StringIO 00067 """ 00068 try: 00069 _x = self 00070 buff.write(_struct_2H.pack(_x.transaction, _x.control)) 00071 except struct.error as se: self._check_types(se) 00072 except TypeError as te: self._check_types(te) 00073 00074 def deserialize(self, str): 00075 """ 00076 unpack serialized message in str into this message instance 00077 @param str: byte array of serialized message 00078 @type str: str 00079 """ 00080 try: 00081 end = 0 00082 _x = self 00083 start = end 00084 end += 4 00085 (_x.transaction, _x.control,) = _struct_2H.unpack(str[start:end]) 00086 return self 00087 except struct.error as e: 00088 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00089 00090 00091 def serialize_numpy(self, buff, numpy): 00092 """ 00093 serialize message with numpy array types into buffer 00094 @param buff: buffer 00095 @type buff: StringIO 00096 @param numpy: numpy python module 00097 @type numpy module 00098 """ 00099 try: 00100 _x = self 00101 buff.write(_struct_2H.pack(_x.transaction, _x.control)) 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 00109 @type str: str 00110 @param numpy: numpy python module 00111 @type numpy: module 00112 """ 00113 try: 00114 end = 0 00115 _x = self 00116 start = end 00117 end += 4 00118 (_x.transaction, _x.control,) = _struct_2H.unpack(str[start:end]) 00119 return self 00120 except struct.error as e: 00121 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00122 00123 _struct_I = roslib.message.struct_I 00124 _struct_2H = struct.Struct("<2H")