def setUp(self): ParserUnitTestCase.setUp(self) self._parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.velpt_ab_particles', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { VelptAbParticleClassKey.METADATA_PARTICLE_CLASS: VelptAbDiagnosticsHeaderParticle, VelptAbParticleClassKey.DIAGNOSTICS_PARTICLE_CLASS: VelptAbDiagnosticsDataParticle, VelptAbParticleClassKey.INSTRUMENT_METADATA_PARTICLE_CLASS: VelptAbInstrumentMetadataParticle, VelptAbParticleClassKey.INSTRUMENT_PARTICLE_CLASS: VelptAbInstrumentDataParticle } } self._incomplete_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.velpt_ab_dcl_particles', DataSetDriverConfigKeys.PARTICLE_CLASS: None } self._bad_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.velpt_ab_particles', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {} }
def setUp(self): ParserUnitTestCase.setUp(self) self.config = \ { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.adcps_jln_sio', DataSetDriverConfigKeys.PARTICLE_CLASS: 'AdcpsJlnSioDataParticle' }
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdpf_ckl_wfp_sio', DataSetDriverConfigKeys.PARTICLE_CLASS: ['CtdpfCklWfpSioDataParticle', 'CtdpfCklWfpSioMetadataParticle'] } # 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]) # As there are only three records in the test data, divide by 3. time_increment = float(end_time - start_time) / 3.0 self.start_timestamp = self.calc_timestamp(start_time, time_increment, 0) self.particle_meta = CtdpfCklWfpSioMetadataParticle(EXPECTED_TIME_STAMP, internal_timestamp=self.start_timestamp) self.particle_meta_ndf = CtdpfCklWfpSioMetadataParticle(EXPECTED_TIME_STAMP_ndf, internal_timestamp=self.start_timestamp) self.particle_a = CtdpfCklWfpSioDataParticle(EXPECTED_VALUES_1, internal_timestamp=self.start_timestamp) self.timestamp_2 = self.calc_timestamp(start_time, time_increment, 1) self.particle_b = CtdpfCklWfpSioDataParticle(EXPECTED_VALUES_2, internal_timestamp=self.timestamp_2) timestamp_3 = self.calc_timestamp(start_time, time_increment, 2) self.particle_c = CtdpfCklWfpSioDataParticle(EXPECTED_VALUES_3, internal_timestamp=timestamp_3)
def setUp(self): ParserUnitTestCase.setUp(self) self._recov_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.wfp_eng__stc_imodem_particles', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { 'status_data_particle_class': WfpEngStcImodemStatusRecoveredDataParticle, 'start_data_particle_class': WfpEngStcImodemStartRecoveredDataParticle, 'engineering_data_particle_class': WfpEngStcImodemEngineeringRecoveredDataParticle } } self._telem_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.wfp_eng__stc_imodem_particles', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { 'status_data_particle_class': WfpEngStcImodemStatusTelemeteredDataParticle, 'start_data_particle_class': WfpEngStcImodemStartTelemeteredDataParticle, 'engineering_data_particle_class': WfpEngStcImodemEngineeringTelemeteredDataParticle } }
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.dosta_ln_wfp_sio', DataSetDriverConfigKeys.PARTICLE_CLASS: 'DostaLnWfpSioDataParticle' } # the hex characters used to create the expected particles below were extracted # from the first 4 E records in the file node58p1_0.we_wfp.dat by hand # and used here to verify the correct raw data was used to create the particles self.timestamp_1a = self.timestamp_to_ntp(b'\x52\x04\xCC\x2D') self.particle_1a = DostaLnWfpSioDataParticle( b'\x52\x04\xCC\x2D\x00\x00\x00\x00\x41\x3B\x6F\xD2\x00\x00\x00' b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x60\x02\x3E', internal_timestamp=self.timestamp_1a) self.timestamp_1b = self.timestamp_to_ntp(b'\x52\x04\xCD\x70') self.particle_1b = DostaLnWfpSioDataParticle( b'\x52\x04\xCD\x70\x43\x66\x2F\x90\x41\x32\xDE\x01\x45\x7D\xA7' b'\x85\x43\x13\x9F\x7D\x3F\xBF\xBE\x77\x00\x37\x00\x61\x02\x3C', internal_timestamp=self.timestamp_1b) self.timestamp_1c = self.timestamp_to_ntp(b'\x52\x04\xCE\xB0') self.particle_1c = DostaLnWfpSioDataParticle( b'\x52\x04\xCE\xB0\x43\x6D\xEA\x30\x41\x2F\xE5\xC9\x45\x78\x56' b'\x66\x43\x12\x94\x39\x3F\xBF\x9D\xB2\x00\x37\x00\x73\x02\x3B', internal_timestamp=self.timestamp_1c) self.timestamp_1d = self.timestamp_to_ntp(b'\x52\x04\xCF\xF0') self.particle_1d = DostaLnWfpSioDataParticle( b'\x52\x04\xCF\xF0\x43\x6E\x7C\x78\x41\x2E\xF4\xF1\x45\x73\x1B' b'\x0A\x43\x11\x9F\x7D\x3F\xBF\x7C\xEE\x00\x37\x00\x5E\x02\x3B', internal_timestamp=self.timestamp_1d)
def setUp(self): ParserUnitTestCase.setUp(self) self._recovered_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.phsen_abcdef_imodem_particles', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { PhsenAbcdefImodemParticleClassKey.METADATA_PARTICLE_CLASS: PhsenAbcdefImodemMetadataRecoveredDataParticle, PhsenAbcdefImodemParticleClassKey.CONTROL_PARTICLE_CLASS: PhsenAbcdefImodemControlRecoveredDataParticle, PhsenAbcdefImodemParticleClassKey.INSTRUMENT_PARTICLE_CLASS: PhsenAbcdefImodemInstrumentRecoveredDataParticle, } } self._telemetered_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.phsen_abcdef_imodem_particles', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { PhsenAbcdefImodemParticleClassKey.METADATA_PARTICLE_CLASS: PhsenAbcdefImodemMetadataTelemeteredDataParticle, PhsenAbcdefImodemParticleClassKey.CONTROL_PARTICLE_CLASS: PhsenAbcdefImodemControlTelemeteredDataParticle, PhsenAbcdefImodemParticleClassKey.INSTRUMENT_PARTICLE_CLASS: PhsenAbcdefImodemInstrumentTelemeteredDataParticle, } }
def setUp(self): ParserUnitTestCase.setUp(self) self._telemetered_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: "mi.dataset.parser.parad_j_cspp", DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: ParadJCsppMetadataTelemeteredDataParticle, DATA_PARTICLE_CLASS_KEY: ParadJCsppInstrumentTelemeteredDataParticle, }, } self._recovered_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: "mi.dataset.parser.parad_j_cspp", DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: ParadJCsppMetadataRecoveredDataParticle, DATA_PARTICLE_CLASS_KEY: ParadJCsppInstrumentRecoveredDataParticle, }, } # Define test data particles and their associated timestamps which will be # compared with returned results self.file_ingested_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DbgPdbgDataTypeKey.DBG_PDBG_CSPP_TELEMETERED: { DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: DbgPdbgMetadataTelemeteredDataParticle, BATTERY_STATUS_CLASS_KEY: DbgPdbgTelemeteredBatteryParticle, GPS_ADJUSTMENT_CLASS_KEY: DbgPdbgTelemeteredGpsParticle } }, DbgPdbgDataTypeKey.DBG_PDBG_CSPP_RECOVERED: { DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: DbgPdbgMetadataRecoveredDataParticle, BATTERY_STATUS_CLASS_KEY: DbgPdbgRecoveredBatteryParticle, GPS_ADJUSTMENT_CLASS_KEY: DbgPdbgRecoveredGpsParticle } }, } # Define test data particles and their associated timestamps which will be # compared with returned results self.file_ingested_value = None self.state_callback_value = None self.publish_callback_value = None self.exception_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self._recovered_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.fuelcell_eng_dcl', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { FuelCellEngDclParticleClassKey.ENGINEERING_DATA_PARTICLE_CLASS: FuelCellEngDclDataParticleRecovered } } self._telemetered_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.fuelcell_eng_dcl', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { FuelCellEngDclParticleClassKey.ENGINEERING_DATA_PARTICLE_CLASS: FuelCellEngDclDataParticleTelemetered } } self._incomplete_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.fuelcell_eng_dcl', DataSetDriverConfigKeys.PARTICLE_CLASS: None } self._bad_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.fuelcell_eng_dcl', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {} }
def setUp(self): ParserUnitTestCase.setUp(self) self._telemetered_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdmo_ghqr_imodem', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { CtdmoGhqrImodemParticleClassKey.METADATA_PARTICLE_CLASS: CtdmoGhqrImodemMetadataTelemeteredDataParticle, CtdmoGhqrImodemParticleClassKey.INSTRUMENT_PARTICLE_CLASS: CtdmoGhqrImodemInstrumentTelemeteredDataParticle, } } self._recovered_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdmo_ghqr_imodem', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { CtdmoGhqrImodemParticleClassKey.METADATA_PARTICLE_CLASS: CtdmoGhqrImodemMetadataRecoveredDataParticle, CtdmoGhqrImodemParticleClassKey.INSTRUMENT_PARTICLE_CLASS: CtdmoGhqrImodemInstrumentRecoveredDataParticle, } }
def setUp(self): ParserUnitTestCase.setUp(self) self._exception_occurred = False self.config = { DataTypeKey.PRESF_ABC_DCL_TELEMETERED: { DataSetDriverConfigKeys.PARTICLE_MODULE: MODULE_NAME, DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { TIDE_PARTICLE_CLASS_KEY: PresfAbcDclTelemeteredTideDataParticle, WAVE_PARTICLE_CLASS_KEY: PresfAbcDclTelemeteredWaveDataParticle, } }, DataTypeKey.PRESF_ABC_DCL_RECOVERED: { DataSetDriverConfigKeys.PARTICLE_MODULE: MODULE_NAME, DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { TIDE_PARTICLE_CLASS_KEY: PresfAbcDclRecoveredTideDataParticle, WAVE_PARTICLE_CLASS_KEY: PresfAbcDclRecoveredWaveDataParticle, } }, } self.file_ingested_value = None self.state_callback_value = None self.publish_callback_value = None self.maxDiff = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdpf', DataSetDriverConfigKeys.PARTICLE_CLASS: 'CtdpfParserDataParticle' } # not a DataSourceLocation...its just the parser self.position = {StateKey.POSITION: 0, StateKey.TIMESTAMP: 0.0} # Gonna need the test cases to make some of these # self.stream_handle = StringIO(TEST_DATA) # self.parser = CtdpfParser(config, self.position, self.stream_handle) # last one is the link to the data source self.base_timestamp = 3526427761.0 self.particle_a = CtdpfParserDataParticle( " 42.2095, 13.4344, 143.63, 2830.2", internal_timestamp=self.base_timestamp) self.particle_b = CtdpfParserDataParticle( " 42.2102, 13.4346, 143.63, 2831.1", internal_timestamp=self.base_timestamp + 1) self.particle_c = CtdpfParserDataParticle( " 42.2105, 13.4352, 143.63, 2830.6", internal_timestamp=self.base_timestamp + 2) self.particle_d = CtdpfParserDataParticle( " 42.2110, 13.4350, 143.62, 2831.5", internal_timestamp=self.base_timestamp + 3) self.particle_e = CtdpfParserDataParticle( " 42.2102, 13.4346, 143.63, 2831.1", internal_timestamp=self.base_timestamp + 60) self.particle_z = CtdpfParserDataParticle( " 11.1111, 22.2222, 333.33, 4444.4", internal_timestamp=self.base_timestamp + 43) self.position_callback_value = None self.publish_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdmo_ghqr_sio', DataSetDriverConfigKeys.PARTICLE_CLASS: [ 'CtdmoGhqrSioTelemeteredInstrumentDataParticle', 'CtdmoGhqrSioTelemeteredOffsetDataParticle' ] } self.config_rec_co = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdmo_ghqr_sio', DataSetDriverConfigKeys.PARTICLE_CLASS: 'CtdmoGhqrSioRecoveredOffsetDataParticle', } self.config_rec_ct = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdmo_ghqr_sio', DataSetDriverConfigKeys.PARTICLE_CLASS: 'CtdmoGhqrRecoveredInstrumentDataParticle', INDUCTIVE_ID_KEY: 55 }
def setUp(self): ParserUnitTestCase.setUp(self) self._recovered_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.pco2w_abc_particles', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { Pco2wAbcParticleClassKey.METADATA_PARTICLE_CLASS: Pco2wAbcDclMetadataRecoveredDataParticle, Pco2wAbcParticleClassKey.POWER_PARTICLE_CLASS: Pco2wAbcDclPowerRecoveredDataParticle, Pco2wAbcParticleClassKey.INSTRUMENT_PARTICLE_CLASS: Pco2wAbcDclInstrumentRecoveredDataParticle, Pco2wAbcParticleClassKey.INSTRUMENT_BLANK_PARTICLE_CLASS: Pco2wAbcDclInstrumentBlankRecoveredDataParticle, } } self._telemetered_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.pco2w_abc_particles', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { Pco2wAbcParticleClassKey.METADATA_PARTICLE_CLASS: Pco2wAbcDclMetadataTelemeteredDataParticle, Pco2wAbcParticleClassKey.POWER_PARTICLE_CLASS: Pco2wAbcDclPowerTelemeteredDataParticle, Pco2wAbcParticleClassKey.INSTRUMENT_PARTICLE_CLASS: Pco2wAbcDclInstrumentTelemeteredDataParticle, Pco2wAbcParticleClassKey.INSTRUMENT_BLANK_PARTICLE_CLASS: Pco2wAbcDclInstrumentBlankTelemeteredDataParticle, } }
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataTypeKey.CTDPF_J_CSPP_TELEMETERED: { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdpf_j_cspp', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: CtdpfJCsppMetadataTelemeteredDataParticle, DATA_PARTICLE_CLASS_KEY: CtdpfJCsppInstrumentTelemeteredDataParticle, } }, DataTypeKey.CTDPF_J_CSPP_RECOVERED: { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdpf_j_cspp', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: CtdpfJCsppMetadataRecoveredDataParticle, DATA_PARTICLE_CLASS_KEY: CtdpfJCsppInstrumentRecoveredDataParticle, } }, }
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.phsen_abcdef', DataSetDriverConfigKeys.PARTICLE_CLASS: None }
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.flord_l_wfp_sio', DataSetDriverConfigKeys.PARTICLE_CLASS: 'FlordLWfpSioDataParticle' }
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.issmcnsm_flortd', DataSetDriverConfigKeys.PARTICLE_CLASS: 'Issmcnsm_flortdParserDataParticle' } self.start_state = {StateKey.POSITION:0, StateKey.TIMESTAMP:0.0} # Define test data particles and their associated timestamps which will be # compared with returned results self.timestamp1 = 3592854645.0039997 self.particle_a = Issmcnsm_flortdParserDataParticle( "2013/11/07 23:10:45.004 03/06/13\t23:08:51\t700\t4130\t695\t928\t460\t4130\t540\r", internal_timestamp=self.timestamp1) self.timestamp2 = 3592854646.136 self.particle_b = Issmcnsm_flortdParserDataParticle( "2013/11/07 23:10:46.136 03/06/13\t23:08:52\t700\t4130\t695\t929\t460\t4130\t540\r", internal_timestamp=self.timestamp2) self.timestamp3 = 3592854647.269 self.particle_c = Issmcnsm_flortdParserDataParticle( "2013/11/07 23:10:47.269 03/06/13\t23:08:53\t700\t4130\t695\t926\t460\t4130\t539\r", internal_timestamp=self.timestamp3) self.timestamp4 = 3592854648.401 self.particle_d = Issmcnsm_flortdParserDataParticle( "2013/11/07 23:10:48.401 03/06/13\t23:08:55\t700\t4130\t695\t927\t460\t4130\t539\r", internal_timestamp=self.timestamp4) self.timestamp_long = 3592854660.857 self.particle_z = Issmcnsm_flortdParserDataParticle( "2013/11/07 23:11:00.857 03/06/13\t23:09:07\t700\t4130\t695\t927\t460\t4130\t538\r", internal_timestamp=self.timestamp_long) self.state_callback_value = None self.publish_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self._telemetered_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.parad_j_cspp', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: ParadJCsppMetadataTelemeteredDataParticle, DATA_PARTICLE_CLASS_KEY: ParadJCsppInstrumentTelemeteredDataParticle, } } self._recovered_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.parad_j_cspp', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: ParadJCsppMetadataRecoveredDataParticle, DATA_PARTICLE_CLASS_KEY: ParadJCsppInstrumentRecoveredDataParticle, } } # Define test data particles and their associated timestamps which will be # compared with returned results self.file_ingested_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdmo', DataSetDriverConfigKeys.PARTICLE_CLASS: 'CtdmoParserDataParticle', 'inductive_id': 55 } # packets have the same timestamp, the first has 3 data samples [394-467] self.timestamp1 = 3583612801.0 self.particle_a = CtdmoParserDataParticle(b'\x37\x39\x4c\xe0\xc3\x54\xe6\x0a\x81\xd5\x81\x19\x0d', internal_timestamp=self.timestamp1) # this is the start of packet 2 [5354:5544] self.timestamp2 = 3583634401.0 self.particle_b = CtdmoParserDataParticle(b'\x37\x35\x8b\xe0\xc3T\xe5\n\xe1)\x82\x19\r', internal_timestamp=self.timestamp2) # start of packet 3 [6970-7160] self.timestamp3 = 3583656001.0 self.particle_c = CtdmoParserDataParticle(b'\x37\x36\xe7\xe6\x89W9\x10A~\x82\x19\r', internal_timestamp=self.timestamp3) # packet 4 [7547-7737] self.timestamp4 = 3583663201.0 self.particle_d = CtdmoParserDataParticle(b'\x37\x32\t6F\x0c\xd5\x0fa\x9a\x82\x19\r', internal_timestamp=self.timestamp4) self.timestamp_last = 3583692001.0 self.particle_z = CtdmoParserDataParticle(b'73\xcd\x86_\x92\x13\x10\xe1\n\x83\x19\r', internal_timestamp=self.timestamp_last) self.state_callback_value = None self.publish_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataTypeKey.PHSEN_ABCDEF_DCL_RECOVERED: { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.phsen_abcdef_dcl', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { 'metadata_particle_class_key': PhsenAbcdefDclMetadataRecoveredDataParticle, 'data_particle_class_key': PhsenAbcdefDclInstrumentRecoveredDataParticle } }, DataTypeKey.PHSEN_ABCDEF_DCL_TELEMETERED: { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.phsen_abcdef_dcl', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { 'metadata_particle_class_key': PhsenAbcdefDclMetadataTelemeteredDataParticle, 'data_particle_class_key': PhsenAbcdefDclInstrumentTelemeteredDataParticle } }, } self.rec_state_callback_value = None self.rec_file_ingested_value = False self.rec_publish_callback_value = None self.rec_exception_callback_value = None self.rec_exceptions_detected = 0 self.tel_state_callback_value = None self.tel_file_ingested_value = False self.tel_publish_callback_value = None self.tel_exception_callback_value = None self.tel_exceptions_detected = 0 self.maxDiff = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config_recovered = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.dosta_abcdjm_cspp', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: DostaAbcdjmCsppMetadataRecoveredDataParticle, DATA_PARTICLE_CLASS_KEY: DostaAbcdjmCsppInstrumentRecoveredDataParticle, } } self.config_telemetered = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.dosta_abcdjm_cspp', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: DostaAbcdjmCsppMetadataTelemeteredDataParticle, DATA_PARTICLE_CLASS_KEY: DostaAbcdjmCsppInstrumentTelemeteredDataParticle, } }
def setUp(self): ParserUnitTestCase.setUp(self) self._telemetered_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.optaa_dj_cspp', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: OptaaDjCsppMetadataTelemeteredDataParticle, DATA_PARTICLE_CLASS_KEY: OptaaDjCsppInstrumentTelemeteredDataParticle } } self._recovered_parser_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.optaa_dj_cspp', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: OptaaDjCsppMetadataRecoveredDataParticle, DATA_PARTICLE_CLASS_KEY: OptaaDjCsppInstrumentRecoveredDataParticle } }
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdmo', DataSetDriverConfigKeys.PARTICLE_CLASS: 'CtdmoParserDataParticle', 'inductive_id': 55 } # all indices give in the comments are in actual file position, not escape sequence replace indices # packets have the same timestamp, the first has 3 data samples [394-467] self.particle_a = CtdmoParserDataParticle(b'51EF36D6\x37\x39\x4c\xe0\xc3\x54\xe6\x0a\x81\xd5\x81\x19\x0d') # this is the start of packet 2 [855:1045] self.particle_b = CtdmoParserDataParticle(b'51EF52F677\xf0\x00\xc3T\xe5\n\xa1\xf1\x81\x19\r') # this is the start of packet 3 [1433:1623] self.particle_c = CtdmoParserDataParticle(b'51EF6F1676$p\xc3T\xe4\n\xc1\r\x82\x19\r') # this is the start of packet 4 [5354:5544] self.particle_d = CtdmoParserDataParticle(b'51EF8B36\x37\x35\x8b\xe0\xc3T\xe5\n\xe1)\x82\x19\r') # this is the start of packet 5 [6321:6511] self.particle_e = CtdmoParserDataParticle(b'51EFC37677\x17\xd6\x8eI;\x10!b\x82\x19\r') # start of packet 6 [6970-7160] self.particle_f = CtdmoParserDataParticle(b'51EFDF96\x37\x36\xe7\xe6\x89W9\x10A~\x82\x19\r') # packet 7 [7547-7737] self.particle_g = CtdmoParserDataParticle(b'51EFFBB6\x37\x32\t6F\x0c\xd5\x0fa\x9a\x82\x19\r') # in long file, starts at 13453 self.particle_z = CtdmoParserDataParticle(b'51F0A47673\xb9\xa6]\x93\xf2\x0f!C\x83\x19\r') self.state_callback_value = None self.publish_callback_value = None self.exception_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.wfp_parser', DataSetDriverConfigKeys.PARTICLE_CLASS: 'WfpParticle' } # not a DataSourceLocation...its just the parser self.position = {StateKey.POSITION: 0} self.base_timestamp = 3575024522.0 self.particle_a = WfpParticle( "04/15/2013 14:22:02,-2,10.8,0.000,0.00,117,52,94", internal_timestamp=self.base_timestamp) self.particle_b = WfpParticle( "04/15/2013 14:22:10,61,10.6,0.000,0.00,114,52,97", internal_timestamp=self.base_timestamp + 1) self.particle_c = WfpParticle( "04/15/2013 14:23:02,155,10.6,1.520,3.00,114,52,94", internal_timestamp=self.base_timestamp + 2) self.particle_d = WfpParticle( "04/15/2013 14:23:08,720,9.7,0.850,27.00,114,53,90", internal_timestamp=self.base_timestamp + 3) self.particle_e = WfpParticle("1.5371,16.3169,12.640, 3141", internal_timestamp=self.base_timestamp + 60) self.particle_z = WfpParticle( "04/15/2013 14:23:08,720,9.7,0.850,27.00,114,53,90", internal_timestamp=self.base_timestamp + 43) self.position_callback_value = None self.publish_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.rte_o_dcl', DataSetDriverConfigKeys.PARTICLE_CLASS: 'RteODclParserDataParticle' }
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { WcHmrDataTypeKey.WC_HMR_CSPP_TELEMETERED: { DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: WcHmrMetadataTelemeteredDataParticle, DATA_PARTICLE_CLASS_KEY: WcHmrEngTelemeteredDataParticle, } }, WcHmrDataTypeKey.WC_HMR_CSPP_RECOVERED: { DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: WcHmrMetadataRecoveredDataParticle, DATA_PARTICLE_CLASS_KEY: WcHmrEngRecoveredDataParticle, } }, } # Define test data particles and their associated timestamps which will be # compared with returned results self.file_ingested_value = None self.state_callback_value = None self.publish_callback_value = None self.exception_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.wfp_parser', DataSetDriverConfigKeys.PARTICLE_CLASS: 'WfpParticle' } # not a DataSourceLocation...its just the parser self.position = {StateKey.POSITION:0} self.base_timestamp = 3575024522.0 self.particle_a = WfpParticle("04/15/2013 14:22:02,-2,10.8,0.000,0.00,117,52,94", internal_timestamp=self.base_timestamp) self.particle_b = WfpParticle("04/15/2013 14:22:10,61,10.6,0.000,0.00,114,52,97", internal_timestamp=self.base_timestamp+1) self.particle_c = WfpParticle("04/15/2013 14:23:02,155,10.6,1.520,3.00,114,52,94", internal_timestamp=self.base_timestamp+2) self.particle_d = WfpParticle("04/15/2013 14:23:08,720,9.7,0.850,27.00,114,53,90", internal_timestamp=self.base_timestamp+3) self.particle_e = WfpParticle("1.5371,16.3169,12.640, 3141", internal_timestamp=self.base_timestamp+60) self.particle_z = WfpParticle("04/15/2013 14:23:08,720,9.7,0.850,27.00,114,53,90", internal_timestamp=self.base_timestamp+43) self.position_callback_value = None self.publish_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataParticleType.INSTRUMENT_TELEMETERED: { DataSetDriverConfigKeys.PARTICLE_MODULE: MODULE_NAME, DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { PARTICLE_CLASS_KEY: CtdbpCdefDclCeTelemeteredParserDataParticle, DOSTA_CLASS_KEY: CtdbpCdefDclCeTelemeteredParserDostaParticle, } }, DataParticleType.INSTRUMENT_RECOVERED: { DataSetDriverConfigKeys.PARTICLE_MODULE: MODULE_NAME, DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { PARTICLE_CLASS_KEY: CtdbpCdefDclCeRecoveredParserDataParticle, DOSTA_CLASS_KEY: CtdbpCdefDclCeRecoveredParserDostaParticle, } }, }
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.issmcnsm_dostad', DataSetDriverConfigKeys.PARTICLE_CLASS: 'Issmcnsm_dostadParserDataParticle' } self.start_state = {StateKey.POSITION:0, StateKey.TIMESTAMP:0.0} # Define test data particles and their associated timestamps which will be # compared with returned results self.timestamp1 = 3590524817.862 self.particle_a = Issmcnsm_dostadParserDataParticle( "2013/10/12 00:00:17.862 4831\t135\t323.144\t101.137\t14.337\t31.580\t31.580\t40.363\t8.783\t1079.2\t1070.5\t245.4\r", internal_timestamp=self.timestamp1) self.timestamp2 = 3590524819.861 self.particle_b = Issmcnsm_dostadParserDataParticle( "2013/10/12 00:00:19.861 4831\t135\t323.140\t101.135\t14.337\t31.581\t31.581\t40.362\t8.781\t1079.1\t1068.5\t245.4\r", internal_timestamp=self.timestamp2) self.timestamp3 = 3590524821.862 self.particle_c = Issmcnsm_dostadParserDataParticle( "2013/10/12 00:00:21.862 4831\t135\t323.141\t101.136\t14.337\t31.581\t31.581\t40.362\t8.781\t1078.9\t1067.3\t245.4\r", internal_timestamp=self.timestamp3) self.timestamp4 = 3590524823.862 self.particle_d = Issmcnsm_dostadParserDataParticle( "2013/10/12 00:00:23.862 4831\t135\t323.126\t101.131\t14.337\t31.581\t31.581\t40.363\t8.782\t1078.8\t1066.3\t245.4\r", internal_timestamp=self.timestamp4) self.timestamp_last = 3590524851.861 self.particle_z = Issmcnsm_dostadParserDataParticle( "2013/10/12 00:00:51.861 4831\t135\t322.889\t101.087\t14.351\t31.583\t31.583\t40.380\t8.796\t1077.4\t1057.4\t244.9\r", internal_timestamp=self.timestamp_last) self.state_callback_value = None self.publish_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataTypeKey.VELPT_J_CSPP_RECOVERED: { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.velpt_j_cspp', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: VelptJCsppMetadataRecoveredDataParticle, DATA_PARTICLE_CLASS_KEY: VelptJCsppInstrumentRecoveredDataParticle, } }, DataTypeKey.VELPT_J_CSPP_TELEMETERED: { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.velpt_j_cspp', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: VelptJCsppMetadataTelemeteredDataParticle, DATA_PARTICLE_CLASS_KEY: VelptJCsppInstrumentTelemeteredDataParticle, } }, } # Define test data particles and their associated timestamps which will be # compared with returned results self.file_ingested_value = None self.state_callback_value = None self.publish_callback_value = None self.exception_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.nutnrb', DataSetDriverConfigKeys.PARTICLE_CLASS: 'NutnrbDataParticle' } # not a DataSourceLocation...its just the parser self.position = {StateKey.POSITION: 0} self.particle_a = NutnrbDataParticle( "2012/12/13 15:31:08.726 SATNDC0239,2012348,15.518322,0.00,0.00,0.00,0.00,0.000000\n" ) self.particle_b = NutnrbDataParticle( "2012/12/13 15:31:10.065 SATNLC0239,2012348,15.518666,-5.48,20.38,-31.12,0.59,0.000231\n" ) self.particle_c = NutnrbDataParticle( "2012/12/13 15:31:11.405 SATNLC0239,2012348,15.519024,-6.38,24.24,-37.41,0.61,0.000191\n" ) self.particle_d = NutnrbDataParticle( "2012/12/13 15:31:12.720 SATNLC0239,2012348,15.519397,-6.77,24.80,-38.00,0.62,0.000203\n" ) self.particle_e = NutnrbDataParticle( "2012/12/13 15:31:14.041 SATNLC0239,2012348,15.519770,-5.28,18.39,-27.76,0.59,0.000212\n" ) self.particle_z = NutnrbDataParticle( "2012/12/13 15:31:20.704 SATNLC0239,2012348,15.521605,-7.52,31.35,-49.03,0.63,0.000240\n" ) self.position_callback_value = None self.publish_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdpfk', DataSetDriverConfigKeys.PARTICLE_CLASS: 'CtdpfkParserDataParticle' } # not a DataSourceLocation...its just the parser self.position = {StateKey.POSITION:0, StateKey.TIMESTAMP:0.0} # Gonna need the test cases to make some of these # self.stream_handle = StringIO(TEST_DATA) # self.parser = CtdpfParser(config, self.position, self.stream_handle) # last one is the link to the data source self.base_timestamp = 3575062802.0 self.particle_a = CtdpfkParserDataParticle("1.5370,16.3184,12.630, 3122", internal_timestamp=self.base_timestamp) self.particle_b = CtdpfkParserDataParticle("1.5370,16.3174,12.640, 3127", internal_timestamp=self.base_timestamp+1) self.particle_c = CtdpfkParserDataParticle("1.5371,16.3170,12.640, 3132", internal_timestamp=self.base_timestamp+2) self.particle_d = CtdpfkParserDataParticle("1.5371,16.3171,12.640, 3137", internal_timestamp=self.base_timestamp+3) self.particle_e = CtdpfkParserDataParticle("1.5371,16.3169,12.640, 3141", internal_timestamp=self.base_timestamp+60) self.particle_z = CtdpfkParserDataParticle("1.5371,16.3160,12.640, 3146", internal_timestamp=self.base_timestamp+43) self.position_callback_value = None self.publish_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.rec_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: MODULE_NAME, DataSetDriverConfigKeys.PARTICLE_CLASS: None }
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, '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, 'particle_classes_dict': { 'instrument_data_particle_class': CtdpfCklWfpTelemeteredDataParticle, 'metadata_particle_class': CtdpfCklWfpTelemeteredMetadataParticle } } } self.file_ingested_value = None self.state_callback_value = None self.publish_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: "mi.dataset.parser.ctdpf", DataSetDriverConfigKeys.PARTICLE_CLASS: "CtdpfParserDataParticle", } # not a DataSourceLocation...its just the parser self.position = {StateKey.POSITION: 0, StateKey.TIMESTAMP: 0.0} # Gonna need the test cases to make some of these # self.stream_handle = StringIO(TEST_DATA) # self.parser = CtdpfParser(config, self.position, self.stream_handle) # last one is the link to the data source self.base_timestamp = 3526427761.0 self.particle_a = CtdpfParserDataParticle( " 42.2095, 13.4344, 143.63, 2830.2", internal_timestamp=self.base_timestamp ) self.particle_b = CtdpfParserDataParticle( " 42.2102, 13.4346, 143.63, 2831.1", internal_timestamp=self.base_timestamp + 1 ) self.particle_c = CtdpfParserDataParticle( " 42.2105, 13.4352, 143.63, 2830.6", internal_timestamp=self.base_timestamp + 2 ) self.particle_d = CtdpfParserDataParticle( " 42.2110, 13.4350, 143.62, 2831.5", internal_timestamp=self.base_timestamp + 3 ) self.particle_e = CtdpfParserDataParticle( " 42.2102, 13.4346, 143.63, 2831.1", internal_timestamp=self.base_timestamp + 60 ) self.particle_z = CtdpfParserDataParticle( " 11.1111, 22.2222, 333.33, 4444.4", internal_timestamp=self.base_timestamp + 43 ) self.position_callback_value = None self.publish_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.rec_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: MODULE_NAME, DataSetDriverConfigKeys.PARTICLE_CLASS: None } self.tel_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: MODULE_NAME, DataSetDriverConfigKeys.PARTICLE_CLASS: None } self.rec_state_callback_value = None self.rec_file_ingested_value = False self.rec_publish_callback_value = None self.rec_exception_callback_value = None self.rec_exceptions_detected = 0 self.tel_state_callback_value = None self.tel_file_ingested_value = False self.tel_publish_callback_value = None self.tel_exception_callback_value = None self.tel_exceptions_detected = 0 self.maxDiff = None
def setUp(self): ParserUnitTestCase.setUp(self) self.telem_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.flort_dj_sio', DataSetDriverConfigKeys.PARTICLE_CLASS: 'FlortdParserDataParticle' } self.recov_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.flort_dj_sio', DataSetDriverConfigKeys.PARTICLE_CLASS: 'FlortdRecoveredParserDataParticle' } # particles from FLO15908.DAT and FLO_short.DAT self.particle_a_recov = FlortdRecoveredParserDataParticle( '51EC760117/12/13\t00:00:05\t700\t4130\t695\t700\t460\t4130\t547') self.particle_b_recov = FlortdRecoveredParserDataParticle( '51EC798517/12/13\t00:15:04\t700\t4130\t695\t708\t460\t4130\t548') self.particle_c_recov = FlortdRecoveredParserDataParticle( '51EC7D0917/12/13\t00:30:04\t700\t4130\t695\t702\t460\t4130\t548') self.particle_d_recov = FlortdRecoveredParserDataParticle( '51EC808D17/12/13\t00:45:04\t700\t4130\t695\t710\t460\t4130\t548') self.particle_e_recov = FlortdRecoveredParserDataParticle( '51EC841117/12/13\t01:00:04\t700\t4130\t695\t708\t460\t4130\t548') self.particle_f_recov = FlortdRecoveredParserDataParticle( '51EC879517/12/13\t01:15:04\t700\t4130\t695\t700\t460\t4130\t548') # particles from FLO15908.DAT self.particle_long_before_last = FlortdRecoveredParserDataParticle( '51EDC07917/12/13\t23:30:05\t700\t4130\t695\t677\t460\t4130\t545') self.particle_long_last = FlortdRecoveredParserDataParticle( '51EDC3FD17/12/13\t23:45:05\t700\t4130\t695\t674\t460\t4130\t545') self.stream_handle = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataTypeKey.SPKIR_ABJ_CSPP_TELEMETERED: { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.spkir_abj_cspp', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: SpkirAbjCsppMetadataTelemeteredDataParticle, DATA_PARTICLE_CLASS_KEY: SpkirAbjCsppInstrumentTelemeteredDataParticle, } }, DataTypeKey.SPKIR_ABJ_CSPP_RECOVERED: { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.spkir_abj_cspp', DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: SpkirAbjCsppMetadataRecoveredDataParticle, DATA_PARTICLE_CLASS_KEY: SpkirAbjCsppInstrumentRecoveredDataParticle, } }, } # Define test data particles and their associated timestamps which will be # compared with returned results self.file_ingested_value = None self.state_callback_value = None self.publish_callback_value = None self.exception_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.dostad', DataSetDriverConfigKeys.PARTICLE_CLASS: 'DostadParserDataParticle' } # first DO tag self.particle_a = DostadParserDataParticle('51EF0E75\xff\x11\x25\x11' \ '4831\t128\t302.636\t98.918\t16.355\t30.771\t' \ '30.771\t36.199\t5.429\t1309.9\t1175.7\t299.6\x0d\x0a') self.particle_b = DostadParserDataParticle('51EF1901\xff\x11\x25\x11' \ '4831\t128\t317.073\t98.515\t14.004\t31.299\t31.299' \ '\t36.647\t5.349\t1338.5\t1212.4\t375.8\x0d\x0a') self.particle_c = DostadParserDataParticle('51EF6D61\xff\x11\x25\x11' \ '4831\t128\t326.544\t96.726\t11.873\t31.965\t31.965' \ '\t37.134\t5.169\t1370.7\t1245.9\t444.4\x0d\x0a') self.particle_d = DostadParserDataParticle('51EFC1C2\xff\x11\x25\x11' \ '4831\t128\t332.060\t99.617\t12.432\t31.490\t31.490' \ '\t36.812\t5.323\t1026.0\t1100.0\t426.5\x0d\x0a') self.particle_e = DostadParserDataParticle('51F01622\xff\x11\x25\x11' \ '4831\t128\t354.515\t101.592\t10.440\t31.666\t31.666' \ '\t36.930\t5.263\t1020.1\t1123.0\t490.0\x0d\x0a') self.particle_f = DostadParserDataParticle('51F06A82\xff\x11\x25\x11' \ '4831\t128\t337.540\t100.172\t11.955\t31.521\t31.521' \ '\t36.805\t5.284\t983.8\t1092.6\t441.7\x0d\x0a') self.state_callback_value = None self.publish_callback_value = None self.exception_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.rec_config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ppsdn_a_subcon', DataSetDriverConfigKeys.PARTICLE_CLASS: None }
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.flortd', DataSetDriverConfigKeys.PARTICLE_CLASS: 'FlortdParserDataParticle' } # first FL tag self.particle_a = FlortdParserDataParticle( '51EF0E7507/23/13\t23:15:06\t700\t50\t695\t50\t460\t53\t545') self.particle_a_dash = FlortdParserDataParticle( '51EF0E7507/23/13\t23:15:06\t700\t50\t--\t50\t460\t53\t545') self.particle_b = FlortdParserDataParticle( '51EF190107/24/13\t00:00:06\t700\t85\t695\t50\t460\t51\t548') self.particle_c = FlortdParserDataParticle( '51EF6D6107/24/13\t06:00:05\t700\t78\t695\t72\t460\t51\t553') self.particle_d = FlortdParserDataParticle( '51EFC1C207/24/13\t12:00:06\t700\t169\t695\t127\t460\t58\t553') self.particle_e = FlortdParserDataParticle( '51F0162207/24/13\t18:00:06\t700\t262\t695\t84\t460\t55\t555') self.particle_f = FlortdParserDataParticle( '51F06A8207/25/13\t00:00:06\t700\t159\t695\t95\t460\t59\t554') self.state_callback_value = None self.publish_callback_value = None self.exception_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.wfp_eng__stc_imodem', DataSetDriverConfigKeys.PARTICLE_CLASS: ['Wfp_eng__stc_imodem_statusParserDataParticle', 'Wfp_eng__stc_imodem_startParserDataParticle', 'Wfp_eng__stc_imodem_engineeringParserDataParticle'] } self.start_state = {StateKey.POSITION: 0} # Define test data particles and their associated timestamps which will be # compared with returned results self.timestamp1_time = self.timestamp_to_ntp('R\x9d\xac\x19') self.particle_a_time = Wfp_eng__stc_imodem_startParserDataParticle(b'\x00\x01\x00\x00' \ '\x00\x00\x00\x00\x00\x01\x00\x01\x00\x00\x00\x00R\x9d\xab\xa2R\x9d\xac\x19', internal_timestamp=self.timestamp1_time) self.timestamp1_eng = self.timestamp_to_ntp('R\x9d\xac\x1d') self.particle_a_eng = Wfp_eng__stc_imodem_engineeringParserDataParticle(b'R\x9d\xac\x1d' \ '\x00\x00\x00\x00A:6\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x01\x03\x00h\x00N', internal_timestamp=self.timestamp1_eng) self.timestamp2_eng = self.timestamp_to_ntp('R\x9d\xac!') self.particle_b_eng = Wfp_eng__stc_imodem_engineeringParserDataParticle(b'R\x9d\xac!C\t' \ '\xf2\xf7A9A!\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf2\x00c\x00O', internal_timestamp=self.timestamp2_eng) self.timestamp3_eng = self.timestamp_to_ntp('R\x9d\xac&') self.particle_c_eng = Wfp_eng__stc_imodem_engineeringParserDataParticle(b"R\x9d\xac&C\xbc" \ "\x9f\xa7A7'\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x00^\x00O", internal_timestamp=self.timestamp3_eng) self.timestamp4_eng = self.timestamp_to_ntp('R\x9d\xac*') self.particle_d_eng = Wfp_eng__stc_imodem_engineeringParserDataParticle(b'R\x9d\xac' \ '*C\xc5\xad\x08A6\xd5\xd0\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00n\x00O', internal_timestamp=self.timestamp4_eng) self.timestamp_last_eng = self.timestamp_to_ntp('R\x9d\xac\xcf') self.particle_last_eng = Wfp_eng__stc_imodem_engineeringParserDataParticle(b'R\x9d\xac\xcfA' \ '\xfa\xb2:A5\x0b\x0fA\xf2\x8f\\\x00\x00\x00\x00\x00\xaf\x00m\x00P', internal_timestamp=self.timestamp_last_eng) self.timestamp1_stat = self.timestamp_to_ntp('R\x9d\xac\xd4') self.particle_a_stat = Wfp_eng__stc_imodem_statusParserDataParticle(b'\xff\xff\xff\xff' \ '\x00\x00\x00\rR\x9d\xac\xd4R\x9d\xadQ', internal_timestamp=self.timestamp1_stat) # uncomment the following to generate particles in yml format for driver testing results files #self.particle_to_yml(self.particle_a_time) #self.particle_to_yml(self.particle_a_eng) #self.particle_to_yml(self.particle_b_eng) #self.particle_to_yml(self.particle_c_eng) #self.particle_to_yml(self.particle_d_eng) #self.particle_to_yml(self.particle_a_stat) self.file_ingested = False self.state_callback_value = None self.publish_callback_value = None
def setUp(self): ParserUnitTestCase.setUp(self) self.config = { DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.phsen_abcdef_sio', DataSetDriverConfigKeys.PARTICLE_CLASS: ['PhsenAbcdefSioDataParticle', 'PhsenAbcdefSioControlDataParticle'] }