How to use the nitclk.synchronize function in nitclk

To help you get started, we’ve selected a few nitclk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ni / nimi-python / src / nitclk / system_tests / tests_system_nitclk.py View on Github external
def test_nitclk_is_done(multiple_niscope_sessions):
    nitclk.configure_for_homogeneous_triggers(multiple_niscope_sessions)
    nitclk.synchronize(multiple_niscope_sessions, .001)
    nitclk.initiate(multiple_niscope_sessions)
    nitclk.is_done(multiple_niscope_sessions)
github ni / nimi-python / generated / nitclk / nitclk / unit_tests / test_nitclk.py View on Github external
def test_synchronize(self):
        min_time = 0.042
        self.patched_library.niTClk_Synchronize.side_effect = self.side_effects_helper.niTClk_Synchronize
        nitclk.synchronize(multiple_session_references, min_time)
        self.patched_library.niTClk_Synchronize.assert_called_once_with(_matchers.ViUInt32Matcher(len(multiple_sessions)), _matchers.ViSessionBufferMatcher(multiple_sessions), _matchers.ViReal64Matcher(min_time))
        return
github ni / nimi-python / src / nitclk / system_tests / tests_system_nitclk.py View on Github external
def test_nitclk_initiate(multiple_niscope_sessions):
    nitclk.configure_for_homogeneous_triggers(multiple_niscope_sessions)
    nitclk.synchronize(multiple_niscope_sessions, .001)
    nitclk.initiate(multiple_niscope_sessions)
github ni / nimi-python / src / nitclk / system_tests / tests_system_nitclk.py View on Github external
def test_nitclk_synchronize(multiple_niscope_sessions):
    nitclk.configure_for_homogeneous_triggers(multiple_niscope_sessions)
    nitclk.synchronize(multiple_niscope_sessions, .001)
github ni / nimi-python / generated / nitclk / nitclk / unit_tests / test_nitclk.py View on Github external
def test_api_error(self):
        error_string = 'Error'
        self.patched_library.niTClk_Synchronize.side_effect = self.side_effects_helper.niTClk_Synchronize
        self.side_effects_helper['Synchronize']['return'] = -1
        self.patched_library.niTClk_GetExtendedErrorInfo.side_effect = self.side_effects_helper.niTClk_GetExtendedErrorInfo
        self.side_effects_helper['GetExtendedErrorInfo']['errorString'] = error_string
        try:
            nitclk.synchronize(multiple_session_references, 0.42)
        except nitclk.Error as e:
            assert e.code == -1
            assert e.description == error_string
github ni / nimi-python / generated / nitclk / nitclk / unit_tests / test_nitclk.py View on Github external
def test_synchronize_timedelta(self):
        min_time = hightime.timedelta(seconds=0.042)
        self.patched_library.niTClk_Synchronize.side_effect = self.side_effects_helper.niTClk_Synchronize
        nitclk.synchronize(multiple_session_references, min_time)
        self.patched_library.niTClk_Synchronize.assert_called_once_with(_matchers.ViUInt32Matcher(len(multiple_sessions)), _matchers.ViSessionBufferMatcher(multiple_sessions), _matchers.ViReal64Matcher(min_time.total_seconds()))
        return
github ni / nimi-python / generated / nitclk / nitclk / unit_tests / test_nitclk.py View on Github external
def test_api_get_error_description_fails(self):
        self.patched_library.niTClk_Synchronize.side_effect = self.side_effects_helper.niTClk_Synchronize
        self.side_effects_helper['Synchronize']['return'] = -1
        self.patched_library.niTClk_GetExtendedErrorInfo.side_effect = self.side_effects_helper.niTClk_GetExtendedErrorInfo
        self.side_effects_helper['GetExtendedErrorInfo']['return'] = -2
        try:
            nitclk.synchronize(multiple_session_references, 0.42)
        except nitclk.Error as e:
            assert e.code == -1  # we want the original error code from getting the attribute.
            assert e.description == "Failed to retrieve error description."
github ni / nimi-python / src / nitclk / system_tests / tests_system_nitclk.py View on Github external
def test_nitclk_wait_until_done(multiple_niscope_sessions):
    nitclk.configure_for_homogeneous_triggers(multiple_niscope_sessions)
    nitclk.synchronize(multiple_niscope_sessions, .001)
    nitclk.initiate(multiple_niscope_sessions)
    nitclk.wait_until_done(multiple_niscope_sessions, .001)