• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python adcps_jln_stc.AdcpsJlnStcParser类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中mi.dataset.parser.adcps_jln_stc.AdcpsJlnStcParser的典型用法代码示例。如果您正苦于以下问题:Python AdcpsJlnStcParser类的具体用法?Python AdcpsJlnStcParser怎么用?Python AdcpsJlnStcParser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了AdcpsJlnStcParser类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_bad_data

    def test_bad_data(self):
        """
        Ensure that bad data is skipped when it exists.
        """
        # Bad checksum
        # If checksum is bad, skip the record and continue parsing.
        self.stream_handle = StringIO(AdcpsJlnStcParserUnitTestCase.BAD_CHECKSUM)
        self.parser = AdcpsJlnStcParser(self.config, self.start_state, self.stream_handle,
                                        self.state_callback, self.pub_callback, self.exception_callback)
        # Only the header and second record, particle_b should be returned.
        result = self.parser.get_records(3)
        self.assertEqual(self.publish_callback_value[0], self.particle_header_footer)
        self.assertEqual(self.publish_callback_value[1], self.particle_b)
        if len(result) != 2:
            self.fail("Expected two records and got %d. Record containing bad data should have been skipped.",
                      len(result))

        # Incorrect number of bytes
        # If numbytes is incorrect, skip the record and continue parsing.
        self.start_state = {StateKey.POSITION: 0}
        self.stream_handle = StringIO(AdcpsJlnStcParserUnitTestCase.BAD_NUM_BYTES)
        self.parser = AdcpsJlnStcParser(self.config, self.start_state, self.stream_handle,
                                        self.state_callback, self.pub_callback, self.exception_callback)
        result = self.parser.get_records(3)
        self.assertEqual(self.publish_callback_value[0], self.particle_header_footer)
        self.assertEqual(self.publish_callback_value[1], self.particle_b)
        if len(result) != 2:
            self.fail("Expected two records and got %d. Record containing bad data should have been skipped.",
                      len(result))
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:29,代码来源:test_adcps_jln_stc.py


示例2: test_real_file

    def test_real_file(self):

        with open(os.path.join(RESOURCE_PATH, 'adcpt_20140504_015742.DAT'), 'r') as file_handle:
            parser = AdcpsJlnStcParser(self._telem_config,
                                       None, file_handle,
                                       lambda state, ingested: None,
                                       lambda data: None,
                                       self.exception_callback)

            result = parser.get_records(1000)

            self.assert_particles(result, 'adcpt_20140504_015742.telem.yml', RESOURCE_PATH)

            self.assertEquals(len(self.exception_callback_value), 0)

        with open(os.path.join(RESOURCE_PATH, 'adcpt_20140504_015742.DAT'), 'r') as file_handle:
            parser = AdcpsJlnStcParser(self._recov_config,
                                       None, file_handle,
                                       lambda state, ingested: None,
                                       lambda data: None,
                                       self.exception_callback)

            result = parser.get_records(1000)

            self.assert_particles(result, 'adcpt_20140504_015742.recov.yml', RESOURCE_PATH)

            self.assertEquals(len(self.exception_callback_value), 0)
开发者ID:GrimJ,项目名称:mi-dataset,代码行数:27,代码来源:test_adcps_jln_stc.py


示例3: test_simple

    def test_simple(self):
        """
        Read test data and pull out multiple data particles at one time.
        Assert that the results are those we expected.
        """
        with open(os.path.join(RESOURCE_PATH, 'adcpt_20130929_091817.DAT')) as file_handle:
            parser = AdcpsJlnStcParser(self._telem_config,
                                       None,
                                       file_handle,
                                       lambda state, ingested: None,
                                       lambda data: None,
                                       self.exception_callback)

            result = parser.get_records(6)

            self.assert_particles(result, 'adcpt_20130929_091817.telem.yml', RESOURCE_PATH)

            self.assertEquals(len(self.exception_callback_value), 0)

        with open(os.path.join(RESOURCE_PATH, 'adcpt_20130929_091817.DAT')) as file_handle:
            parser = AdcpsJlnStcParser(self._recov_config,
                                       None,
                                       file_handle,
                                       lambda state, ingested: None,
                                       lambda data: None,
                                       self.exception_callback)

            result = parser.get_records(6)

            self.assert_particles(result, 'adcpt_20130929_091817.recov.yml', RESOURCE_PATH)

            self.assertEquals(len(self.exception_callback_value), 0)
