本文整理汇总了Python中mi.dataset.test.test_parser.ParserUnitTestCase.setUp方法的典型用法代码示例。如果您正苦于以下问题:Python ParserUnitTestCase.setUp方法的具体用法?Python ParserUnitTestCase.setUp怎么用?Python ParserUnitTestCase.setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mi.dataset.test.test_parser.ParserUnitTestCase
的用法示例。
在下文中一共展示了ParserUnitTestCase.setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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
示例2: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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,
}
}
示例3: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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
示例4: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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
示例5: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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
示例6: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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
示例7: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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
示例8: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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
示例9: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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
示例10: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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: {}
}
示例11: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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,
}
}
示例12: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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
示例13: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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,
}
}
示例14: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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
示例15: setUp
# 需要导入模块: from mi.dataset.test.test_parser import ParserUnitTestCase [as 别名]
# 或者: from mi.dataset.test.test_parser.ParserUnitTestCase import setUp [as 别名]
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: {}
}