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


applanix_msgs
Author(s): Mike Purvis
autogenerated on Thu Jan 2 2014 11:04:51