开发者ID:GrimJ,项目名称:mi-dataset,代码行数:32,代码来源:test_adcps_jln_stc.py


示例4: test_bad_data_telem

    def test_bad_data_telem(self):
        """
        Ensure that bad data is skipped when it exists.
        """
        # Bad checksum
        # If checksum is bad, skip the record and continue parsing.
        with open(os.path.join(RESOURCE_PATH, 'adcps_jln_stc.bad_checksum.DAT'), 'rb') as file_handle:

            parser = AdcpsJlnStcParser(self._telem_config,
                                       file_handle,
                                       self.exception_callback)

            result = parser.get_records(10)

            self.assert_particles(result, 'adcps_jln_stc.bad_checksum.telem.yml', RESOURCE_PATH)

            self.assertEquals(len(self.exception_callback_value), 1)

            self.assert_(isinstance(self.exception_callback_value[0], SampleException))

            self.exception_callback_value.pop()

        # Incorrect number of bytes
        # If numbytes is incorrect, skip the record and continue parsing.
        with open(os.path.join(RESOURCE_PATH, 'adcps_jln_stc.bad_num_bytes.DAT'), 'rb') as file_handle:
            parser = AdcpsJlnStcParser(self._telem_config,
                                       file_handle,
                                       self.exception_callback)
            result = parser.get_records(10)

            self.assert_particles(result, 'adcps_jln_stc.bad_num_bytes.telem.yml', RESOURCE_PATH)

            self.assertEquals(len(self.exception_callback_value), 1)

            self.assert_(isinstance(self.exception_callback_value[0], SampleException))
开发者ID:JeffRoy,项目名称:mi-dataset,代码行数:35,代码来源:test_adcps_jln_stc.py


示例5: test_receive_fail_recov

    def test_receive_fail_recov(self):
        # ReceiveFailure
        # If record marked with 'ReceiveFailure', skip the record and continue parsing.
        with open(os.path.join(RESOURCE_PATH, 'adcps_jln_stc.bad_rx_failure.DAT'), 'rb') as file_handle:
            parser = AdcpsJlnStcParser(self._recov_config,
                                       file_handle,
                                       self.exception_callback)

            result = parser.get_records(10)

            self.assert_particles(result, 'adcps_jln_stc.bad_rx_failure.recov.yml', RESOURCE_PATH)

            self.assertEquals(len(self.exception_callback_value), 0)
开发者ID:JeffRoy,项目名称:mi-dataset,代码行数:13,代码来源:test_adcps_jln_stc.py


示例6: test_bug_2979_2

    def test_bug_2979_2(self):
        """
        Read test data and pull out multiple data particles at one time.
        Assert that the results are those we expected.
        """
        with open(os.path.join(RESOURCE_PATH, 'adcpt_20140707_200310.DAT'), 'rb') as file_handle:
            parser = AdcpsJlnStcParser(self._telem_config,
                                       file_handle,
                                       self.exception_callback)

            result = parser.get_records(100)

            self.assertEquals(len(result), 0)

            self.assertEquals(len(self.exception_callback_value), 0)
开发者ID:JeffRoy,项目名称:mi-dataset,代码行数:15,代码来源:test_adcps_jln_stc.py


示例7: test_simple

    def test_simple(self):
        """
        Read test data and pull out data particles one at a time.
        Assert that the results are those we expected.
        """
        self.stream_handle = open(os.path.join(RESOURCE_PATH, 'adcpt_20130929_091817.DAT'))
        self.parser = AdcpsJlnStcParser(self.config, self.start_state, self.stream_handle,
                                        self.state_callback, self.pub_callback, self.exception_callback)

        result = self.parser.get_records(1)
        self.assert_result(result, self.particle_header_footer, 138)
        result = self.parser.get_records(1)
        self.assert_result(result, self.particle_a, 509)
        result = self.parser.get_records(1)
        self.assert_result(result, self.particle_b, 880)
        result = self.parser.get_records(1)
        self.assert_result(result, self.particle_c, 1251)
        result = self.parser.get_records(1)
        self.assert_result(result, self.particle_d, 1622)
        result = self.parser.get_records(1)
        self.assert_result(result, self.particle_e, 1993)

        # no data left
        result = self.parser.get_records(1)
        self.assertEqual(result, [])
        self.assert_(isinstance(self.publish_callback_value, list))
        self.assertEqual(self.publish_callback_value[0], self.particle_e)
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:27,代码来源:test_adcps_jln_stc.py


