_UserTimeStatus.py
Go to the documentation of this file.
00001 """autogenerated by genpy from applanix_msgs/UserTimeStatus.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import applanix_msgs.msg
00008 
00009 class UserTimeStatus(genpy.Message):
00010   _md5sum = "3d0128542d920da1a88ece6cf34151c4"
00011   _type = "applanix_msgs/UserTimeStatus"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """# Group 17
00014 TimeDistance td
00015 
00016 uint32 time_synch_rejections
00017 uint32 user_time_resynchs
00018 
00019 uint8 user_time_valid
00020 uint8 time_synch_message_received
00021 
00022 ================================================================================
00023 MSG: applanix_msgs/TimeDistance
00024 float64 time1
00025 float64 time2
00026 float64 distance
00027 uint8 time_types
00028 uint8 distance_type
00029 
00030 """
00031   __slots__ = ['td','time_synch_rejections','user_time_resynchs','user_time_valid','time_synch_message_received']
00032   _slot_types = ['applanix_msgs/TimeDistance','uint32','uint32','uint8','uint8']
00033 
00034   def __init__(self, *args, **kwds):
00035     """
00036     Constructor. Any message fields that are implicitly/explicitly
00037     set to None will be assigned a default value. The recommend
00038     use is keyword arguments as this is more robust to future message
00039     changes.  You cannot mix in-order arguments and keyword arguments.
00040 
00041     The available fields are:
00042        td,time_synch_rejections,user_time_resynchs,user_time_valid,time_synch_message_received
00043 
00044     :param args: complete set of field values, in .msg order
00045     :param kwds: use keyword arguments corresponding to message field names
00046     to set specific fields.
00047     """
00048     if args or kwds:
00049       super(UserTimeStatus, self).__init__(*args, **kwds)
00050       #message fields cannot be None, assign default values for those that are
00051       if self.td is None:
00052         self.td = applanix_msgs.msg.TimeDistance()
00053       if self.time_synch_rejections is None:
00054         self.time_synch_rejections = 0
00055       if self.user_time_resynchs is None:
00056         self.user_time_resynchs = 0
00057       if self.user_time_valid is None:
00058         self.user_time_valid = 0
00059       if self.time_synch_message_received is None:
00060         self.time_synch_message_received = 0
00061     else:
00062       self.td = applanix_msgs.msg.TimeDistance()
00063       self.time_synch_rejections = 0
00064       self.user_time_resynchs = 0
00065       self.user_time_valid = 0
00066       self.time_synch_message_received = 0
00067 
00068   def _get_types(self):
00069     """
00070     internal API method
00071     """
00072     return self._slot_types
00073 
00074   def serialize(self, buff):
00075     """
00076     serialize message into buffer
00077     :param buff: buffer, ``StringIO``
00078     """
00079     try:
00080       _x = self
00081       buff.write(_struct_3d2B2I2B.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.time_synch_rejections, _x.user_time_resynchs, _x.user_time_valid, _x.time_synch_message_received))
00082     except struct.error as se: self._check_types(se)
00083     except TypeError as te: self._check_types(te)
00084 
00085   def deserialize(self, str):
00086     """
00087     unpack serialized message in str into this message instance
00088     :param str: byte array of serialized message, ``str``
00089     """
00090     try:
00091       if self.td is None:
00092         self.td = applanix_msgs.msg.TimeDistance()
00093       end = 0
00094       _x = self
00095       start = end
00096       end += 36
00097       (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.time_synch_rejections, _x.user_time_resynchs, _x.user_time_valid, _x.time_synch_message_received,) = _struct_3d2B2I2B.unpack(str[start:end])
00098       return self
00099     except struct.error as e:
00100       raise genpy.DeserializationError(e) #most likely buffer underfill
00101 
00102 
00103   def serialize_numpy(self, buff, numpy):
00104     """
00105     serialize message with numpy array types into buffer
00106     :param buff: buffer, ``StringIO``
00107     :param numpy: numpy python module
00108     """
00109     try:
00110       _x = self
00111       buff.write(_struct_3d2B2I2B.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.time_synch_rejections, _x.user_time_resynchs, _x.user_time_valid, _x.time_synch_message_received))
00112     except struct.error as se: self._check_types(se)
00113     except TypeError as te: self._check_types(te)
00114 
00115   def deserialize_numpy(self, str, numpy):
00116     """
00117     unpack serialized message in str into this message instance using numpy for array types
00118     :param str: byte array of serialized message, ``str``
00119     :param numpy: numpy python module
00120     """
00121     try:
00122       if self.td is None:
00123         self.td = applanix_msgs.msg.TimeDistance()
00124       end = 0
00125       _x = self
00126       start = end
00127       end += 36
00128       (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.time_synch_rejections, _x.user_time_resynchs, _x.user_time_valid, _x.time_synch_message_received,) = _struct_3d2B2I2B.unpack(str[start:end])
00129       return self
00130     except struct.error as e:
00131       raise genpy.DeserializationError(e) #most likely buffer underfill
00132 
00133 _struct_I = genpy.struct_I
00134 _struct_3d2B2I2B = struct.Struct("<3d2B2I2B")


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