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