示例8: test_bug_2979_1

    def test_bug_2979_1(self):
        """
        Read test data and pull out multiple data particles at one time.
        Assert that the results are those we expected.
        """
        with open(os.path.join(RESOURCE_PATH, 'adcpt_20140613_105345.DAT')) as file_handle:
            parser = AdcpsJlnStcParser(self._telem_config,
                                       None,
                                       file_handle,
                                       lambda state, ingested: None,
                                       lambda data: None,
                                       self.exception_callback)

            result = parser.get_records(100)

            self.assertEquals(len(result), 13)

            self.assertEquals(len(self.exception_callback_value), 0)
开发者ID:GrimJ,项目名称:mi-dataset,代码行数:18,代码来源:test_adcps_jln_stc.py


示例9: test_mid_state_start

 def test_mid_state_start(self):
     """
     Test starting the parser in a state in the middle of processing
     """
     # Move position in file to middle of second record. Should return the 3rd record (particle c)
     new_state = {StateKey.POSITION: 590}
     self.stream_handle = open(os.path.join(RESOURCE_PATH, 'adcpt_20130929_091817.DAT'))
     self.parser = AdcpsJlnStcParser(self.config, new_state, self.stream_handle,
                                     self.state_callback, self.pub_callback, self.exception_callback)
     result = self.parser.get_records(1)
     self.assert_result(result, self.particle_c, 1251)
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:11,代码来源:test_adcps_jln_stc.py


示例10: test_receive_fail

    def test_receive_fail(self):
	# ReceiveFailure   
        # If record marked with 'ReceiveFailure', skip the record and continue parsing.
        self.start_state = {StateKey.POSITION: 0}
        self.stream_handle = StringIO(AdcpsJlnStcParserUnitTestCase.BAD_RX_FAILURE)
        self.parser = AdcpsJlnStcParser(self.config, self.start_state, self.stream_handle,
                                        self.state_callback, self.pub_callback, self.exception_callback)
        result = self.parser.get_records(3)
        self.assertEqual(self.publish_callback_value[0], self.particle_header_footer)
        self.assertEqual(self.publish_callback_value[1], self.particle_b)
        if len(result) != 2:
            self.fail("Expected two records and got %d. Record containing ReceiveFailure should have been skipped.", len(result))
开发者ID:StevenMyerson,项目名称:marine-integrations,代码行数:12,代码来源:test_adcps_jln_stc.py


示例11: test_set_state

 def test_set_state(self):
     """
     Test changing to a new state after initializing the parser and 
     reading data, as if new data has been found and the state has
     changed
     """
     self.stream_handle = open(os.path.join(RESOURCE_PATH, 'adcpt_20130929_091817.DAT'))
     self.parser = AdcpsJlnStcParser(self.config, self.start_state, self.stream_handle,
                                     self.state_callback, self.pub_callback, self.exception_callback)
     new_state = {StateKey.POSITION: 590}
     self.parser.set_state(new_state)
     result = self.parser.get_records(1)
     self.assert_result(result, self.particle_c, 1251)
     result = self.parser.get_records(1)
     self.assert_result(result, self.particle_d, 1622)
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:15,代码来源:test_adcps_jln_stc.py


示例12: create_yml

    def create_yml(self):
        """
        This utility creates a yml file
        """

        #ADCP_data_20130702.PD0 has one record in it
        fid = open(os.path.join(RESOURCE_PATH, 'adcpt_20140504_015742.DAT'), 'rb')

        self.stream_handle = fid
        self.parser = AdcpsJlnStcParser(self.config, self.start_state, self.stream_handle,
                                        self.state_callback, self.pub_callback, self.exception_callback)

        particles = self.parser.get_records(20)

        self.particles_to_yml(particles, 'adcpt_20140504_015742.yml')
        fid.close()
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:16,代码来源:test_adcps_jln_stc.py


示例13: test_get_many

 def test_get_many(self):
     """
     Read test data and pull out multiple data particles at one time.
     Assert that the results are those we expected.
     """
     self.stream_handle = open(os.path.join(RESOURCE_PATH, 'adcpt_20130929_091817.DAT'))
     self.parser = AdcpsJlnStcParser(self.config, self.start_state, self.stream_handle,
                                     self.state_callback, self.pub_callback, self.exception_callback)
     result = self.parser.get_records(4)
     self.assertEqual(result, [self.particle_header_footer, self.particle_a, self.particle_b, self.particle_c])
     log.debug('POSITION: %s', self.parser._state[StateKey.POSITION])
     self.assertEqual(self.parser._state[StateKey.POSITION], 1251)
     self.assertEqual(self.state_callback_value[StateKey.POSITION], 1251)
     self.assertEqual(self.publish_callback_value[0], self.particle_header_footer)
     self.assertEqual(self.publish_callback_value[1], self.particle_a)
     self.assertEqual(self.publish_callback_value[2], self.particle_b)
     self.assertEqual(self.publish_callback_value[3], self.particle_c)
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:17,代码来源:test_adcps_jln_stc.py


