$search
00001 """autogenerated by genmsg_py from EventSetup.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class EventSetup(roslib.message.Message): 00007 _md5sum = "74cd1b437edb1231c0f1f35556a051a7" 00008 _type = "applanix_msgs/EventSetup" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# Msg 33 00011 uint16 transaction 00012 00013 uint8 TRIGGER_POSITIVE_EDGE=0 00014 uint8 TRIGGER_NEGATIVE_EDGE=1 00015 uint8 event_1_trigger 00016 uint8 event_2_trigger 00017 uint8 event_3_trigger 00018 uint8 event_4_trigger 00019 uint8 event_5_trigger 00020 uint8 event_6_trigger 00021 00022 uint16 event_1_guard_time 00023 uint16 event_2_guard_time 00024 uint16 event_3_guard_time 00025 uint16 event_4_guard_time 00026 uint16 event_5_guard_time 00027 uint16 event_6_guard_time 00028 00029 uint8 POLARITY_POSITIVE_PULSE=0 00030 uint8 POLARITY_NEGATIVE_PULSE=1 00031 uint8 POLARITY_PASS_THROUGH=2 00032 uint8 pps_out_polarity 00033 00034 """ 00035 # Pseudo-constants 00036 TRIGGER_POSITIVE_EDGE = 0 00037 TRIGGER_NEGATIVE_EDGE = 1 00038 POLARITY_POSITIVE_PULSE = 0 00039 POLARITY_NEGATIVE_PULSE = 1 00040 POLARITY_PASS_THROUGH = 2 00041 00042 __slots__ = ['transaction','event_1_trigger','event_2_trigger','event_3_trigger','event_4_trigger','event_5_trigger','event_6_trigger','event_1_guard_time','event_2_guard_time','event_3_guard_time','event_4_guard_time','event_5_guard_time','event_6_guard_time','pps_out_polarity'] 00043 _slot_types = ['uint16','uint8','uint8','uint8','uint8','uint8','uint8','uint16','uint16','uint16','uint16','uint16','uint16','uint8'] 00044 00045 def __init__(self, *args, **kwds): 00046 """ 00047 Constructor. Any message fields that are implicitly/explicitly 00048 set to None will be assigned a default value. The recommend 00049 use is keyword arguments as this is more robust to future message 00050 changes. You cannot mix in-order arguments and keyword arguments. 00051 00052 The available fields are: 00053 transaction,event_1_trigger,event_2_trigger,event_3_trigger,event_4_trigger,event_5_trigger,event_6_trigger,event_1_guard_time,event_2_guard_time,event_3_guard_time,event_4_guard_time,event_5_guard_time,event_6_guard_time,pps_out_polarity 00054 00055 @param args: complete set of field values, in .msg order 00056 @param kwds: use keyword arguments corresponding to message field names 00057 to set specific fields. 00058 """ 00059 if args or kwds: 00060 super(EventSetup, self).__init__(*args, **kwds) 00061 #message fields cannot be None, assign default values for those that are 00062 if self.transaction is None: 00063 self.transaction = 0 00064 if self.event_1_trigger is None: 00065 self.event_1_trigger = 0 00066 if self.event_2_trigger is None: 00067 self.event_2_trigger = 0 00068 if self.event_3_trigger is None: 00069 self.event_3_trigger = 0 00070 if self.event_4_trigger is None: 00071 self.event_4_trigger = 0 00072 if self.event_5_trigger is None: 00073 self.event_5_trigger = 0 00074 if self.event_6_trigger is None: 00075 self.event_6_trigger = 0 00076 if self.event_1_guard_time is None: 00077 self.event_1_guard_time = 0 00078 if self.event_2_guard_time is None: 00079 self.event_2_guard_time = 0 00080 if self.event_3_guard_time is None: 00081 self.event_3_guard_time = 0 00082 if self.event_4_guard_time is None: 00083 self.event_4_guard_time = 0 00084 if self.event_5_guard_time is None: 00085 self.event_5_guard_time = 0 00086 if self.event_6_guard_time is None: 00087 self.event_6_guard_time = 0 00088 if self.pps_out_polarity is None: 00089 self.pps_out_polarity = 0 00090 else: 00091 self.transaction = 0 00092 self.event_1_trigger = 0 00093 self.event_2_trigger = 0 00094 self.event_3_trigger = 0 00095 self.event_4_trigger = 0 00096 self.event_5_trigger = 0 00097 self.event_6_trigger = 0 00098 self.event_1_guard_time = 0 00099 self.event_2_guard_time = 0 00100 self.event_3_guard_time = 0 00101 self.event_4_guard_time = 0 00102 self.event_5_guard_time = 0 00103 self.event_6_guard_time = 0 00104 self.pps_out_polarity = 0 00105 00106 def _get_types(self): 00107 """ 00108 internal API method 00109 """ 00110 return self._slot_types 00111 00112 def serialize(self, buff): 00113 """ 00114 serialize message into buffer 00115 @param buff: buffer 00116 @type buff: StringIO 00117 """ 00118 try: 00119 _x = self 00120 buff.write(_struct_H6B6HB.pack(_x.transaction, _x.event_1_trigger, _x.event_2_trigger, _x.event_3_trigger, _x.event_4_trigger, _x.event_5_trigger, _x.event_6_trigger, _x.event_1_guard_time, _x.event_2_guard_time, _x.event_3_guard_time, _x.event_4_guard_time, _x.event_5_guard_time, _x.event_6_guard_time, _x.pps_out_polarity)) 00121 except struct.error as se: self._check_types(se) 00122 except TypeError as te: self._check_types(te) 00123 00124 def deserialize(self, str): 00125 """ 00126 unpack serialized message in str into this message instance 00127 @param str: byte array of serialized message 00128 @type str: str 00129 """ 00130 try: 00131 end = 0 00132 _x = self 00133 start = end 00134 end += 21 00135 (_x.transaction, _x.event_1_trigger, _x.event_2_trigger, _x.event_3_trigger, _x.event_4_trigger, _x.event_5_trigger, _x.event_6_trigger, _x.event_1_guard_time, _x.event_2_guard_time, _x.event_3_guard_time, _x.event_4_guard_time, _x.event_5_guard_time, _x.event_6_guard_time, _x.pps_out_polarity,) = _struct_H6B6HB.unpack(str[start:end]) 00136 return self 00137 except struct.error as e: 00138 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00139 00140 00141 def serialize_numpy(self, buff, numpy): 00142 """ 00143 serialize message with numpy array types into buffer 00144 @param buff: buffer 00145 @type buff: StringIO 00146 @param numpy: numpy python module 00147 @type numpy module 00148 """ 00149 try: 00150 _x = self 00151 buff.write(_struct_H6B6HB.pack(_x.transaction, _x.event_1_trigger, _x.event_2_trigger, _x.event_3_trigger, _x.event_4_trigger, _x.event_5_trigger, _x.event_6_trigger, _x.event_1_guard_time, _x.event_2_guard_time, _x.event_3_guard_time, _x.event_4_guard_time, _x.event_5_guard_time, _x.event_6_guard_time, _x.pps_out_polarity)) 00152 except struct.error as se: self._check_types(se) 00153 except TypeError as te: self._check_types(te) 00154 00155 def deserialize_numpy(self, str, numpy): 00156 """ 00157 unpack serialized message in str into this message instance using numpy for array types 00158 @param str: byte array of serialized message 00159 @type str: str 00160 @param numpy: numpy python module 00161 @type numpy: module 00162 """ 00163 try: 00164 end = 0 00165 _x = self 00166 start = end 00167 end += 21 00168 (_x.transaction, _x.event_1_trigger, _x.event_2_trigger, _x.event_3_trigger, _x.event_4_trigger, _x.event_5_trigger, _x.event_6_trigger, _x.event_1_guard_time, _x.event_2_guard_time, _x.event_3_guard_time, _x.event_4_guard_time, _x.event_5_guard_time, _x.event_6_guard_time, _x.pps_out_polarity,) = _struct_H6B6HB.unpack(str[start:end]) 00169 return self 00170 except struct.error as e: 00171 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00172 00173 _struct_I = roslib.message.struct_I 00174 _struct_H6B6HB = struct.Struct("<H6B6HB")