def stream_config(cls): return [ CtdpfCklWfpRecoveredDataParticle.type(), CtdpfCklWfpRecoveredMetadataParticle.type(), CtdpfCklWfpSioMuleMetadataParticle.type(), CtdpfCklWfpSioMuleDataParticle.type() ]
def stream_config(cls): return [ CtdpfCklWfpRecoveredDataParticle.type(), CtdpfCklWfpRecoveredMetadataParticle.type(), CtdpfCklWfpTelemeteredDataParticle.type(), CtdpfCklWfpTelemeteredMetadataParticle.type() ]
def stream_config(cls): return [CtdpfCklWfpRecoveredDataParticle.type(), CtdpfCklWfpRecoveredMetadataParticle.type(), CtdpfCklWfpSioMuleMetadataParticle.type(), CtdpfCklWfpSioMuleDataParticle.type()]
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataTypeKey.CTDPF_CKL_WFP_RECOVERED: { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdpf_ckl_wfp', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { 'instrument_data_particle_class': CtdpfCklWfpRecoveredDataParticle, 'metadata_particle_class': CtdpfCklWfpRecoveredMetadataParticle }, }, DataTypeKey.CTDPF_CKL_WFP_TELEMETERED: { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdpf_ckl_wfp', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { 'instrument_data_particle_class': CtdpfCklWfpTelemeteredDataParticle, 'metadata_particle_class': CtdpfCklWfpTelemeteredMetadataParticle } } } self.recovered_start_state = { StateKey.POSITION: 0, StateKey.RECORDS_READ: 0, StateKey.METADATA_SENT: False } self.telemetered_start_state = { StateKey.POSITION: 0, StateKey.RECORDS_READ: 0, StateKey.METADATA_SENT: False } # Initialize this for later use. self.parser = None # Define test data particles and their associated timestamps which will be # compared with returned results timefields = struct.unpack('>II', '\x52\x4e\x75\x82\x52\x4e\x76\x9a') start_time = int(timefields[0]) end_time = int(timefields[1]) # even though there are only 3 samples in TEST_DATA, there are 270 samples in the original file, # so this needs to be used to determine the time increment for each time sample time_increment_3 = float(end_time - start_time) / 3.0 time_increment_270 = float(end_time - start_time) / 270.0 start_timestamp = self.calc_timestamp(start_time, time_increment_3, 0) start_timestamp_long = self.calc_timestamp(start_time, time_increment_270, 0) timestamp_2 = self.calc_timestamp(start_time, time_increment_3, 1) timestamp_2_long = self.calc_timestamp(start_time, time_increment_270, 1) timestamp_3 = self.calc_timestamp(start_time, time_increment_3, 2) timestamp_last = self.calc_timestamp(start_time, time_increment_270, 269) self.particle_meta = CtdpfCklWfpRecoveredMetadataParticle( (b"\x52\x4e\x75\x82\x52\x4e\x76\x9a", 3.0), internal_timestamp=start_timestamp) self.particle_meta_long = CtdpfCklWfpRecoveredMetadataParticle( (b"\x52\x4e\x75\x82\x52\x4e\x76\x9a", 270.0), internal_timestamp=start_timestamp_long) self.particle_a = CtdpfCklWfpRecoveredDataParticle( b"\x00\x1a\x88\x03\xe3\x3b\x00\x03\xeb\x0a\xc8", internal_timestamp=start_timestamp) self.particle_a_long = CtdpfCklWfpRecoveredDataParticle( b"\x00\x1a\x88\x03\xe3\x3b\x00\x03\xeb\x0a\xc8", internal_timestamp=start_timestamp_long) self.particle_b = CtdpfCklWfpRecoveredDataParticle( b"\x00\x1a\x8c\x03\xe2\xc0\x00\x03\xeb\x0a\x81", internal_timestamp=timestamp_2) self.particle_b_long = CtdpfCklWfpRecoveredDataParticle( b"\x00\x1a\x8c\x03\xe2\xc0\x00\x03\xeb\x0a\x81", internal_timestamp=timestamp_2_long) self.particle_c = CtdpfCklWfpRecoveredDataParticle( b"\x00\x1a\x90\x03\xe1\x5b\x00\x03\xeb\x0a\x65", internal_timestamp=timestamp_3) self.particle_last = CtdpfCklWfpRecoveredDataParticle( b"\x00\x1a\x8f\x03\xe5\x91\x00\x03\xeb\x0bS", internal_timestamp=timestamp_last) self.file_ingested_value = None self.state_callback_value = None self.publish_callback_value = None
def stream_config(cls): return [CtdpfCklWfpRecoveredDataParticle.type(), CtdpfCklWfpRecoveredMetadataParticle.type(), CtdpfCklWfpTelemeteredDataParticle.type(), CtdpfCklWfpTelemeteredMetadataParticle.type()]