示例14: AdcpsJlnStcParserUnitTestCase

class AdcpsJlnStcParserUnitTestCase(ParserUnitTestCase):
    """
    adcps_jln_stc Parser unit test suite
    """
    # Bad test data. Checksum value is wrong in record 1764.
    BAD_CHECKSUM = '#UIMM Status\r\n#7370_DateTime: 20130929 091817\r\n#ID=10\r\n#SN=70001672\r\n' \
                   '#Volts=6.40\r\n#Records=5\r\n#Length=1780\r\n#Events=84\r\n#Begin UIMM Data\r\n' \
                   'Record[1764]:n\x7fb\x01C' \
                   '\x06\x00\x00\x002(\xdd\x07\t\x1d\x08\x0f\x00\x00\xa6C\xe9\xf2\x1f\xf2\x93\x07' \
                   '\xe2\x06\x00\x00\x1f\x01(\x15\x00\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\xdf\xff\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\xd5\xff\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00Z\r\n' \
                   'Record[1765]:' \
                   'n\x7fb\x01D\x06\x00\x00\x002(\xdd\x07\t\x1d\x08\x1e\x00\x00\xa2C\xe9\xf2!\xf2\x91' \
                   '\x07\xd9\x05\x00\x00\x1f\x01(\x13\x00\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\xe5\xff\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\xf9\xff\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                   '\x80\x00\x80\x00\x80\x00\x80$[\r\n' \
                   '#End UIMM Data, 5 samples written\r\n'

    # Bad test data. Number of bytes reported in record 1764 does not match number of bytes received.
    BAD_NUM_BYTES = '#UIMM Status\r\n#7370_DateTime: 20130929 091817\r\n#ID=10\r\n#SN=70001672\r\n' \
                    '#Volts=6.40\r\n#Records=5\r\n#Length=1780\r\n#Events=84\r\n#Begin UIMM Data\r\n' \
                    'Record[1764]:n\x7f0\x01C' \
                    '\x06\x00\x00\x002(\xdd\x07\t\x1d\x08\x0f\x00\x00\xa6C\xe9\xf2\x1f\xf2\x93\x07' \
                    '\xe2\x06\x00\x00\x1f\x01(\x15\x00\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\xdf\xff\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\xd5\xff\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\xfaZ\r\n' \
                    'Record[1765]:' \
                    'n\x7fb\x01D\x06\x00\x00\x002(\xdd\x07\t\x1d\x08\x1e\x00\x00\xa2C\xe9\xf2!\xf2\x91' \
                    '\x07\xd9\x05\x00\x00\x1f\x01(\x13\x00\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\xe5\xff\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\xf9\xff\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                    '\x80\x00\x80\x00\x80\x00\x80$[\r\n' \
                    '#End UIMM Data, 5 samples written\r\n'

    # Bad test data. Record 1764 is marked with 'ReceiveFailure.' The record should be skipped.
    BAD_RX_FAILURE = '#UIMM Status\r\n#7370_DateTime: 20130929 091817\r\n#ID=10\r\n#SN=70001672\r\n' \
                     '#Volts=6.40\r\n#Records=5\r\n#Length=1780\r\n#Events=84\r\n#Begin UIMM Data\r\n' \
                     'Record[1764]:ReceiveFailure\r\n' \
                     'Record[1765]:' \
                     'n\x7fb\x01D\x06\x00\x00\x002(\xdd\x07\t\x1d\x08\x1e\x00\x00\xa2C\xe9\xf2!\xf2\x91' \
                     '\x07\xd9\x05\x00\x00\x1f\x01(\x13\x00\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                     '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                     '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
                     '\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00\x80\x00' \
#.........这里部分代码省略.........
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:101,代码来源:test_adcps_jln_stc.py



注:本文中的mi.dataset.parser.adcps_jln_stc.AdcpsJlnStcParser类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python ctdmo.CtdmoParser类代码示例发布时间:2022-05-27
下一篇:
Python dataset_driver.DataSetDriver类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap